[CPMD-list] cpmd2cube compilation
Axel Kohlmeyer
akohlmey at vitae.cmm.upenn.edu
Thu Nov 3 02:12:59 CET 2005
On Thu, 3 Nov 2005, Alex Merchant wrote:
AM> Hi Aspi
hi alex,
sorry to interrupt, but since we have not a proper configuration for
linux on power using the xlf compiler in the configure. i'd like to
clarify a few issues, so that we can add that to the code. i don't
have such a machine at my disposal here, so i'd need your help to
verify my statements.
AM> Thanks for the help, I thought about it and realised I didn't need
AM> mpif90 but should be using xlf90 and got cpmd2cube compiled using
AM> the IBM-SP4 option and made the following changes:
AM> Running on an IBM PWR5 Linux (SUSE) with ESSL stored in /usr/local/IBMMATH/essl/4.2/include
are you sure the library is stored in /.../include ????
and not in /.../lib ?
AM> 12,15c12,16
AM> < FC = xlf90 -O3 -qstrict -qarch=pwr4 -qxlf77=leadzero
AM> < FFLAGS = -WF,"-D__AIX,-DFFT_ESSL" -qsuffix=cpp=F -qmaxmem=32768
AM> < LFLAGS = -O3 -bmaxdata:2048000000 -bmaxstack:1500000000
AM> < LIBS = -lessl -bbinder:/usr/lib/bind
AM> ---
AM> > FC = xlf90_r -O3 -qstrict -qarch=pwr5 -qxlf77=leadzero
AM> > FFLAGS = -WF,"-DFFT_ESSL" -qsuffix=cpp=F -qmaxmem=32768
hmm, removing -D__AIX removes the platform detection information from
the makefile.
AM> > LFLAGS = -O3
AM> > # -bmaxdata:2048000000 -bmaxstack:1500000000
AM> > LIBS = -lessl -L/usr/local/IBMMATH/essl/4.2/include
hmm, do you _really_ need the '-L/usr/local/IBMMATH/essl/4.2/include'
here? usually a linker will honor only changes in the directory search
list _before_ you specify a library. does it link correctly without?
AM> 30c31
AM> < CFGMACH = IBM-SP4
AM> ---
AM> > CFGMACH = IBM-SP5
no this is not an SP5. the proper name would be something like
IBM-PWRLinux or IBM-PWR5-Linux.
AM> I also had to edit util.F to add the GETARG command
AM>
AM> #else
AM> CALL getarg(m,string)
AM> ! STOP 'no interface to getarg for this platform. please add it to util.F.'
no. this works, but this is not the clean way to fix this.
you should have either kept the -D__AIX directive (it is only
used in cpmd2cube to determine the getarg calling sequence).
or use -D__PWRLinux and add matching entry to the long list
of defined(__XXX) statements a few lines above.
so the change i would recommend is:
Index: Configure
===================================================================
RCS file: /users/cvsroot/cpmd/cpmd2cube/Configure,v
retrieving revision 1.17
diff -c -u -r1.17 Configure
--- Configure 29 Oct 2005 14:16:02 -0000 1.17
+++ Configure 3 Nov 2005 01:09:00 -0000
@@ -22,6 +22,7 @@
MAC-OSX-G5 SUN-ULTRA3-32bit
NEC-SX5 SUN-ULTRA3-64bit
NEC-SX6 NEC-SX6-ES
+ IBM-PWR5-Linux
Description of options:
-makefile (-m) Create the file Makefile in DEST directory
@@ -161,6 +162,13 @@
FFLAGS="-WF,\"-D__AIX,-DFFT_ESSL\" -qsuffix=cpp=F -qmaxmem=32768 "
LFLAGS="-O3 -bmaxdata:2048000000 -bmaxstack:1500000000"
LIBS="-lessl -bbinder:/usr/lib/bind"
+ ;;
+
+ "IBM-PWR5-Linux")
+ FC="xlf90 -O3 -qstrict -qarch=pwr5 -qxlf77=leadzero "
+ FFLAGS="-WF,\"-D__PWRLinux,-DFFT_ESSL\" -qsuffix=cpp=F -qmaxmem=32768 "
+ LFLAGS="-O3 "
+ LIBS="-lessl "
;;
"IBM-270")
Index: util.F
===================================================================
RCS file: /users/cvsroot/cpmd/cpmd2cube/util.F,v
retrieving revision 1.8
diff -c -u -r1.8 util.F
--- util.F 21 Oct 2005 12:11:38 -0000 1.8
+++ util.F 3 Nov 2005 01:09:00 -0000
@@ -18,7 +18,8 @@
#if defined ( __AIX ) || defined ( __SR8000 ) || defined ( __PGI ) \
|| defined ( __IFC ) || defined ( __NEC ) || defined ( __SGI ) \
|| defined ( __VPP5000 ) || defined ( __alpha ) || defined(__SUN) \
- || defined(__HP) || defined ( __OSX ) || defined ( __ALTIX )
+ || defined(__HP) || defined ( __OSX ) || defined ( __ALTIX ) \
+ || defined(__PWRLinux)
CALL GETARG(M,STRING)
#elif defined ( __T3E )
INTEGER :: ilen, ierror
AM> which I checked using the reference at
AM>
AM> http://www.cepba.upc.es/docs/ibm_doc/manfortran/lr02.htm
regards,
axel.
AM>
AM> Ta again
AM>
AM> Alex Merchant
AM>
AM>
AM> _______________________________________________
AM> CPMD-list mailing list
AM> CPMD-list at cpmd.org
AM> http://cpmd.org/mailman/listinfo/cpmd-list
AM>
--
=======================================================================
Axel Kohlmeyer e-mail: akohlmey at cmm.upenn.edu, web: www.cmm.upenn.edu
Center for Molecular Modeling -- University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.
More information about the CPMD-list
mailing list