[Pw_forum] PWscf-1.3 on HP-PA RISC machines

Sergei Lisenkov proffess at yandex.ru
Fri Oct 3 11:25:42 CEST 2003


Dear PWscf authors, users, and Paolo,

I would like to add some changes for succesfull compilation of new version of PWscf-1.3 on HP machines. 
Paolo, you was right in manual, that old make.sys file for version 1.2.0 does not work for version
1.3.0. I did some changes and it works. We should add in file clib/cp.h the next :

#if defined __HP

#  define FFTW_INPLACE_DRV_1D fftw_inplace_drv_1d
#  define FFTW_INPLACE_DRV_2D fftw_inplace_drv_2d
#  define FFTW_INPLACE_DRV_3D fftw_inplace_drv_3d
#  define CP_GETENV cp_getenv
#  define CP_DATE cp_date
#  define CREATE_PLAN_2D create_plan_2d
#  define CREATE_PLAN_3D create_plan_3d
#  define CREATE_PLAN_1D create_plan_1d
#  define DESTROY_PLAN_1D destroy_plan_1d
#  define DESTROY_PLAN_2D destroy_plan_2d
#  define DESTROY_PLAN_3D destroy_plan_3d
#  define FFT_X_STICK fft_x_stick
#  define FFT_XY_STICK fft_xy_stick
#  define FFT_XY fft_xy
#  define FFT_Y_STICK fft_y_stick
#  define FFT_Y_STICK2 fft_y_stick2
#  define FFT_Z_STICK fft_z_stick
#  define FFT_Z fft_z
#  define FFT_STICK fft_stick
#  define CPFLUSH cpflush
#  define CPTIMER cptimer
#  define ELAPSED_SECONDS elapsed_seconds
#  define CCLOCK cclock
#  define FACTOR235 factor235
#  define FACTOR2 factor2
#  define LN_ALLOC ln_alloc
#  define LN_DEALLOC ln_dealloc
#  define LN_SET ln_set
#  define LN_ACTIVATE ln_activate
#  define LN_IND ln_ind
#  define MEMSTAT memstat
#  define READOCC readocc
#  define ROUND2 round2
#  define MYUNITNAME myunitname
#  define CP_ITOA cp_itoa

and add -D__HP in CPPFLAGS. Now I present two separate files for Serial and Parallel version of 
PWscf-1.3.0 :

Make.hp:
============================================================================================
OSHOME=/nethome/proffess/O-sesame
#
# System-dependent definitions for HP-PA RISC machines, HP-UX
# Contributed by Sergey Lisenkov, with help from Eyvaz Isaev
# and Joey Dieckhans. Software configuration:
# HP-UX >=11.0,  HP f90 compiler v >= 2.4, HP C compiler, MLIB
#
# Note that there is one version of MPI that requires the argument
#  "-stdio=i" in comman line for reading from standart output
#
# 
# Use precompiled fftw library (version <= 2.1.5, NOT v.3!)
# In this case, specify also  how to load the fftw library (FFTW_LIB)
# and the path to the fftw.h include file (FFTW_INC_DIR). Example:
#  32-bit version
 FFTW_LIB=-L/nethome/proffess/lib/fftw-2.1.5/32/lib -lfftw
 FFTW_INC_DIR=/nethome/proffess/lib/fftw-2.1.5/32/include
#  64-bit version
# FFTW_LIB=-L/nethome/proffess/lib/fftw-2.1.5/64/lib -lfftw
# FFTW_INC_DIR=/nethome/proffess/lib/fftw-2.1.5/64/include
  CPPFLAGS = -I$(OSHOME)/include -D__HP -D__FFTW  -I$(FFTW_INC_DIR)
#
# Use the local copy of fftw
#CPPFLAGS = -I$(OSHOME)/include -D__HP -D__FFTW -D__USE_INTERNAL_FFTW
# Fortran compiler:
#
F90 = f90
F77 = $(F90)
CC = cc
#
# Fortran compiler flags
# 32-bit
FFLAGS = +O2 -w +cpp=yes +Odataprefetch +Onolimit +r8 +U77 +DA2.0 +DS2.0
# 64-bit
#FFLAGS = +O2 -w +cpp=yes +Odataprefetch +Onolimit +r8 +U77 +DA2.0W +DS2.0W +noppu

F90FLAGS = $(FFLAGS) $(CPPFLAGS)
#
# Fortran77 compiler flags
#
F77FLAGS = $(FFLAGS)
F77FLAGS_NOOPT = -O0
#
# C compiler flags
# 32-bit
CCFLAGS  = $(CPPFLAGS) +O2 +DA2.0 +DS2.0 +DD32 +Odataprefetch +Onolimit
# 64-bit
#CCFLAGS  = $(CPPFLAGS) +O2 +DA2.0W +DS2.0W +DD64 +Odataprefetch +Onolimit
# This is needed to tell the compiler where modules are
# Serial version
MODULEFLAG= -I$(OSHOME)/Modules -I$(OSHOME)/PW -I$(OSHOME)/PH -I/opt/mpi/include
#
# Libraries:
# 32-bit
LIBS = -L/opt/mpi/lib/pa2.0 -lmpi -ldmpi -lmpio -lmtmpi -L/opt/mlib/lib/pa2.0 -lveclib -llapack $(FFTW_LIB)  -lm
# 64-bit
#LIBS = -L/opt/mpi/lib/pa20_64 -lmpi -ldmpi -lmpio -lmtmpi -L/opt/mlib/lib/pa20_64 -lveclib -llapack $(FFTW_LIB) -lm
# Loader:
LD=$(F90)
#32-bit
LDFLAGS =  $(OSHOME)/flib/ptools.a $(OSHOME)/flib/flib.a $(OSHOME)/clib/clib.a +U77 +DA2.0 +DS2.0 +O2  $(LIBS)
# 64-bit
#LDFLAGS =  $(OSHOME)/flib/ptools.a $(OSHOME)/flib/flib.a $(OSHOME)/clib/clib.a +U77 +DA2.0W +DS2.0W +O2  $(LIBS)
#
# ar:
#
AR = ar
ARFLAGS = ruv

==========================================================================================
Make.hpMPI
==========================================================================================
OSHOME=/nethome/proffess/O-sesame
#
# System-dependent definitions for HP-PA RISC machines, HP-UX
# Contributed by Sergey Lisenkov, with help from Eyvaz Isaev
# and Joey Dieckhans. Software configuration:
# HP-UX >=11.0,  HP f90 compiler v >= 2.4, HP C compiler, MLIB
#
# Note that there is one version of MPI that requires the argument
#  "-stdio=i" in comman line for reading from standart output
#
# 
# Use precompiled fftw library (version <= 2.1.5, NOT v.3!)
# In this case, specify also  how to load the fftw library (FFTW_LIB)
# and the path to the fftw.h include file (FFTW_INC_DIR). Example:
#  32-bit version
 FFTW_LIB=-L/nethome/proffess/lib/fftw-2.1.5/32/lib -lfftw
 FFTW_INC_DIR=/nethome/proffess/lib/fftw-2.1.5/32/include
#  64-bit version
# FFTW_LIB=-L/nethome/proffess/lib/fftw-2.1.5/64/lib -lfftw
# FFTW_INC_DIR=/nethome/proffess/lib/fftw-2.1.5/64/include
  CPPFLAGS = -I$(OSHOME)/include -D__HP -D__FFTW -D__PARA -D__MPI -I$(FFTW_INC_DIR)
#
# Use the local copy of fftw
#CPPFLAGS = -I$(OSHOME)/include -D__HP -D__FFTW -D__PARA -D__MPI -D__USE_INTERNAL_FFTW
# Fortran compiler:
#
F90 = f90
F77 = $(F90)
CC = mpicc
#
# Fortran compiler flags
# 32-bit
FFLAGS = +O2 -w +cpp=yes +Odataprefetch +Onolimit +r8 +U77 +DA2.0 +DS2.0
# 64-bit
#FFLAGS = +O2 -w +cpp=yes +Odataprefetch +Onolimit +r8 +U77 +DA2.0W +DS2.0W +noppu

F90FLAGS = $(FFLAGS) $(CPPFLAGS)
#
# Fortran77 compiler flags
#
F77FLAGS = $(FFLAGS)
F77FLAGS_NOOPT = -O0
#
# C compiler flags
# 32-bit
CCFLAGS  = $(CPPFLAGS) +O2 +DA2.0 +DS2.0 +DD32 +Odataprefetch +Onolimit
# 64-bit
#CCFLAGS  = $(CPPFLAGS) +O2 +DA2.0W +DS2.0W +DD64 +Odataprefetch +Onolimit
# This is needed to tell the compiler where modules are
# Serial version
MODULEFLAG= -I$(OSHOME)/Modules -I$(OSHOME)/PW -I$(OSHOME)/PH
#
# Libraries:
# 32-bit
#LIBS = -L/opt/mlib/lib/pa2.0 -lveclib -llapack $(FFTW_LIB)  -lm
# 64-bit
#LIBS = -L/opt/mlib/lib/pa20_64 -lveclib -llapack $(FFTW_LIB) -lm
# Loader:
LD=$(F90)
# 32-bit
LDFLAGS =  $(OSHOME)/flib/ptools.a $(OSHOME)/flib/flib.a $(OSHOME)/clib/clib.a +U77 +DA2.0 +DS2.0 +O2  $(LIBS) -lpthread
# 64-bit
#LDFLAGS =  $(OSHOME)/flib/ptools.a $(OSHOME)/flib/flib.a $(OSHOME)/clib/clib.a +U77 +DA2.0W +DS2.0W +O2  $(LIBS) -lpthread
# ar:
#
AR = ar
ARFLAGS = ruv
===============================================================================================

Important notice: You must change in file PW/openfil.f90 "iunigk = 7" to "iunigk = 77". Also you
must use ONLY old version of Pseudopotentials (not UPF format). I do not know why.

Thanks,
Sergey



More information about the users mailing list