Compile problem with PGI compiler parallel version

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
hyc

Compile problem with PGI compiler parallel version

#1 Post by hyc » Tue Nov 21, 2006 11:53 pm

Dear sirs:

I compiled my parallel VASP binary code by the PGI fortran 90 and MPICH 1.2.7. But when I tried to calculted with this code, the system directly gave the error message as following:
/home/hychuang/opt/mpich/pgi/bin/mpirun.ch_p4: line 243: 5835 Segmentation fault (core dumped) "/home/hychuang/hychuang-1/software/vasp/pgi/vasp.4.6/vasp" -p4pg "/home/hychuang/hychuang-1/vasp_test/benchmark_Hg/pgi/2cp/pgi/PI5751" -p4wd "/home/hychuang/hychuang-1/vasp_test/benchmark_Hg/pgi/2cp/pgi"

Could any one give any suggestion to improve this sistuation?
And the following is my Makefile:

.SUFFIXES: .inc .f .f90 .F
# all CPP processed fortran files have the extension .f90
SUFFIX=.f90
CPP_ = ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)
FFLAGS = -Mfree -fast -tp k8-64 -i8 -Mcache_align
OFLAG=-O3

OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =

OBJ_NOOPT =
DEBUG = -O0
INLINE = $(OFLAG)
BLAS=-L/home/hychuang/opt/pgi/linux86-64/6.2/lib -lacml -lg2c
LAPACK= ../vasp.4.lib/lapack_double.o
LINK = -tp k8-64
FC=/home/hychuang/opt/mpich/pgi/bin/mpif90
FCL=$(FC)
LIB = -L../vasp.4.lib -ldmy \
../vasp.4.lib/linpack_double.o $(LAPACK) \
$(BLAS)
# FFT: fftmpi.o with fft3dlib of Juergen Furthmueller
FFT3D = fftmpi.o fftmpi_map.o fft3dlib.o
# general rules and compile lines
#-----------------------------------------------------------------------
BASIC= symmetry.o symlib.o lattlib.o random.o

SOURCE= base.o mpi.o smart_allocate.o xml.o \
constant.o jacobi.o main_mpi.o scala.o \
asa.o lattice.o poscar.o ini.o setex.o radial.o \
pseudo.o mgrid.o mkpoints.o wave.o wave_mpi.o $(BASIC) \
nonl.o nonlr.o dfast.o choleski2.o \
mix.o charge.o xcgrad.o xcspin.o potex1.o potex2.o \
metagga.o constrmag.o pot.o cl_shift.o force.o dos.o elf.o \
tet.o hamil.o steep.o \
chain.o dyna.o relativistic.o LDApU.o sphpro.o paw.o us.o \
ebs.o wavpre.o wavpre_noio.o broyden.o \
dynbr.o rmm-diis.o reader.o writer.o tutor.o xml_writer.o \
brent.o stufak.o fileio.o opergrid.o stepver.o \
dipol.o xclib.o chgloc.o subrot.o optreal.o davidson.o \
edtest.o electron.o shm.o pardens.o paircorrection.o \
optics.o constr_cell_relax.o stm.o finite_diff.o \
elpol.o setlocalpp.o

INC=

vasp: $(SOURCE) $(FFT3D) $(INC) main.o
rm -f vasp
$(FCL) -o vasp $(LINK) main.o $(SOURCE) $(FFT3D) $(LIB)
makeparam: $(SOURCE) $(FFT3D) makeparam.o main.F $(INC)
$(FCL) -o makeparam $(LINK) makeparam.o $(SOURCE) $(FFT3D) $(LIB)
zgemmtest: zgemmtest.o base.o random.o $(INC)
$(FCL) -o zgemmtest $(LINK) zgemmtest.o random.o base.o $(LIB)
dgemmtest: dgemmtest.o base.o random.o $(INC)
$(FCL) -o dgemmtest $(LINK) dgemmtest.o random.o base.o $(LIB)
ffttest: base.o smart_allocate.o mpi.o mgrid.o random.o ffttest.o $(FFT3D) $(INC)
$(FCL) -o ffttest $(LINK) ffttest.o mpi.o mgrid.o random.o smart_allocate.o base.o $(FFT3D) $(LIB)
kpoints: $(SOURCE) $(FFT3D) makekpoints.o main.F $(INC)
$(FCL) -o kpoints $(LINK) makekpoints.o $(SOURCE) $(FFT3D) $(LIB)

clean:
-rm -f *.g *.f *.o *.L *.mod ; touch *.F

main.o: main$(SUFFIX)
$(FC) $(FFLAGS)$(DEBUG) $(INCS) -c main$(SUFFIX)
xcgrad.o: xcgrad$(SUFFIX)
$(FC) $(FFLAGS) $(INLINE) $(INCS) -c xcgrad$(SUFFIX)
xcspin.o: xcspin$(SUFFIX)
$(FC) $(FFLAGS) $(INLINE) $(INCS) -c xcspin$(SUFFIX)

makeparam.o: makeparam$(SUFFIX)
$(FC) $(FFLAGS)$(DEBUG) $(INCS) -c makeparam$(SUFFIX)

makeparam$(SUFFIX): makeparam.F main.F
#
# MIND: I do not have a full dependency list for the include
# and MODULES: here are only the minimal basic dependencies
# if one strucuture is changed then touch_dep must be called
# with the corresponding name of the structure
#
base.o: base.inc base.F
mgrid.o: mgrid.inc mgrid.F
constant.o: constant.inc constant.F
lattice.o: lattice.inc lattice.F
setex.o: setexm.inc setex.F
pseudo.o: pseudo.inc pseudo.F
poscar.o: poscar.inc poscar.F
mkpoints.o: mkpoints.inc mkpoints.F
wave.o: wave.inc wave.F
nonl.o: nonl.inc nonl.F
nonlr.o: nonlr.inc nonlr.F

$(OBJ_HIGH):
$(CPP)
$(FC) $(FFLAGS) $(OFLAG_HIGH) $(INCS) -c $*$(SUFFIX)
$(OBJ_NOOPT):
$(CPP)
$(FC) $(FFLAGS) $(INCS) -c $*$(SUFFIX)

fft3dlib_f77.o: fft3dlib_f77.F
$(CPP)
$(F77) $(FFLAGS_F77) -c $*$(SUFFIX)

.F.o:
$(CPP)
$(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)
.F$(SUFFIX):
$(CPP)
$(SUFFIX).o:
$(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)

# special rules
#-----------------------------------------------------------------------
# these special rules are cummulative (that is once failed
# in one compiler version, stays in the list forever)
# -tpp5|6|7 P, PII-PIII, PIV
# -xW use SIMD (does not pay of on PII, since fft3d uses double prec)
# all other options do no affect the code performance since -O1 is used
#-----------------------------------------------------------------------

fft3dlib.o : fft3dlib.F
$(CPP)
$(FC) $(FFLAGS) -fastsse -Mipa=fast -c $*$(SUFFIX)

<span class='smallblacktext'>[ Edited ]</span>
Last edited by hyc on Tue Nov 21, 2006 11:53 pm, edited 1 time in total.

pavel
Newbie
Newbie
Posts: 20
Joined: Tue Oct 17, 2006 2:08 pm
License Nr.: FA513901
Location: Karlsruhe, Germany

Compile problem with PGI compiler parallel version

#2 Post by pavel » Fri Nov 24, 2006 2:57 pm

Most probably your MPI version was compiled with 4 byte integers (-i4). You are using 8 byte integers (see compiler flag -i8).
In my case I was unable to compile FFTW with -i8 and found the solution by recompiling all libraries and vasp with -i4. An additional path published in the forum was used. See other posts for more info.
Last edited by pavel on Fri Nov 24, 2006 2:57 pm, edited 1 time in total.

hyc

Compile problem with PGI compiler parallel version

#3 Post by hyc » Tue Nov 28, 2006 7:19 am

Dear Pavel:

Thank you for your suggestion.
I changed the FFLAGS -i8 to -i4, but it didn't work
I also did the different compiler test on our Opteron machine.
For serial version, the Intel fortran compiler is faster then the PGI compiler.
So before other doing compiler's benchmark, I would use the parallel VASP compiled by Intel fortran compiler.
Last edited by hyc on Tue Nov 28, 2006 7:19 am, edited 1 time in total.

Post Reply