CP2K in IBM PWR5 machinces
Axel
akoh... at gmail.com
Tue Mar 18 16:26:10 UTC 2008
dear yunfeng,
i finally found a power5 machine running linux
instead of AIX and managed to get a working
serial executable. here the individual steps:
download of lapack-lite-3.1.1.tar.gz from netlib
and unpack into the cp2k directory.
cd lapack-lite-3.1.1; cp INSTALL/make.inc.RS6K make.inc
edit make.inc to get:
FORTRAN = xlf -q64
OPTS = -O2 -qstrict -q64 -qarch=pwr5 -qcache=auto -qmaxmem=-1 -
qtune=pwr5
DRVOPTS = $(OPTS)
NOOPT = -O0 -qarch=pwr5 -qmaxmem=-1 -qtune=pwr5
LOADER = xlf -q64
make lib
then i modified the matching arch file as follows (i'll send the
whole file to teo later for updating the CVS so you only have
to 'cvs update' to get it.):
akohlmey/cp2k> cvs diff -u arch/Linux-ppc5-xlf.sopt
Index: arch/Linux-ppc5-xlf.sopt
===================================================================
RCS file: /cvsroot/cp2k/cp2k/arch/Linux-ppc5-xlf.sopt,v
retrieving revision 1.2
diff -u -r1.2 Linux-ppc5-xlf.sopt
--- arch/Linux-ppc5-xlf.sopt 25 Oct 2007 08:42:00 -0000 1.2
+++ arch/Linux-ppc5-xlf.sopt 18 Mar 2008 16:18:56 -0000
@@ -1,13 +1,46 @@
CC = gcc
-CPP = cpp
-FC = xlf95_r -qsuffix=f=f90
+CPP =
+FC = xlf95_r -qsuffix=f=F
LD = xlf95_r
AR = ar -r
-DFLAGS = -D__AIX -D__ESSL -D__FFTSG -D__FFTESSL
+DFLAGS = -WF,-D__AIX,-D__ESSL,-D__FFTSG,-D__FFTESSL
CPPFLAGS = -C $(DFLAGS) -P -traditional
-FCFLAGS = -O3 -qstrict -q64 -qarch=pwr5 -qcache=auto -qmaxmem=-1 -
qtune=pwr5
+FCFLAGS = -O2 -qstrict -q64 -qarch=pwr5 -qcache=auto -qmaxmem=-1 -
qtune=pwr5 $(DFLAGS)
+FCFLAGS2 = -O0 -qstrict -q64 -qarch=pwr5 -qcache=auto -qmaxmem=-1 -
qtune=pwr5 $(DFLAGS)
LDFLAGS = $(FCFLAGS) -L/apps/lapack-3/64/lib
-LIBS = -llapack_ppc64 -lessl /opt/ibmcmp/xlmass/4.3/lib64/
libmass_64.a
+LIBS = $(HOME)/cp2k/lapack-lite-3.1.1/lapack_RS6K.a -lessl
+CPPSHELL = -WF,-D__COMPILE_ARCH="\"$(ARCH)\"",-D__COMPILE_DATE="\"$
(shell date)\"",-D__COMPILE_HOST="\"$(shell hostname)\"",-
D__COMPILE_LASTCVS="\"$(shell tail -n1 $(SRCDIR)/CVS/Entries)\""
OBJECTS_ARCHITECTURE = machine_aix.o
+
+### To speed up compilation time ###
+cp2k_runs.o: cp2k_runs.F
+ $(FC) -c $(FCFLAGS2) $<
+f77_interface.o: f77_interface.F
+ $(FC) -c $(FCFLAGS2) $<
+
+md_run.o: md_run.F
+ $(FC) -c $(FCFLAGS2) $<
+
+geo_opt.o: geo_opt.F
+ $(FC) -c $(FCFLAGS2) $<
+cp_lbfgs_optimizer_gopt.o: cp_lbfgs_optimizer_gopt.F
+ $(FC) -c $(FCFLAGS2) $<
+
+qmmm_init.o: qmmm_init.F
+ $(FC) -c $(FCFLAGS2) $<
+
+mc_ensembles.o: mc_ensembles.F
+ $(FC) -c $(FCFLAGS2) $<
+mc_types.o: mc_types.F
+ $(FC) -c $(FCFLAGS2) $<
+mc_moves.o: mc_moves.F
+ $(FC) -c $(FCFLAGS2) $<
+
+pint_types.o: pint_types.F
+ $(FC) -c $(FCFLAGS2) $<
+
+nddo_methods.o: nddo_methods.F
+ $(FC) -c $(FCFLAGS2) $<
+
compilation went fine and the resulting executable
works nicely after raising the stack size limit via
ulimit -s unlimited (in tcsh you need: limit statcksize unlimited).
the machine has no MPI (well, it has but that is for compiling
BG/L executables), but i'll try to get a parallel executable
by compiling openmpi for myself (it is a nice and underutilized
4cpu node with 16GB memory....).
hope this helps, more later...
axel.
More information about the CP2K-user
mailing list