Znn3bq.jpeg
²é¿´: 3792  |  »Ø¸´: 10

hedge

Òø³æ (СÓÐÃûÆø)


[½»Á÷] ¡¾ÇóÖú¡¿vasp°²×°Óë±àÒëÎÊÌâ(100½ð±Ò)

¸÷λ´óϺ£¬¶ÔVASP°²×°ºÍ±àÒëÎÊÌ⣬ÎÒʵÔڸе½ÃÔã¡£
ÂÛ̳ÉϵÄ×ÊÁϾø´ó¶àÊýÊÇÒÔVASP.4.6£¬vasp.4.lib£¬L_mkl_p_9.1.023,  
l_fc_pl_9.1.036ΪÀý£¬¿ÉÄÜ´ó¶àÊýÊdz­Ï®»òÖ±½ÓÒýÓùýÀ´¡£²»Åųý°´²½¾Í°à£¬±àÒë³É¹¦µÄ¡£
µ«ÊÇÏÖÔÚ¸÷ÖÖÈí¼þ²»¶Ï¸üУ¬ÆäÖÐL_mkl_p_9.1.023ÔÚRHEL5ÒÔÉϵİ汾¾Í²»Äܳɹ¦£¬GLIBC²»Æ¥Åä£¬ÍøÉÏҲûÓÐÕÒµ½½â¾ö·½·¨¡£Éý¼¶GLIBC»òµ¼Ö²»¿ÉÔ¤ÖªµÄºó¹û¡£
ͬʱmkl,ifc¼°vasp¾ùΪа汾£¬Ç°Á½¸öÉý¼¶ÁËN´ÎÁË¡£


¸÷λ¸ßÊÖ´óϺ£¬±¾ÈËÊdzõѧ£¬×ÔÒÑŪÁËһ̨×é×°8cpu·þÎñÆ÷ϹÕÛÌÚ£¬°²×°ÁËRHEL5.2¡£µ«ÊÇvasp°²×°È´Ê¼ÖÕ×°²»ÉÏ£¬°²×°¹ý³Ì°´ÕÕÂÛ̳×ÊÁÏÉϵÄÄÇÒÔSUSEΪÀýµÄ°æ±¾£¬×îºó²»ÄÜmake³É¹¦£¬´íÎóÐÅϢΪ£ºcannot find -lmkl_lapack¡£±¾´ÎÊÔ¹ýN´ÎÁË£¬ÒòΪ¶ÔmakefileµÄÐ޸ıȽϷ³Ëö£¬º¦Å¸Ĵí»ò©¸ÄÁËij´¦£¬ËùÒÔ×öÁ˲»10´ÎµÄÐ޸쬵«¶¼²»ÄÜMAKE³É¹¦¡£ÐÄ»ÖÒâÀ䣬ֻºÃÔÚÕâÀïÇóÖúÁË¡£

Ï£ÍûÓдóϺÌṩÎÒÒ»¸ö×ÔÒѱàÒë³É¹¦µÄ°²×°¹ý³Ì£¬Ï£ÍûÊÇRHEL5ÒÔÉÏϵͳµÄ¡£µ±È»Ô½ÏêϸԽºÃ£¡100½ð±Ò³êÀÍ¡£Ã¿¸ö»ØÌùÒ»¸ö½ð±Ò£¬¾Ü¾ø¹àË®£¡
±¾ÈËEMAIL: hedge80@sina.com.cn.

ͬʱÎÊһϣ¬ÎªÊ²Ã´¶ÔmakefileÎļþÒª×öÕâô¶àµÄ¸Ä¶¯£¿ÕâЩ¸Ä¶¯µÄÒÀ¾ÝÊÇʲô£¿Ã¿°²×°Ò»´Î£¨²»¹ÜÊÇÄÄÒ»¸ö°æ±¾£©¶¼Òª×öÕâô¶àµÄ¸Ä¶¯Â𣿿½±´vasp.4.libÖеÄmakefile.linuxÎļþʱÈçºÎÑ¡Ôñ£¿£¨ÀïÃæÓкܶàµÄmakefileÎļþ£©.
ÁíÍâ°²×°MklºÍifcµÄʱºò£¬Ð޸Ļ·¾³±äÁ¿Ö÷ÒªÊÇÐÞ¸Äʲô£¿£¿

ÎÒµÄÎÊÌâ¿ÉÄÜÌ«Èõ£¬µ«ºó½øÄ©Ñ§£¬Îð¹Ö¡£

[ Last edited by hedge on 2010-11-29 at 17:16 ]
»Ø¸´´ËÂ¥

» ÊÕ¼±¾ÌûµÄÌÔÌûר¼­ÍƼö

@¸öÈËÊÕ¼¯@ µÚÒ»ÐÔÔ­ÀíÔÓ VASP

» ²ÂÄãϲ»¶

» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:

» ÇÀ½ð±ÒÀ²£¡»ØÌû¾Í¿ÉÒԵõ½:

²é¿´È«²¿É¢½ðÌù

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
»ØÌûÖ§³Ö ( ÏÔʾ֧³Ö¶È×î¸ßµÄǰ 50 Ãû )

sxjsn1

½ð³æ (СÓÐÃûÆø)


¡ï ¡ï ¡ï
Сľ³æ(½ð±Ò+0.5):¸ø¸öºì°ü£¬Ð»Ð»»ØÌû½»Á÷
cenwanglai(½ð±Ò+2):лл»Ø¸´£¡ 2010-12-08 16:52:14
ÄãÒªÖªµÀÄãµÄifort icc»¹ÓÐMKLµÄ·¾¶ ÓÃp4ÄǸöMakefileÎļþ
°²×°ÉÏifort icc MKLºó»¹Òª°ÑËüÃÇsourceÒ»ÏÂ
Èçsource /opt/intel/Compiler/11.1/072/bin/intel64/ifortvars_intel64
°ÑÀïÃæFC  BLAS LAPACK·¾¶¸ÄΪÄãµÄ°²×°Â·¾¶¾ÍÐÐÁË
ÈçFC=/opt/intel/Compiler/11.1/073/bin/intel64/ifort
BLAS=-L/opt/intel/mkl/10.2.4.032/lib/em64t -lmkl_intel_ilp64 -lmkl_core -lguide -lpthread
lapack
LAPACK=-L/opt/intel/mkl/10.2.6.038/lib/em64t -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_sequential -lmkl_vml_mc -lmkl_core -liomp5
Ï£ÍûÄܶÔÄãÓÐËù°ïÖú
7Â¥2010-12-08 16:48:07
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

Prettyswan

ľ³æ (СÓÐÃûÆø)


¡ï ¡ï ¡ï
cenwanglai(½ð±Ò+3):лл£¬»¶Ó­³£À´£¡ 2010-12-01 09:44:20
hedge(½ð±Ò+16): 2010-12-01 14:27:16
ÎÒÈÏΪVASPµÄ°²×°¼¸ºõÓëLinuxµÄ·¢ÐаæÎ޹أ¬ÎÒÔÚUbuntu10.04£¨Ë«ºË£¬±¼D£©Éϰ²×°³É¹¦¹ý£¬ÔÚUbuntu10.10£¨Ëĺˣ¬Intel£©ÉÏÒ²°²×°³É¹¦¹ý£¬×òÌì¸Õ¸ÕÔÚRHEL6£¨ËĺËIntel£©Éϰ²×°³É¹¦VASP4.6¡£ÎÒÊǰ´ÕÕintel¹Ù·½ÂÛ̳ÉÏ×öµÄ£¬ËüʹÓõÄicc¡¢ifc¡¢RHELºÍintel×Ô¼ºµÄmpi¡¢mkl£»¶øÎÒʹÓõÄÊÇgcc¡¢gfortran¡¢openmpi¡¢mklºÍUbuntu£¨RHEL6Ò²Óùý£¬makefileûÓи͝£©ÎÒ·¢ÏÖÎÒ¼¸ºõûÓÐ×öʲô¸Ä¶¯¾ÍÕÕ°áÏÂÀ´ÁË¡£ÎÒ°²×°µÄ¾­Ñé±íÃ÷£ºVASPµÄ°²×°ÓëʹÓõıàÒëÆ÷ºÍÊýѧ¿âÓйأ¬Ö»Òª±àÒëÆ÷ºÍÊýѧ¿âÒ»Ñù£¨Ö÷ÒªÊÇÊýѧ¿â£©£¬makefileÎļþ¾ÍÒ»Ñù¡£

ÕâÊÇÎÒÕûÀí±àдµÄÎÒ±àÒë°²×°µÄ¹ý³Ì£¬32λµÄºÍ64λµÄ´®/²¢Ðж¼ÓУ¬RHEL6ÉÏÒ²Õմ˲½ÖèºÍÉèÖã¬Ã»Óи͝¡£ÍøÉϺܶàÌû×ÓÒѾ­¸ø³öÁ˺ÜÏêϸµÄ¹ý³ÌºÍ½â´ð£¬ÎÒÕâÀïÖ»¸ø³öÎÒ°²×°¹ý³ÌÖеÄÃüÁîºÍmakefileÐèÒªÐ޸ĵĵط½£¬ÎҸоõÓ¦¸Ã¶ÔÄãÓÐÓá£
ÒýÓûØÌû:
°²×°»·¾³:£¨1£©ubuntu10.04£¨32룩£¬±¼ D£»intel-mkl10.2.5.35£¬GFortran£¬G++4.4£»
£¨2£©ubuntu10.04£¨64룩£¬intel Core2£ª4£»intel-mkl10.2.5.35£¬GFortran£¬G
++4.4£»
£¨ÆäÖУ¬VASPµÄ°²×°°üÊÇ 4.6°æ±¾µÄ£¬GFortran¡¢GccÒÔ¼°²¢Ðа汾ÖÐʹÓÃµÄ OpenMpi£¬
¾ùΪͨ¹ýÐÂÁ¢µÂÈí¼þ°ü¹ÜÀíÆ÷×Ô¶¯°²×°£»Êýѧ¿âÎªÓ¢ÌØ¶û·ÇÉÌÒµ°æ±¾£ºhttp://software.intel.com/en-us/ ... -software-download/£©
£¨ËäȻ˵¼ÆËãÀàÈí¼þÒÀÀµÓÚÊýѧ¿â£¬¶øÊýѧ¿âÒÀÀµÓÚ´¦ÀíÆ÷£¬µ«ÊÇÎҵݲװ¾­Ñé±íÃ÷£¬¶ÔÓÚ Intel´¦ÀíÆ÷À´ËµÊýѧ¿âµÄÉèÖà 32λ¡¢64λ´®/²¢Ðа漸ºõÍêȫһÑù£¬¼¸ºõûÓÐÌ«´óµÄÇø±ð£»¶ÔÓÚ²¢Ðа汾À´ËµÖØÒªµÄÊÇÔÚÓÚ¶Ô CPP¡¢FFTºÍ MPI²¿·ÖµÄÉèÖã©
£¨±¾°²×°¹ý³ÌÖ÷Òª²Î¿¼Ó¢Ìضû¹Ù·½ÂÛ̳£ºhttp://software.intel.com/en-us/ ... -intel-mkl-in-vasp/ºÍ
http://qingyan1971.spaces.live.c ... 75FC440F6!432.entry£¬±àÒëµÄ»ù±¾ÖªÊ¶À´×ÔÓÚ UbuntuÖÐÎÄÂÛ̳ Wiki£ºhttp://wiki.ubuntu.org.cn/InstallingCompilers£©
gleerat@gleerat-desktop:~$ tar -xvf /home/gleerat/ÏÂÔØ/vasp.4.6.tar.gz -C /tmp
gleerat@gleerat-desktop:~$ tar -vxf /home/gleerat/ÏÂÔØ/l_mkl_p_10.2.5.035.tar.gz -C /tmp/
gleerat@gleerat-desktop:~$ tar -xvf /home/gleerat/ÏÂÔØ/vasp.4.lib.tar.gz -C /tmp
gleerat@gleerat-desktop:~$ cd /tmp/l_mkl_p_10.2.5.035/
gleerat@gleerat-desktop:/tmp/l_mkl_p_10.2.5.035$ ./install.sh
##¶ÔÓÚUbuntuϵͳ£¬ËüÒþ²ØÁËrootÕË»§£¬ÔÚ°²×°MKL¹ý³ÌÖпÉÒÔÓÃsudo passwd root´´½¨rootÕË»§£¬
##ÔÚʹÓÃÖ®ºóÓÃsudo passwd root -lÈ¡Ïû¡£
gleerat@gleerat-desktop:~$ cd /opt/intel/mkl/10.2.5.035/interfaces/fftw3xf
gleerat@gleerat-desktop:/opt/intel/mkl/10.2.5.035/interfaces/fftw3xf$ gedit makefile
##ÐÞ¸ÄmakefileÎļþ£¬½«i©P¶¼¸Ä³Égcc
gleerat@gleerat-desktop:/opt/intel/mkl/10.2.5.035/interfaces/fftw3xf$ make libem64t compiler
=gcc
gleerat@gleerat-desktop:/opt/intel/mkl/10.2.5.035/interfaces/fftw3xf$ sudo cp libfftw3xf_gcc.a /
opt/intel/mkl/10.2.5.035/lib/em64t/
gleerat@gleerat-desktop:/opt/intel/mkl/10.2.5.035/interfaces/fftw3xf$ cd /tmp/vasp.4.lib
gleerat@gleerat-desktop:/tmp/vasp.4.lib$ export LC_ALL=C
gleerat@gleerat-desktop:/tmp/vasp.4.lib$ make -f makefile.linux_gfortran
rm: cannot remove `libdmy.a': No such file or directory
make: [libdmy.a] Error 1 (ignored)
ar vq libdmy.a preclib.o timing_.o derrf_.o dclock_.o  diolib.o dlexlib.o drdatab.o
ar: creating libdmy.a
a - preclib.o
a - timing_.o
a - derrf_.o
a - dclock_.o
a - diolib.o
a - dlexlib.o
a - drdatab.o
gleerat@gleerat-desktop:/tmp/vasp.4.lib$ make -f makefile.linux_gfortran
make: `libdmy.a' is up to date.
gleerat@gleerat-desktop:/tmp/vasp.4.lib$ cd /tmp/vasp.4.6
gleerat@gleerat-desktop:/tmp/vasp.4.6$ gedit makefile.linux_gfortran
##ÐÞ¸Ämakefile.linux_gfortranÖеÄÊýѧ¿âÉèÖÃ(32λ)£º
# Atlas based libraries
#ATLASHOME= /usr/lib/blas/threaded-atlas
#BLAS=   -L/usr/lib/blas/atlas -lblas
#BLAS=   -L$(ATLASHOME)  -lf77blas -latlas
# use specific libraries (default library path points to other libraries)
#BLAS= $(ATLASHOME)/libf77blas.a $(ATLASHOME)/libatlas.a
# use the mkl Intel libraries for p4 (www.intel.com)
BLAS= -L/opt/intel/mkl/10.2.3.035/lib/32 -lmkl_intel -lpthread -lmkl_sequential -lmkl_core
# LAPACK, simplest use vasp.4.lib/lapack_double
#LAPACK= ../vasp.4.lib/lapack_double.o
# use atlas optimized part of lapack
#LAPACK= ../vasp.4.lib/lapack_atlas.o  -llapack -lblas# use the mkl Intel lapack
LAPACK= -L/opt/intel/mkl/10.2.5.035/lib/32 -lmkl_intel -lmkl_lapack -lmkl_sequential -lmkl_core
-lpthread
#LAPACK= -L/usr/lib/lapack/atlas -llapack
#-----------------------------------------------------------------------
##ÐÞ¸Ämakefile.linux_gfortranÖеÄÊýѧ¿âÉèÖÃ(64λ)´®ÐУ¦²¢ÐУº
# Atlas based libraries
#ATLASHOME= /usr/lib/blas/threaded-atlas
#BLAS=   -L/usr/lib/blas/atlas -lblas
#BLAS=   -L$(ATLASHOME)  -lf77blas -latlas
# use specific libraries (default library path points to other libraries)
#BLAS= $(ATLASHOME)/libf77blas.a $(ATLASHOME)/libatlas.a
# use the mkl Intel libraries for p4 (www.intel.com)
BLAS= -L/opt/intel/mkl/10.2.3.035/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthre
ad
# LAPACK, simplest use vasp.4.lib/lapack_double
#LAPACK= ../vasp.4.lib/lapack_double.o
# use atlas optimized part of lapack
#LAPACK= ../vasp.4.lib/lapack_atlas.o  -llapack -lblas
# use the mkl Intel lapack
LAPACK= -L/opt/intel/mkl/10.2.5.035/lib/em64t -lmkl_intel_lp64  -lmkl_sequential -lmkl_core -lpt
hread
#LAPACK= -L/usr/lib/lapack/atlas -llapack
#   ££²¢Ðа汾ÐèÒªµÄ¶îÍâÉèÖ㺠  
#££½«CPP×¢Ê͵ô£º
#CPP    = $(CPP_) -DHOST=\"LinuxGfortran\" \
          -Dkind8 -DNGXhalf -DCACHE_SIZE=2000 -DGfortran -Davoidalloc \
#          -DRPROMU_DGEMV
##ÐÞ¸Ägeneral fortran flags£º
FFLAGS =  -I/opt/intel/mkl/10.2.5.035/include/fftw -FR -lowercase -ffree-form -ffree-line-length-n
one
#££½«fft libraries×¢Ê͵ô£º
#FFT3D   = fft3dfurth.o fft3dlib.o
#FFT3D   = fftw3d+furth.o fft3dlib.o
##MPI²¿·ÖµÄÐ޸ģº
FC=mpif90
FCL=$(FC)
CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxGfortran\" \
     -Dkind8 -DNGZhalf -DCACHE_SIZE=2000 -DPGF90 -Davoidalloc -DRPROMU_DGEMV -DscaLA
PACK
££¶ÔCPPÌí¼Ó-DscaLAPACK²»ÊDZØÐëµÄ
#BLACS=/usr/local/BLACS_lam
#SCA_= /usr/local/SCALAPACK_lam
#SCA= $(SCA_)/scalapack_LINUX.a $(SCA_)/pblas_LINUX.a $(SCA_)/tools_LINUX.a \
# $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a $(BLACS)/LIB/blacs_MPI-LINUX-0.a $(BLACS)/LIB/bla
csF77init_MPI-LINUX-0.aSCA= /opt/intel/mkl/10.2.5.035/lib/em64t/libmkl_scalapack_lp64.a /opt/intel/mkl/10.2.5.035/lib/
em64t/libmkl_blacs_openmpi_lp64.a
LIB     = -L../vasp.4.lib -ldmy  \
      ../vasp.4.lib/linpack_double.o $(LAPACK) \
      $(SCA) $(BLAS)
# FFT: only option  fftmpi.o with fft3dlib of Juergen Furthmueller
FFT3D   = fftmpi.o fftmpi_map.o fft3dlib.o /opt/intel/mkl/10.2.5.035/lib/em64t/libfftw3xf_gcc.a
££libfftw3xf_gcc.aÐèÒªÊÂÏÈÉú³É£¬È»ºó¿½±´µ½¸ÃĿ¼ÖÐ
#-----------------------------------------------------------------------
gleerat@gleerat-desktop:/tmp/vasp.4.6$ sudo vim /etc/ld.so.conf.d/mkl.conf
##½«Êýѧ¿âµÄ·¾¶Ð´ÈëconfÎļþ£º
  /opt/intel/mkl/10.2.5.035/lib/32
#дÈëMPIµÄ»·¾³±äÁ¿£º
  /usr/lib/openmpi/lib
  /usr/bin
#-----------------------------------------------------------------------
gleerat@gleerat-desktop:/tmp/vasp.4.6$ sudo  ldconfig
gleerat@gleerat-desktop:/tmp/vasp.4.6$ make -f makefile.linux_gfortran
gleerat@gleerat-desktop:/tmp/vasp.4.6$ sudo cp ./vasp /usr/bin
##Èç¹ûÊDz¢Ðа汾µÄ£¬×îºÃ½«¿ÉÖ´ÐÐÎļþÖØÃüÃûΪvaspmpiÒÔ±ãÓë´®Ðа汾ÏàÇø±ð
gleerat@gleerat-desktop:/tmp/vasp.4.6$ cd /home/gleerat/vasp/accurate
gleerat@gleerat-desktop:~/vasp/accurate$ vasp

¾Ý˵£¬ÔÚIntelƽ̨ÉÏʹÓÃIFC¡¢ICC¡¢MKL×î¿ì£¬ÁíÍ⣬ʹÓÃIFC¼ÆËã´óÌåϵÓÐʱ»á³öÏÖSegment Fault£¬µ«ÊÇͬÑùµÄÌåϵÕâ¸öÎÊÌâÔÚGfortranÉÏûÓгöÏÖ¹ý£¬ËùÒÔÎÒÒ»Ö±ÓÃGfortran£»¹ØÓÚÕâ¸öÎÊÌâ¼ûhttp://muchong.com/bbs/viewthread.php?tid=2583137ºÍhttp://muchong.com/bbs/viewthread.php?tid=2493388
Ï£Íû¶ÔÄãÓÐÓá£

[ Last edited by Prettyswan on 2010-12-1 at 22:43 ]

» ±¾ÌûÒÑ»ñµÃµÄºì»¨£¨×îÐÂ10¶ä£©

6Â¥2010-12-01 09:25:36
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
ÆÕͨ»ØÌû
¡ï
hedge(½ð±Ò+2): 2010-11-29 17:29:56
zzy870720z(½ð±Ò+1):ллָ½Ì 2010-11-29 22:39:31
ÐÞ¸ÄmakefileÊÇÒòΪvaspµÄÔÚÿ¸ömakefileÖж¼ÌṩÁ˺ܶàÖÖÑ¡Ôñ£¬ËùÒÔÔÚʹÓõÄʱºò¿ÉÒÔ¸ù¾Ýʵ¼ÊÇé¿öÑ¡Ôñ
ÄãµÄÎÊÌâûÓÐÕÒµ½lmkl_lapackÕâÑùÒ»¸ö¿âº¯Êý£¬ÄãÈ·¶¨mkl°²×°ºÃÁ˶øÇÒÕýÈ·µÄ·¾¶Ìí¼Óµ½makefileÀïÁËÂð
2Â¥2010-11-29 17:05:21
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

hedge

Òø³æ (СÓÐÃûÆø)


ÒýÓûØÌû:
Originally posted by sunyang1988 at 2010-11-29 17:05:21:
ÐÞ¸ÄmakefileÊÇÒòΪvaspµÄÔÚÿ¸ömakefileÖж¼ÌṩÁ˺ܶàÖÖÑ¡Ôñ£¬ËùÒÔÔÚʹÓõÄʱºò¿ÉÒÔ¸ù¾Ýʵ¼ÊÇé¿öÑ¡Ôñ
ÄãµÄÎÊÌâûÓÐÕÒµ½lmkl_lapackÕâÑùÒ»¸ö¿âº¯Êý£¬ÄãÈ·¶¨mkl°²×°ºÃÁ˶øÇÒÕýÈ·µÄ·¾¶Ìí¼Óµ½makefileÀïÁËÂð

IPO link: can not find -lmkl_lapack
ifort:error:problem during multi-file optimization complication(code 1)
make:***[vasp] Error 1


makefileÎļþ£º
µÚ128ÐиÄΪ£º
BLAS=-L/opt/intel/mkl/9.1.023/lib/em64t -lmkl_em64t -lguide -lpthread

ËùÓеݲװĬÈÏ¡£
3Â¥2010-11-29 19:58:00
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

hedge

Òø³æ (СÓÐÃûÆø)


ÒýÓûØÌû:
Originally posted by hedge at 2010-11-29 16:29:59:
¸÷λ´óϺ£¬¶ÔVASP°²×°ºÍ±àÒëÎÊÌ⣬ÎÒʵÔڸе½ÃÔã¡£
ÂÛ̳ÉϵÄ×ÊÁϾø´ó¶àÊýÊÇÒÔVASP.4.6£¬vasp.4.lib£¬L_mkl_p_9.1.023,  
l_fc_pl_9.1.036ΪÀý£¬¿ÉÄÜ´ó¶àÊýÊdz­Ï®»òÖ±½ÓÒýÓùýÀ´¡£²»Åųý°´²½¾Í°à£¬±àÒë³É¹¦µÄ¡£ ...

È«²¿µÄmakefileÎļþ£º

.SUFFIXES: .inc .f .f90 .F
#-----------------------------------------------------------------------
# Makefile for Intel Fortran compiler for P4 systems
#
# The makefile was tested only under Linux on Intel platforms
# (Suse 5.3- Suse 9.0)
# the followin compiler versions have been tested
# 5.0, 6.0, 7.0 and 7.1 (some 8.0 versions seem to fail compiling the code)
# presently we recommend version 7.1 or 7.0, since these
# releases have been used to compile the present code versions
#
# it might be required to change some of library pathes, since
# LINUX installation vary a lot
# Hence check ***ALL**** options in this makefile very carefully
#-----------------------------------------------------------------------
#
# BLAS must be installed on the machine
# there are several options:
# 1) very slow but works:
#   retrieve the lapackage from ftp.netlib.org
#   and compile the blas routines (BLAS/SRC directory)
#   please use g77 or f77 for the compilation. When I tried to
#   use pgf77 or pgf90 for BLAS, VASP hang up when calling
#   ZHEEV  (however this was with lapack 1.1 now I use lapack 2.0)
# 2) most desirable: get an optimized BLAS
#
# the two most reliable packages around are presently:
# 3a) Intels own optimised BLAS (PIII, P4, Itanium)
#     http://developer.intel.com/software/products/mkl/
#   this is really excellent when you use Intel CPU's
#
# 3b) or obtain the atlas based BLAS routines
#     http://math-atlas.sourceforge.net/
#   you certainly need atlas on the Athlon, since the  mkl
#   routines are not optimal on the Athlon.
#   If you want to use atlas based BLAS, check the lines around LIB=
#
# 3c) mindblowing fast SSE2 (4 GFlops on P4, 2.53 GHz)
#   Kazushige Goto's BLAS
#   http://www.cs.utexas.edu/users/kgoto/signup_first.html
#
#-----------------------------------------------------------------------

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

#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
#FC=ifc
# fortran linker
#FCL=$(FC)


#-----------------------------------------------------------------------
# whereis CPP ?? (I need CPP, can't use gcc with proper options)
# that's the location of gcc for SUSE 5.3
#
#  CPP_   =  /usr/lib/gcc-lib/i486-linux/2.7.2/cpp -P -C
#
# that's probably the right line for some Red Hat distribution:
#
#  CPP_   =  /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -P -C
#
#  SUSE X.X, maybe some Red Hat distributions:

CPP_ =  ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)

#-----------------------------------------------------------------------
# possible options for CPP:
# NGXhalf             charge density   reduced in X direction
# wNGXhalf            gamma point only reduced in X direction
# avoidalloc          avoid ALLOCATE if possible
# IFC                 work around some IFC bugs
# CACHE_SIZE          1000 for PII,PIII, 5000 for Athlon, 8000-12000 P4
# RPROMU_DGEMV        use DGEMV instead of DGEMM in RPRO (depends on used BLAS)
# RACCMU_DGEMV        use DGEMV instead of DGEMM in RACC (depends on used BLAS)
#-----------------------------------------------------------------------

#CPP     = $(CPP_)  -DHOST=\"LinuxIFC\" \
          -Dkind8 -DNGXhalf -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc \
#          -DRPROMU_DGEMV  -DRACCMU_DGEMV

#-----------------------------------------------------------------------
# general fortran flags  (there must a trailing blank on this line)
#-----------------------------------------------------------------------

FFLAGS =  -FR -lowercase -assume byterecl

#-----------------------------------------------------------------------
# optimization
# we have tested whether higher optimisation improves performance
# -axK  SSE1 optimization,  but also generate code executable on all mach.
#       xK improves performance somewhat on XP, and a is required in order
#       to run the code on older Athlons as well
# -xW   SSE2 optimization
# -axW  SSE2 optimization,  but also generate code executable on all mach.
# -tpp6 P3 optimization
# -tpp7 P4 optimization
#-----------------------------------------------------------------------

OFLAG=-O3 -xW -tpp7

OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =

OBJ_NOOPT =
DEBUG  = -FR -O0
INLINE = $(OFLAG)


#-----------------------------------------------------------------------
# the following lines specify the position of BLAS  and LAPACK
# on P4, VASP works fastest with the libgoto library
# so that's what I recommend
#-----------------------------------------------------------------------

# Atlas based libraries
#ATLASHOME= $(HOME)/archives/BLAS_OPT/ATLAS/lib/Linux_P4SSE2/
#BLAS=   -L$(ATLASHOME)  -lf77blas -latlas

# use specific libraries (default library path might point to other libraries)
#BLAS= $(ATLASHOME)/libf77blas.a $(ATLASHOME)/libatlas.a

# use the mkl Intel libraries for p4 (www.intel.com)
# mkl.5.1
# set -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines
#BLAS=-L/opt/intel/mkl/9.1.023/lib/em64t -lmkl_em64t -lguide -lpthread

# mkl.5.2 requires also to -lguide library
# set -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines
#BLAS=-L/opt/intel/mkl/lib/32 -lmkl_p4 -lguide -lpthread

# even faster Kazushige Goto's BLAS
# http://www.cs.utexas.edu/users/kgoto/signup_first.html
#BLAS=  /opt/libs/libgoto/libgoto_p4_512-r0.6.so

# LAPACK, simplest use vasp.4.lib/lapack_double
LAPACK= ../vasp.4.lib/lapack_double.o

# use atlas optimized part of lapack
#LAPACK= ../vasp.4.lib/lapack_atlas.o  -llapack -lcblas

# use the mkl Intel lapack
LAPACK= -lmkl_lapack

#-----------------------------------------------------------------------

#LIB  = -L../vasp.4.lib -ldmy \
     ../vasp.4.lib/linpack_double.o $(LAPACK) \
     $(BLAS)

# options for linking (for compiler version 6.X, 7.1) nothing is required
LINK    =
# compiler version 7.0 generates some vector statments which are located
# in the svml library, add the LIBPATH and the library (just in case)
#LINK    =  -L/opt/intel/compiler70/ia32/lib/ -lsvml

#-----------------------------------------------------------------------
# fft libraries:
# VASP.4.6 can use fftw.3.0.X (http://www.fftw.org)
# since this version is faster on P4 machines, we recommend to use it
#-----------------------------------------------------------------------

#FFT3D   = fft3dfurth.o fft3dlib.o
#FFT3D   = fftw3d.o fft3dlib.o   /opt/libs/fftw-3.0.1/lib/libfftw3.a


#=======================================================================
# MPI section, uncomment the following lines
#
# one comment for users of mpich or lam:
# You must *not* compile mpi with g77/f77, because f77/g77            
# appends *two* underscores to symbols that contain already an        
# underscore (i.e. MPI_SEND becomes mpi_send__).  The pgf90/ifc
# compilers however append only one underscore.
# Precompiled mpi version will also not work !!!
#
# We found that mpich.1.2.1 and lam-6.5.X to lam-7.0.4 are stable
# mpich.1.2.1 was configured with
#  ./configure -prefix=/usr/local/mpich_nodvdbg -fc="pgf77 -Mx,119,0x200000"  \
# -f90="pgf90 " \
# --without-romio --without-mpe -opt=-O \
#
# lam was configured with the line
#  ./configure  -prefix /opt/libs/lam-7.0.4 --with-cflags=-O -with-fc=ifc \
# --with-f77flags=-O --without-romio
#
# please note that you might be able to use a lam or mpich version
# compiled with f77/g77, but then you need to add the following
# options: -Msecond_underscore (compilation) and -g77libs (linking)
#
# !!! Please do not send me any queries on how to install MPI, I will
# certainly not answer them !!!!
#=======================================================================
#-----------------------------------------------------------------------
# fortran linker for mpi: if you use LAM and compiled it with the options
# suggested above,  you can use the following line
#-----------------------------------------------------------------------

FC=mpif90
FCL=$(FC)

#-----------------------------------------------------------------------
# additional options for CPP in parallel version (see also above):
# NGZhalf               charge density   reduced in Z direction
# wNGZhalf              gamma point only reduced in Z direction
# scaLAPACK             use scaLAPACK (usually slower on 100 Mbit Net)
#-----------------------------------------------------------------------

CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
     -Dkind8 -DNGZhalf -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc \
     -DMPI_BLOCK=500  \
    -DRPROMU_DGEMV  -DRACCMU_DGEMV

#-----------------------------------------------------------------------
# location of SCALAPACK
# if you do not use SCALAPACK simply uncomment the line SCA
#-----------------------------------------------------------------------

BLACS=$(HOME)/archives/SCALAPACK/BLACS/
SCA_=$(HOME)/archives/SCALAPACK/SCALAPACK

#SCA= $(SCA_)/libscalapack.a  \
$(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a $(BLACS)/LIB/blacs_MPI-LINUX-0.a $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a

#SCA=

#-----------------------------------------------------------------------
# libraries for mpi
#-----------------------------------------------------------------------

LIB     = -L../vasp.4.lib -ldmy  \
      ../vasp.4.lib/linpack_double.o $(LAPACK) \
      $(SCA) $(BLAS)

# FFT: fftmpi.o with fft3dlib of Juergen Furthmueller
FFT3D   = fftmpi.o fftmpi_map.o fft3dlib.o

# fftw.3.0.1 is slighly faster and should be used if available
#FFT3D   = fftmpiw.o fftmpi_map.o fft3dlib.o   /opt/libs/fftw-3.0.1/lib/libfftw3.a

#-----------------------------------------------------------------------
# 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) -FR -lowercase -O1 -tpp7 -xW -prefetch- -unroll0  -vec_report3 -c $*$(SUFFIX)
fft3dfurth.o : fft3dfurth.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

radial.o : radial.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symlib.o : symlib.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symmetry.o : symmetry.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

dynbr.o : dynbr.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

broyden.o : broyden.F
        $(CPP)
        $(FC) -FR -lowercase -O2 -c $*$(SUFFIX)

us.o : us.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

wave.o : wave.F
        $(CPP)
        $(FC) -FR -lowercase -O0 -c $*$(SUFFIX)

LDApU.o : LDApU.F
        $(CPP)
        $(FC) -FR -lowercase -O2 -c $*$(SUFFIX)
4Â¥2010-11-29 20:34:50
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
¡ï
mazuju028(½ð±Ò+1):лл½»Á÷ 2010-11-30 08:18:11
hedge(½ð±Ò+2): 2010-11-30 09:25:05
ÒýÓûØÌû:
#-----------------------------------------------------------------------
# the following lines specify the position of BLAS  and LAPACK
# on P4, VASP works fastest with the libgoto library
# so that's what I recommend
#-----------------------------------------------------------------------

# Atlas based libraries
#ATLASHOME= $(HOME)/archives/BLAS_OPT/ATLAS/lib/Linux_P4SSE2/
#BLAS=   -L$(ATLASHOME)  -lf77blas -latlas

# use specific libraries (default library path might point to other libraries)
#BLAS= $(ATLASHOME)/libf77blas.a $(ATLASHOME)/libatlas.a

# use the mkl Intel libraries for p4 (www.intel.com)
# mkl.5.1
# set -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines
#BLAS=-L/opt/intel/mkl/9.1.023/lib/em64t -lmkl_em64t -lguide -lpthread

# mkl.5.2 requires also to -lguide library
# set -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines
#BLAS=-L/opt/intel/mkl/lib/32 -lmkl_p4 -lguide -lpthread

# even faster Kazushige Goto's BLAS
# http://www.cs.utexas.edu/users/kgoto/signup_first.html
#BLAS=  /opt/libs/libgoto/libgoto_p4_512-r0.6.so

Äãûָ¶¨blas°¡
¾ÍËãÖ¸¶¨£¬¹À¼ÆÄãÖ¸¶¨µÄÄÇÈý¸öÒ²²»È«
ºóÃæÄǼ¸¸ö¸Ä³ÉÕâЩÊÔÊÔ
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
5Â¥2010-11-29 22:47:36
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

enola

¾èÖú¹ó±ö (ÕýʽдÊÖ)


ÒýÓûØÌû:
Originally posted by hedge at 2010-11-29 20:34:50:


È«²¿µÄmakefileÎļþ£º

.SUFFIXES: .inc .f .f90 .F
#-----------------------------------------------------------------------
# Makefile for Intel Fortran compiler for P4 systems
#
# The make ...

¸ÐлhedgeµÄmakefile
8Â¥2010-12-18 18:00:12
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

dickli2008

Òø³æ (СÓÐÃûÆø)


¡ï ¡ï ¡ï ¡ï
Сľ³æ(½ð±Ò+0.5):¸ø¸öºì°ü£¬Ð»Ð»»ØÌû½»Á÷
sunyang1988(½ð±Ò+3):ÐÁ¿àÁË 2010-12-25 22:49:27
È«²¿µÄmakefile
.SUFFIXES: .inc .f .f90 .F
#-----------------------------------------------------------------------
# Makefile for Intel Fortran compiler for Pentium/Athlon/Opteron
# bases systems
# we recommend this makefile for both Intel as well as AMD systems
# for AMD based systems appropriate BLAS and fftw libraries are
# however mandatory (whereas they are optional for Intel platforms)
#
# The makefile was tested only under Linux on Intel and AMD platforms
# the following compiler versions have been tested:
#  - ifc.7.1  works stable somewhat slow but reliably
#  - ifc.8.1  fails to compile the code properly
#  - ifc.9.1  recommended (both for 32 and 64 bit)
#  - ifc.10.1 partially recommended (both for 32 and 64 bit)
#             tested build 20080312 Package ID: l_fc_p_10.1.015
#             the gamma only mpi version can not be compiles
#             using ifc.10.1
#
# it might be required to change some of library pathes, since
# LINUX installation vary a lot
# Hence check ***ALL*** options in this makefile very carefully
#-----------------------------------------------------------------------
#
# BLAS must be installed on the machine
# there are several options:
# 1) very slow but works:
#   retrieve the lapackage from ftp.netlib.org
#   and compile the blas routines (BLAS/SRC directory)
#   please use g77 or f77 for the compilation. When I tried to
#   use pgf77 or pgf90 for BLAS, VASP hang up when calling
#   ZHEEV  (however this was with lapack 1.1 now I use lapack 2.0)
# 2) more desirable: get an optimized BLAS
#
# the two most reliable packages around are presently:
# 2a) Intels own optimised BLAS (PIII, P4, PD, PC2, Itanium)
#     http://developer.intel.com/software/products/mkl/
#   this is really excellent, if you use Intel CPU's
#
# 2b) probably fastest SSE2 (4 GFlops on P4, 2.53 GHz, 16 GFlops PD,
#     around 30 GFlops on Quad core)
#   Kazushige Goto's BLAS
#   http://www.cs.utexas.edu/users/kgoto/signup_first.html
#   http://www.tacc.utexas.edu/resources/software/
#
#-----------------------------------------------------------------------

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

#-----------------------------------------------------------------------
# fortran compiler and linker
#-----------------------------------------------------------------------
FC=ifort
# fortran linker
FCL=$(FC)


#-----------------------------------------------------------------------
# whereis CPP ?? (I need CPP, can't use gcc with proper options)
# that's the location of gcc for SUSE 5.3
#
#  CPP_   =  /usr/lib/gcc-lib/i486-linux/2.7.2/cpp -P -C
#
# that's probably the right line for some Red Hat distribution:
#
#  CPP_   =  /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -P -C
#
#  SUSE X.X, maybe some Red Hat distributions:

CPP_ =  ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)

#-----------------------------------------------------------------------
# possible options for CPP:
# NGXhalf             charge density   reduced in X direction
# wNGXhalf            gamma point only reduced in X direction
# avoidalloc          avoid ALLOCATE if possible
# PGF90               work around some for some PGF90 / IFC bugs
# CACHE_SIZE          1000 for PII,PIII, 5000 for Athlon, 8000-12000 P4, PD
# RPROMU_DGEMV        use DGEMV instead of DGEMM in RPRO (depends on used BLAS)
# RACCMU_DGEMV        use DGEMV instead of DGEMM in RACC (depends on used BLAS)
#-----------------------------------------------------------------------

#CPP     = $(CPP_)  -DHOST=\"LinuxIFC\" \
          -Dkind8 -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
#          -DRPROMU_DGEMV  -DRACCMU_DGEMV

#-----------------------------------------------------------------------
# general fortran flags  (there must a trailing blank on this line)
# byterecl is strictly required for ifc, since otherwise
# the WAVECAR file becomes huge
#-----------------------------------------------------------------------

FFLAGS =  -I/opt/intel/Compiler/11.0/074/mkl/include/fftw \
          -I/opt/intel/Compiler/11.0/074/include \
          -I/opt/intel/Compiler/11.0/074/mkl/include \
          -FR -lowercase -assume byterecl

#-----------------------------------------------------------------------
# optimization
# we have tested whether higher optimisation improves performance
# -axK  SSE1 optimization,  but also generate code executable on all mach.
#       xK improves performance somewhat on XP, and a is required in order
#       to run the code on older Athlons as well
# -xW   SSE2 optimization
# -axW  SSE2 optimization,  but also generate code executable on all mach.
# -tpp6 P3 optimization
# -tpp7 P4 optimization
#-----------------------------------------------------------------------

# ifc.9.1, ifc.10.1 recommended
OFLAG=-O3

OFLAG_HIGH = $(OFLAG)
OBJ_HIGH =
OBJ_NOOPT =
DEBUG  = -FR -O0
INLINE = $(OFLAG)

#-----------------------------------------------------------------------
# the following lines specify the position of BLAS  and LAPACK
# VASP works fastest with the libgoto library
# so that's what we recommend
#-----------------------------------------------------------------------

# mkl.10.0
# set -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines
BLAS= -L/opt/intel/Compiler/11.0/074/mkl/lib/em64t -lmkl -lpthread

# even faster for VASP Kazushige Goto's BLAS
# http://www.cs.utexas.edu/users/kgoto/signup_first.html
# parallel goto version requires sometimes -libverbs
#BLAS=  /opt/libs/libgoto/libgoto.so

# LAPACK, simplest use vasp.5.lib/lapack_double
LAPACK= ../vasp.5.lib/lapack_double.o

# use the mkl Intel lapack
#LAPACK= -lmkl_lapack

#-----------------------------------------------------------------------

#LIB  = -L../vasp.5.lib -ldmy \
     ../vasp.5.lib/linpack_double.o $(LAPACK) \
     $(BLAS)

# options for linking, nothing is required (usually)
LINK    =

#-----------------------------------------------------------------------
# fft libraries:
# VASP.5.2 can use fftw.3.1.X (http://www.fftw.org)
# since this version is faster on P4 machines, we recommend to use it
#-----------------------------------------------------------------------

#FFT3D   = fft3dfurth.o fft3dlib.o

# alternatively: fftw.3.1.X is slighly faster and should be used if available
#FFT3D   = fftw3d.o fft3dlib.o   /opt/libs/fftw-3.1.2/lib/libfftw3.a


#=======================================================================
# MPI section, uncomment the following lines until
#    general  rules and compile lines
# presently we recommend OPENMPI, since it seems to offer better
# performance than lam or mpich
#
# !!! Please do not send me any queries on how to install MPI, I will
# certainly not answer them !!!!
#=======================================================================
#-----------------------------------------------------------------------
# fortran linker for mpi
#-----------------------------------------------------------------------

FC=mpif90
FCL=$(FC)

#-----------------------------------------------------------------------
# additional options for CPP in parallel version (see also above):
# NGZhalf               charge density   reduced in Z direction
# wNGZhalf              gamma point only reduced in Z direction
# scaLAPACK             use scaLAPACK (usually slower on 100 Mbit Net)
#-----------------------------------------------------------------------

CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
     -Dkind8 -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
     -DMPI_BLOCK=8000  -DRPROMU_DGEMV  -DRACCMU_DGEMV

#-----------------------------------------------------------------------
# location of SCALAPACK
# if you do not use SCALAPACK simply leave that section commented out
#-----------------------------------------------------------------------

#BLACS=$(HOME)/archives/SCALAPACK/BLACS/
#SCA_=$(HOME)/archives/SCALAPACK/SCALAPACK

#SCA= $(SCA_)/libscalapack.a  \
# $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a $(BLACS)/LIB/blacs_MPI-LINUX-0.a $(BLACS)/LIB/blacsF77init_MPI-LINUX-0.a

SCA=

#-----------------------------------------------------------------------
# libraries for mpi
#-----------------------------------------------------------------------

LIB     = -L../vasp.5.lib -ldmy  \
      ../vasp.5.lib/linpack_double.o  \
      -L/opt/intel/Compiler/11.0/074/mkl/lib/em64t \
      -lfftw3xf_gnu -lmkl_emt64t -lguide -lpthread -lm \
      -L/opt/intel/Compiler/11.0/074/lib/intel64 -lsvml -limf \
      $(LAPACK) $(BLAS) $(SCA)

# FFT: fftmpi.o with fft3dlib of Juergen Furthmueller
FFT3D   = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o \
        /opt/intel/Compiler/11.0/074/mkl/lib/em64t/libfftw3xf_gnu.a

# alternatively: fftw.3.1.X is slighly faster and should be used if available
#FFT3D   = fftmpi.o fftmpi_map.o fftw3d.o fft3dlib.o \
      /opt/intel/Compiler/11.0/074/mkl/lib/em64t/libfftw3xf_gnu.a

#-----------------------------------------------------------------------
# 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       xclib.o     xclib_grad.o \
         radial.o   pseudo.o   mgrid.o    gridq.o     ebs.o  \
         mkpoints.o wave.o     wave_mpi.o  wave_high.o  \
         $(BASIC)   nonl.o     nonlr.o    nonl_high.o dfast.o    choleski2.o \
         mix.o      hamil.o    xcgrad.o   xcspin.o    potex1.o   potex2.o  \
         metagga.o constrmag.o cl_shift.o relativistic.o LDApU.o \
         paw_base.o egrad.o    pawsym.o   pawfock.o  pawlhf.o    paw.o   \
         mkpoints_full.o       charge.o   dipol.o    pot.o  \
         dos.o      elf.o      tet.o      tetweight.o hamil_rot.o \
         steep.o    chain.o    dyna.o     sphpro.o    us.o  core_rel.o \
         aedens.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  \
         chgloc.o   fast_aug.o fock.o     mkpoints_change.o sym_grad.o \
         mymath.o   internals.o dimer_heyden.o dvvtrajectory.o vdwforcefield.o \
         hamil_high.o nmr.o    force.o \
         pead.o     subrot.o   subrot_scf.o pwlhf.o  gw_model.o optreal.o   davidson.o \
         electron.o rot.o  electron_all.o shm.o    pardens.o  paircorrection.o \
         optics.o   constr_cell_relax.o   stm.o    finite_diff.o elpol.o    \
         hamil_lr.o rmm-diis_lr.o  subrot_cluster.o subrot_lr.o \
         lr_helper.o hamil_lrf.o   elinear_response.o ilinear_response.o \
         linear_optics.o linear_response.o   \
         setlocalpp.o  wannier.o electron_OEP.o electron_lhf.o twoelectron4o.o \
         ratpol.o screened_2e.o wave_cacher.o chi_base.o wpot.o local_field.o \
         ump2.o bse.o acfdt.o chi.o sydmat.o

INC=

vasp: $(SOURCE) $(FFT3D) $(INC) main.o
        rm -f vasp
        $(FCL) -o vasp main.o  $(SOURCE)   $(FFT3D) $(LIB) $(LINK)
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) -FR -lowercase -O2 -c $*$(SUFFIX)
fft3dfurth.o : fft3dfurth.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

radial.o : radial.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symlib.o : symlib.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

symmetry.o : symmetry.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

wave_mpi.o : wave_mpi.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

wave.o : wave.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

dynbr.o : dynbr.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

asa.o : asa.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

broyden.o : broyden.F
        $(CPP)
        $(FC) -FR -lowercase -O2 -c $*$(SUFFIX)

us.o : us.F
        $(CPP)
        $(FC) -FR -lowercase -O1 -c $*$(SUFFIX)

LDApU.o : LDApU.F
        $(CPP)
        $(FC) -FR -lowercase -O2 -c $*$(SUFFIX)

¸ü¼ÓÏêϸµÄ²½Öè¼ûhttp://muchong.com/bbs/viewthread.php?tid=1399868&fpage=1
9Â¥2010-12-25 21:36:15
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

qlm2001

Ìú³æ (СÓÐÃûÆø)


¡ï ¡ï
Сľ³æ: ½ð±Ò+0.5, ¸ø¸öºì°ü£¬Ð»Ð»»ØÌû
WDD880227: ½ð±Ò+1, ¶àлÄúµÄ°ïÖú 2012-05-11 09:09:59
ÒýÓûØÌû:
380819Â¥: Originally posted by hedge at 2010-11-29 16:29:59:
¸÷λ´óϺ£¬¶ÔVASP°²×°ºÍ±àÒëÎÊÌ⣬ÎÒʵÔڸе½ÃÔã¡£
ÂÛ̳ÉϵÄ×ÊÁϾø´ó¶àÊýÊÇÒÔVASP.4.6£¬vasp.4.lib£¬L_mkl_p_9.1.023,  
l_fc_pl_9.1.036ΪÀý£¬¿ÉÄÜ´ó¶àÊýÊdz­Ï®»òÖ±½ÓÒýÓùýÀ´¡£²»Åųý°´²½¾Í°à£¬±àÒë³É¹¦µÄ¡£ ...

²»ÖªµÀÄã°²×°³É¹¦Ã»ÓУ¬ÎÒÓõÄÊÇ ubuntuµÄ11.04°æ£¬²¢Ðа²×°³É¹¦ÁË£¬Èç¹ûÄãÒªÊÇÏëÓÃubuntuµÄϵͳ£¬ÎÒ¿ÉÒÔ¸øÄãµã°ïÖú
10Â¥2012-05-10 15:43:36
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

qphll

½ð³æ (ÕýʽдÊÖ)


ËÍÏÊ»¨Ò»¶ä
ÒýÓûØÌû:
433835Â¥: Originally posted by Prettyswan at 2010-12-01 09:25:36:
ÎÒÈÏΪVASPµÄ°²×°¼¸ºõÓëLinuxµÄ·¢ÐаæÎ޹أ¬ÎÒÔÚUbuntu10.04£¨Ë«ºË£¬±¼D£©Éϰ²×°³É¹¦¹ý£¬ÔÚUbuntu10.10£¨Ëĺˣ¬Intel£©ÉÏÒ²°²×°³É¹¦¹ý£¬×òÌì¸Õ¸ÕÔÚRHEL6£¨ËĺËIntel£©Éϰ²×°³É¹¦VASP4.6¡£ÎÒÊǰ´ÕÕintel¹Ù·½ÂÛ̳ÉÏ ...

ºÜºÃ,¡¡ÔÞ!
11Â¥2012-05-11 02:20:13
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ hedge µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] ±¾9Ò»Ö¾Ô¸2 0854µÍ·Öר˶286Çóµ÷¼Á +10 âÖÖ111 2026-04-04 10/500 2026-04-10 12:31 by luosha500
[¿¼ÑÐ] µ÷¼ÁÉêÇë086000Ò»Ö¾Ô¸Î÷±±Å©ÁֿƼ¼´óѧÉúÎïÓëÒ½Ò©320·Ö-±¾¿ÆÆë³¹¤Òµ´óѧ +3 ÃÀÃÀŮʿ 2026-04-09 3/150 2026-04-10 10:31 by liuhuiying09
[¿¼ÑÐ] ²ÄÁÏר˶(0856) 339·ÖÇóµ÷¼Á +11 ¹þ¹þ¹þ¶ì¹þ¹þ¹þ 2026-04-04 11/550 2026-04-10 09:37 by 690616278
[¿¼ÑÐ] ³õÊÔ·Ö332£¬Ò»Ö¾Ô¸±¨¿¼Î÷±±¹¤Òµ´óѧ£¬ +11 ¹ÊÈË?? 2026-04-09 11/550 2026-04-09 21:54 by JineShine
[¿¼ÑÐ] Çóµ÷¼Á +3 ÖíÈâ¶Õ·ÛÌõcc 2026-04-08 4/200 2026-04-09 10:05 by ÖíÈâ¶Õ·ÛÌõcc
[¿¼ÑÐ] 304Çóµ÷¼Á£¨085602£¬¹ýËļ¶£¬Ò»Ö¾Ô¸985£© +25 »¯¹¤ÈË999 2026-04-04 26/1300 2026-04-07 22:06 by hemengdong
[¿¼ÑÐ] 22408 һ־Ը˫һÁ÷È˹¤ÖÇÄÜ300·Ö ËÄÁù¼¶£¬Êý¾Ý·ÖÎö¹ú½± +4 zzfeng123 2026-04-06 6/300 2026-04-07 21:02 by zzfeng123
[¿¼²©] ²©Ê¿ÉêÇë +3 IQwQl 2026-04-05 3/150 2026-04-07 20:31 by greychen00
[¿¼ÑÐ] 285Çóµ÷¼Á +15 ŶßϺôo 2026-04-04 17/850 2026-04-06 23:02 by chenzhimin
[¿¼ÑÐ] Çóµ÷¼Á +5 С›g 2026-04-03 5/250 2026-04-06 22:45 by 875465
[¿¼ÑÐ] ¿¼Ñе÷¼Á +3 WwwwwwwÍÛ 2026-04-06 3/150 2026-04-06 20:55 by lbsjt
[¿¼ÑÐ] 081200-11408-276ѧ˶Çóµ÷¼Á +5 ´Þwj 2026-04-05 5/250 2026-04-06 15:40 by lin-da
[¿¼ÑÐ] 326Çóµ÷¼Á +3 ¹ËÈô¸¡Éú 2026-04-05 3/150 2026-04-05 18:32 by À¶ÔÆË¼Óê
[¿¼ÑÐ] 08ר˶275µ÷¼Á +5 AaAa7420 2026-04-05 5/250 2026-04-05 18:01 by jkddd
[¿¼ÑÐ] 296Çóµ÷¼Á +3 Íô£¡£¿£¡ 2026-04-05 5/250 2026-04-05 17:38 by À¶ÔÆË¼Óê
[¿¼ÑÐ] Ò»Ö¾Ô¸±±½»´ó²ÄÁϹ¤³Ì×Ü·Ö358Çóµ÷¼Á +6 cs0106 2026-04-05 6/300 2026-04-05 16:34 by imissbao
[¿¼ÑÐ] 085600µ÷¼Á +9 ¶«ÕÕÕÕÕÕ 2026-04-04 9/450 2026-04-05 13:44 by ujn_zhuj
[¿¼ÑÐ] ²ÄÁϵ÷¼Á +9 ¸ï΢¹ð 2026-04-04 9/450 2026-04-05 08:27 by 544594351
[¿¼ÑÐ] ±¾¿Æ211£¬×¨Òµ085404£¬293·ÖÇëÇóµ÷¼Á +5 Á«²Ë¾ÍÊÇź°É 2026-04-04 5/250 2026-04-04 14:08 by ÕâÊÇÒ»¸öÎÞÁĵÄê
[¿¼ÑÐ] 322Çóµ÷¼Á +4 FZAC123 2026-04-03 4/200 2026-04-03 20:55 by zhq0425
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û