Trouble compiling on BG/P

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
d-farrell2

Trouble compiling on BG/P

#1 Post by d-farrell2 » Thu Oct 30, 2008 5:35 pm

I am trying to compile a gamma-point only version of VASP 4.6 (though I may need to do the standard version at some other point) on a Blue Gene P. I was able to build the libraries without any problems, but when I began compiling the rest of the source, I got the following error:

mpixlcxx -E -C -DHOST=\"PPC450_32bit\" -DMPI -DNGZhalf -DCACHE_SIZE=32000 -DscaLAPACK -DMPI_BLOCK=500 -Davoidalloc aedens.F >aedens.f
"aedens.F", line 631.63: 1506-209 (S) Character constants must end before the end of a line.
make: *** [aedens.o] Error 1



Below is my makefile - I would be grateful for any assistance.

.SUFFIXES: .inc .f .F
#-----------------------------------------------------------------------
# Makefile for RS 6000/ SP2, SP3 and possibly SP4
#
# on some systems the file mpif.h is located somewhere in the default
# include search path.
# Copying the mpif.h file to the local directory and converting it
# to f90 style does not work (because the system wide mpif.h file
# is included). One solution is to rename the mpif.h file to mpif90.h.
# If the new mpi routines (parallel_new.tar) are used only the file
# pm.inc must be changed accordingly.
#
# Attention:
# =======================
# present default optimisation is -O3, but you might try -O4 as well
#
# several files are optimized less aggressive (see bottom of the makefile),
# since agressive optimisation of those files caused VASP to bomb
# in one or the other compiler version
# because it was impossible to keep track of which file is not
# properly compiled by which version, all files that
# are problematic in one or the other version are compiled
# with lower optimisation
#
# ZHEEVX is not working properly, so please uncomment the line
# #define USE_ZHEEVX
# in subrot.F and wavpre_noio.F
#
#-----------------------------------------------------------------------
# Note by Hanchul Kim
# ~~~~~~~~~~~~~~~~~~~
# 1.Make sure to modify subrot.F and wavpre_noio.F as described in
# the above "Attention" by VaspMaster.
#
# 2.This version of makefile covers both 32bit and 64bit compilation.
# As it is, it compiles for 32bit object.
#
# To make 64bit object, change the following two variables:
# BIT, LINK
#
# You have to set BIT in the same way, in vasp.4.lib/makefile.regatta
#
# 3.You may want to use different definitions for
# BIN_DIR, VASP_BIN
# In that case, modify those two variables as you like.
#-----------------------------------------------------------------------

# all CPP processed fortran files have the extension .f
SUFFIX=.f

#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
FC=mpixlf90 -qfree=f90
FCL=$(FC)

#-----------------------------------------------------------------------
# C-preprocessor define any of the flags given below
# MPI generate parallel version
# NGZhalf charge density reduced in Z direction
# wNGZhalf gamma point only reduced in Z direction
# CACHE_SIZE 5001 for SP3 and Power 3
# 32768 for 550,590,3CT
# 8001 595/397 quad word systems
# scaLAPACK use scaLAPACK
#-----------------------------------------------------------------------
# CPP = /usr/bin/cpp -P -DHOST=\"PowerPC970\" -DMPI -DNGZhalf -DscaLAPACK \
# -Duse_collective -DCACHE_SIZE=32768 $*.F >$*.f

#CPP = /usr/ccs/lib/cpp -P -DHOST=\"p690-Power4\" -DMPI -DNGZhalf \
# -Duse_collective -DCACHE_SIZE=8192 $*.F >$*.f
#CPP = /usr/ccs/lib/cpp -P -DHOST=\"p690-Power4\" -DMPI -DNGZhalf \
# -Duse_collective -DCACHE_SIZE=10240 $*.F >$*.f
#CPP = /usr/ccs/lib/cpp -P -DHOST=\"p690-Power4\" -DMPI -DNGZhalf \
# -Duse_collective -DCACHE_SIZE=12288 $*.F >$*.f
#CPP = /usr/ccs/lib/cpp -P -DHOST=\"p690-Power4\" -DMPI -DNGZhalf \
# -Duse_collective -DCACHE_SIZE=16384 $*.F >$*.f
# CPP = mpixlcxx_r -P -C -DHOST=\"PPC970_64bit\" -DMPI -DNGZhalf \
# -Duse_collective -DCACHE_SIZE=32000 $*.F >$*.f
CPP = mpixlcxx -E -C -DHOST=\"PPC450_32bit\" -DMPI -DNGZhalf \
-DCACHE_SIZE=32000 -DscaLAPACK -DMPI_BLOCK=500 -Davoidalloc $*.F >$*.f

#-----------------------------------------------------------------------
# Choice for 32bit or 64bit object
#-----------------------------------------------------------------------
BIT = 32
#BIT = 64

#-----------------------------------------------------------------------
# general fortran flags, none required
#-----------------------------------------------------------------------

FFLAGS_MAIN = -q$(BIT) -qnomaf
FFLAGS = -q$(BIT) -qnomaf

#-----------------------------------------------------------------------
# optimization:
# optimise for the machine on which the code is compiled
#-----------------------------------------------------------------------

OFLAG = -O2 -qarch=450d -qtune=450 -qcache=auto
OFLAG_HIGH = $(OFLAG)
OBJ_HIGH = none
OBJ_NOOPT = none
DEBUG = -g
INCS = -I/usr/lpp/ppe.poe/include
INCS =
INLINE = $(OFLAG)

BIN_DIR = $(HOME)
VERSION = 4.6.21
VASP_BIN = vasp.32bit.4real
#-----------------------------------------------------------------------
# maybe one need to set an include path (usually not required)
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# options for linking
# the following option increases the size of the data frame
#
#-----------------------------------------------------------------------
LINK = -Wl,-bD:1000000000
# following line defines maximum memory requirement of 2GB : only for 32bit object
LINK = -b$(BIT) -Wl,-bmaxstack:0x80000000 -bmaxdata:0x80000000
LINK = -b$(BIT) -Wl,-bmaxdata:0x80000000
LINK =
#-----------------------------------------------------------------------
# uncomment the following option for LINK in case of 64bit object
#LINK = -b$(BIT)
#-----------------------------------------------------------------------

#MPI = -lmpich
SCALAPACK = -llapack_BGP -lgoto -lblacs -ltools
SCALAPACK =
LIB = -L../vasp.4.lib -ldmy ../vasp.4.lib/linpack_double.o ../vasp.4.lib/lapack_double.o \
-L/soft/apps/ESSL-4.3/lib -lesslbg $(SCALAPACK) $(MPI)
#LIB = -L../vasp.4.lib -ldmy$(BIT) -llapack -lessl $(SCALAPACK) $(MPI)
#LIB = -L../vasp.4.lib -ldmy$(BIT) -llapack -lessl -lpessl -lblas $(SCALAPACK) $(MPI)

#-----------------------------------------------------------------------
# specify 3d-fft to be used with VASP
#-----------------------------------------------------------------------
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 aedens.o

INC=

all: vasp

clean:
-rm -f *.g *.f *.o *.L *.mod vasp

vasp: $(SOURCE) $(FFT3D) $(INC) main.o
$(FCL) -q32 -o vasp $(LINK) main.o $(SOURCE) $(FFT3D) $(LIB)
mv vasp $(BIN_DIR)/$(VASP_BIN)
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)

main.o: main$(SUFFIX)
$(FC) $(FFLAGS_MAIN) $(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 (in version 4.5.7)
#-----------------------------------------------------------------------
#
#radial.o: radial.F
# $(CPP)
# $(FC) $(FFLAGS) $(INCS) -qmaxmem=-1 -O2 -c $*$(SUFFIX)
#
#nonl.o: nonl.F
# $(CPP)
# $(FC) $(FFLAGS) $(INCS) -qmaxmem=-1 -O -c $*$(SUFFIX)
#
#paw.o: paw.F
# $(CPP)
# $(FC) $(FFLAGS) $(INCS) -O1 -c $*$(SUFFIX)
#
# special rules
#-----------------------------------------------------------------------

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

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

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

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

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

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

<span class='smallblacktext'>[ Edited ]</span>
Last edited by d-farrell2 on Thu Oct 30, 2008 5:35 pm, edited 1 time in total.

admin
Administrator
Administrator
Posts: 2921
Joined: Tue Aug 03, 2004 8:18 am
License Nr.: 458

Trouble compiling on BG/P

#2 Post by admin » Thu Nov 13, 2008 2:22 pm

Sorry, we don't have access to IBM Blue Genes, therefore I can only guess:
your error seems rather strange to me, because fortran 90 compilers should be able to handle free format code.
Also, if the gamma-only version was compiled correctly, there is no reason why the standard parallel version should not work. The .f90 files only differ by a few commented lines. Please check if mpixlcxx also does the pre-compilation correctly (i.e, is not just a parallel parser).
Last edited by admin on Thu Nov 13, 2008 2:22 pm, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#3 Post by d-farrell2 » Thu Nov 13, 2008 10:40 pm

strange - I didn't get a notification that there was a reply.

I was able to get the code to compile finally, and it seems to work (I get a hanging process or something on large numbers of nodes for some reason but I think that is a separate issue). I'll post the new makefile shortly.
Last edited by d-farrell2 on Thu Nov 13, 2008 10:40 pm, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#4 Post by d-farrell2 » Fri Nov 14, 2008 4:40 pm

Here is the BG/P makefile I used to compile VASP for the Argonne National Lab ALCF machine Intrepid :

.SUFFIXES: .inc .f .F
#-----------------------------------------------------------------------
# Makefile for RS 6000/ SP2, SP3 and possibly SP4
#
# on some systems the file mpif.h is located somewhere in the default
# include search path.
# Copying the mpif.h file to the local directory and converting it
# to f90 style does not work (because the system wide mpif.h file
# is included). One solution is to rename the mpif.h file to mpif90.h.
# If the new mpi routines (parallel_new.tar) are used only the file
# pm.inc must be changed accordingly.
#
# Attention:
# =======================
# present default optimisation is -O3, but you might try -O4 as well
#
# several files are optimized less aggressive (see bottom of the makefile),
# since agressive optimisation of those files caused VASP to bomb
# in one or the other compiler version
# because it was impossible to keep track of which file is not
# properly compiled by which version, all files that
# are problematic in one or the other version are compiled
# with lower optimisation
#
# ZHEEVX is not working properly, so please uncomment the line
# #define USE_ZHEEVX
# in subrot.F and wavepre_noio.F
#
#-----------------------------------------------------------------------

# all CPP processed fortran files have the extension .f
SUFFIX=.f

#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
BGPSYS = /bgsys/drivers/ppcfloor/
FC=$(BGPSYS)/comm/bin/mpixlf90_r
#FC=xlf90_r -qthreaded
FCL=$(FC)

#-----------------------------------------------------------------------
# C-preprocessor define any of the flags given below
# MPI generate parallel version
# NGZhalf charge density reduced in Z direction
# wNGZhalf gamma point only reduced in Z direction
# CACHE_SIZE 5001 for SP3 and Power 3
# 32768 for 550,590,3CT
# 8001 595/397 quad word systems
# scaLAPACK use scaLAPACK
#-----------------------------------------------------------------------

CPP = xlc -E -C -DHOST=\'BlueGene/P\' -DMPI -DNGZhalf -DwNGZhalf -DscaLAPACK -DScalaNBLOCK=36 \
-DBGL -DCACHE_SIZE=2000 -DMPI_BLOCK=40000 -Duse_collective -Davoidalloc \
-Davoid_async -Dno_async $*.F >$*.f

#-----------------------------------------------------------------------
# general fortran flags, none required
#-----------------------------------------------------------------------

FFLAGS = -g -I$(BGPSYS)/include -I$(BGPSYS)/comm/include -L$(BGPSYS)/lib -L/usr/lib

#-----------------------------------------------------------------------
# optimization:
# optimise for the machine on which the code is compiled
#-----------------------------------------------------------------------

OFLAG = -g -O3 -qstrict -qarch=450d -qtune=440 -qmaxmem=-1 -qalias=noaryovrlp
OFLAG_HIGH = $(OFLAG) -qhot=simd
OBJ_HIGH = davidson.o fft3dlib.o nonl.o nonlr.o

OBJ_NOOPT = none
DEBUG = -g
INCS =
INLINE = $(OFLAG)

#-----------------------------------------------------------------------
# maybe one need to set an include path (usually not required)
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# options for linking
# the following option increases the size of the data frame
# the default makefile does not include support for scaLAPACK
# since problems with scaLAPACK were reported
#
#-----------------------------------------------------------------------
LINK = -g -L$(BGPSYS)/lib -L/bgsys/local/lib/ -L$(HOME)/lib -L/opt/ibmmath/lib \
-L/soft/apps/SCALAPACK -L/soft/apps/BLACS -L/soft/apps/ESSL/lib/

#MPI = -lmpich.rts -lfmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts
SCALAPACK = -lscalapack -lblacsF77init_MPI-BGP-0 -lblacs_MPI-BGP-0

VASPLIB = /home/defarr/VASP/vasp.4.lib/

LIB = -L$(VASPLIB) \
-ldmy $(VASPLIB)/linpack_double.o \
$(VASPLIB)/lapack_double.o $(SCALAPACK) -lesslbg \
$(MPI)

#-----------------------------------------------------------------------
# specify 3d-fft to be used with VASP
#-----------------------------------------------------------------------
#FFT3D = fftmpiw.o fftmpi_map.o /bgl/local/lib/libfftw3.a fft3dlib.o
FFT3D = fftmpi.o fftmpi_map.o fft3dlib.o
#FFT3D = #fftmpi.o fftmpi_map.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 aedens.o compile_param.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 mpi.o $(LIB)
ffttest: base.o smart_allocate.o mpi.o mgrid.o random.o ffttest.o mpi.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

compile_param.o: compile_param.c Makefile

compile_param.c: Makefile
echo "char *___cpcpp=\"vasp: CPP= $(CPP)\";" > $@
echo "char *___cpopt=\"vasp: OFLAG= $(OFLAG)\";" >> $@
echo "char *___cplib=\"vasp: LIB= $(LIB)\";" >> $@
echo "char *___cplnk=\"vasp: LINK= $(LINK)\";" >> $@
echo "char *___cpf90=\"vasp: FC= $(FC)\";" >> $@

$(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
#-----------------------------------------------------------------------

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

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

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

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

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

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

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

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

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

fft3dlib.o: fft3dlib.f
$(CPP)
$(FC) $(FFLAGS) $(INCS) -qarch=450d -qtune=440 -qmaxmem=-1 -qhot=simd -qstrict -c $*$(SUFFIX)
<span class='smallblacktext'>[ Edited Fri Nov 14 2008, 05:42PM ]</span>
Last edited by d-farrell2 on Fri Nov 14, 2008 4:40 pm, edited 1 time in total.

chenweiguang
Newbie
Newbie
Posts: 17
Joined: Thu Jun 08, 2006 1:40 am

Trouble compiling on BG/P

#5 Post by chenweiguang » Tue Nov 18, 2008 6:07 am

I feel this was a careless omission of the Makefile sample
aedens.o should be added to the last of BASE line
Last edited by chenweiguang on Tue Nov 18, 2008 6:07 am, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#6 Post by d-farrell2 » Tue Nov 18, 2008 7:34 pm

I am not sure what you mean 'BASE line' - none of my makefiles have a line 'BASE'.

aedens.o is included in the SOURCE line in this makefile and the makefiles on the other machines I have used.
Last edited by d-farrell2 on Tue Nov 18, 2008 7:34 pm, edited 1 time in total.

chenweiguang
Newbie
Newbie
Posts: 17
Joined: Thu Jun 08, 2006 1:40 am

Trouble compiling on BG/P

#7 Post by chenweiguang » Wed Nov 19, 2008 2:55 am

sorry, my fault, it's SOURCES line
Last edited by chenweiguang on Wed Nov 19, 2008 2:55 am, edited 1 time in total.

admin
Administrator
Administrator
Posts: 2921
Joined: Tue Aug 03, 2004 8:18 am
License Nr.: 458

Trouble compiling on BG/P

#8 Post by admin » Wed Nov 19, 2008 3:25 pm

it is no matter where aedens is added to SOURCE, if only all called subroutines have been compiled before (which I suppose is the case here) .
Last edited by admin on Wed Nov 19, 2008 3:25 pm, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#9 Post by d-farrell2 » Fri Nov 21, 2008 4:28 pm

I found another place that said not to use the mpixlf90_r compiler, and rather use mpixlf90 - I am trying that now to see if that fixes any of my run-time troubles.
Last edited by d-farrell2 on Fri Nov 21, 2008 4:28 pm, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#10 Post by d-farrell2 » Fri Nov 21, 2008 5:31 pm

OK - so it ends up that aedens.F error ("aedens.F", line 631.63: 1506-209 (S) Character constants must end before the end of a line. ) didn't actually disappear the first time. I must have just ran 'make' again, and the code compiled.

so now, I have to type 'make' twice to get the code to compile. I wonder if this is part of my other problems...
Last edited by d-farrell2 on Fri Nov 21, 2008 5:31 pm, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#11 Post by d-farrell2 » Fri Nov 21, 2008 5:41 pm

actually - it appears as though the error doesn't prevent the binary from being built... that seems a bit odd.
Last edited by d-farrell2 on Fri Nov 21, 2008 5:41 pm, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#12 Post by d-farrell2 » Sat Nov 22, 2008 2:06 pm

OK - the aedens.F error was just simply an apostrophe in a comment that xlc didn't like. I removed the apostrophe and things compiled without trouble.
Last edited by d-farrell2 on Sat Nov 22, 2008 2:06 pm, edited 1 time in total.

job
Jr. Member
Jr. Member
Posts: 55
Joined: Tue Aug 16, 2005 7:44 am

Trouble compiling on BG/P

#13 Post by job » Thu Nov 27, 2008 3:31 pm

The error message in your initial post is due to the C preprocessor. (You can call cpp directly, there's no value in running it via the IBM C/C++ compiler)

I haven't had access to a IBM system in years, but assuming xl compilers have similar command-line options for controlling cpp as gcc, the gcc manual mentions for the -C option:
-C Do not discard comments. All comments are passed through to the output file, except for
comments in processed directives, which are deleted along with the directive.

You should be prepared for side effects when using -C; it causes the preprocessor to
treat comments as tokens in their own right. For example, comments appearing at the
start of what would be a directive line have the effect of turning that line into an
ordinary source line, since the first token on the line is no longer a #.


Now, if you look at line 631 in aedens.F, you'll see a comment line with a single quote (') used as in normal english usage. But since you have instructed CPP to treat comments as tokens, so probably it's complaining that there is no matching quote to indicate the end of the string constant. As an aside, GNU CPP does not complain about this, so one way out would be to use GNU CPP rather than IBM's if that is available.
Last edited by job on Thu Nov 27, 2008 3:31 pm, edited 1 time in total.

d-farrell2

Trouble compiling on BG/P

#14 Post by d-farrell2 » Mon Dec 01, 2008 11:47 am

I'll have to check that out, thanks.
Last edited by d-farrell2 on Mon Dec 01, 2008 11:47 am, edited 1 time in total.

Post Reply