[CPMD-list] Compiling CPMD under Windows XP

Bin Gao gaobin at theochem.kth.se
Fri Feb 23 09:38:47 CET 2007


Dear Sirs,

I have compiled CPMD under Windows XP by using gfortran and Cygwin. Hope 
this will be useful for you. Besides I have also encountered some 
problems, so it would be appreciation of your help and suggestions!

I mainly refer to README_WINNT.txt in the non-std-inst.tar.gz package. The 
details are as follows,

1. I got the mingw build gfortran at 
http://gcc.gnu.org/wiki/GFortranBinaries (I have also tried the Cygwin 
build version, but failed because some dll files of my Cygwin are too 
old), and installed it into /cygdrive/d/Programming/gfortran

2. I got the g77 version ACML at www.developwithamd.com

3. To remove the g77 dependency of ATLAS/ACML:

3.1 compile libg77compat.c (in non-std-inst.tar.gz) with: 
/cygdrive/d/Programming/gfortran/bin/gcc -D__WINNT -c -O libg77compat.c 
-I/cygdrive/d/Programming/gfortran/include

3.2 delete xerbla.o from ATLAS/ACML, e.g. with: 
/cygdrive/d/Programming/gfortran/bin/ar d libacml.a xerbla.o

3.3 add then new object with: /cygdrive/d/Programming/gfortran/bin/ar rcsv 
libacml.a libg77compat.o

4. I copied Makefile.winnt from non-std-inst.tar.gz and renamed it to 
Makefile. Copied the patched acml as well as the file irat.inc (make sure 
it has IRAT=2).

5. I modified the Makefile with the full path of ar, cpp, gcc and gfortran 
as /cygdrive/d/Programming/gfortran/bin/cpp, etc. I changed RMF= del /f as 
RMF= rm -f.

6. Then typing make

7. During compilation, two files needed to be changed:
   7.1 File line 788 of shop_adds.f:
      PARAMETER (UMASK=-2147483648, LMASK=2147483647)
      Changed as UMASK=-2147483647
   7.2 File timec.f, I changed the lines
        REAL*4 ETIME,TARRAY(2),D
        EXTERNAL ETIME
        D=ETIME(TARRAY)
      as
        REAL*4 TARRAY(2),D
        CALL ETIME(TARRAY, D)

Finally, I got the binary cpmd.exe. It works well (usually slowly 2-3 
times than that of Linux) but the SIZE OF THE PROGRAM IS NOT AVAILABLE and 
the CPU TIME is wrong. Does anyone have some suggestions? Thank you!


Best wishes

************************************************************

Gao

Dept. of Theoretical Chemistry
School of Biotechnology
Royal Institute of Technology
Roslagstullsbacken 15
AlbaNova, S-106 91 Stockholm, Sweden

Tel: +46 8 55378421 (Office)
      +46 73 768 3084 (mobile)
Fax: +46 8 55378590

E-mail: gaobin at theochem.kth.se

URL: http://www.theochem.kth.se/people/gaobin/index.html




More information about the CPMD-list mailing list