Difference between revisions of "VASP make"
Jump to navigation
Jump to search
Moskalenko (talk | contribs) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Software]] | [[Category:Software]] | ||
[[VASP|Back to VASP page]] | [[VASP|Back to VASP page]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | The latest VASP uses makefile.include to set up compiler options/flags. Here is one example makefile.include file that was used to build VASP with OpenMPI on HiPerGator. Before compiling, you need to load intel and openmpi modules. | |
− | |||
− | + | === makefile.include for VASP 5 === | |
− | + | <source lang=make> | |
− | + | # Precompiler options | |
− | + | CPP_OPTIONS= -DMPI -DHOST=\"IFC91_ompi\" -DIFC \ | |
− | + | -DnoAugXCmeta \ | |
− | + | -DPGF90 \ | |
− | + | -DMPI -DMPI_BLOCK=8000 \ | |
− | + | -Duse_collective \ | |
− | # | + | -DCACHE_SIZE=4000 \ |
− | + | -Davoidalloc \ | |
− | + | -Duse_bse_te \ | |
− | + | -Dtbdyn \ | |
− | + | -Duse_shmem | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | -DHOST=\" | ||
− | - | ||
− | - | ||
− | -DPGF90 \ | ||
− | - | ||
− | -DMPI_BLOCK=8000 \ | ||
− | -DCACHE_SIZE=4000 \ | ||
− | - | ||
− | - | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | FC = mpif90 -msse3 -axcore-avx2,core-avx-i | |
− | + | FCL = mpif90 -mkl | |
− | |||
− | |||
− | + | FREE = -free -names lowercase | |
− | |||
− | + | FFLAGS = -assume byterecl -w | |
− | + | OFLAG = -O2 -msse3 -axcore-avx2,core-avx-i | |
− | + | OFLAG_IN = $(OFLAG) | |
− | + | DEBUG = -O0 | |
− | + | INCS =-I$(MKLROOT)/include/fftw | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | #LAPACK = -lmkl_scalapack_lp64 | |
− | + | BLACS = -lmkl_blacs_openmpi_lp64 | |
− | + | #SCALAPACK = $(LAPACK) $(BLACS) | |
− | + | BLAS = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core | |
− | + | FFTLIB = -lfftw3xf | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | #OBJECTS = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o | |
− | + | OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o \ | |
− | + | LLIBS = -L$(HPC_MKL_LIB) $(BLAS) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | OBJECTS_O1 += fft3dfurth.o fftw3d.o fftmpi.o fftmpiw.o | |
− | + | OBJECTS_O2 += fft3dlib.o | |
− | + | # For what used to be vasp.5.lib | |
− | + | CPP_LIB = $(CPP) | |
− | + | FC_LIB = $(FC) | |
− | # | + | CC_LIB = icc -msse3 -axcore-avx2,core-avx-i |
− | + | CFLAGS_LIB = -O | |
− | + | FFLAGS_LIB = -O1 | |
− | + | FREE_LIB = $(FREE) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | OBJECTS_LIB= linpack_double.o getshmem.o | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | # For the parser library | |
− | + | CXX_PARS = icpc | |
− | |||
− | + | LIBS += parser | |
− | + | LLIBS += -Lparser -lparser -lstdc++ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | # | + | # Normally no need to change this |
− | + | SRCDIR = ../../src | |
− | + | BINDIR = ../../bin | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</source> | </source> |
Latest revision as of 03:23, 17 April 2018
The latest VASP uses makefile.include to set up compiler options/flags. Here is one example makefile.include file that was used to build VASP with OpenMPI on HiPerGator. Before compiling, you need to load intel and openmpi modules.
makefile.include for VASP 5
# Precompiler options
CPP_OPTIONS= -DMPI -DHOST=\"IFC91_ompi\" -DIFC \
-DnoAugXCmeta \
-DPGF90 \
-DMPI -DMPI_BLOCK=8000 \
-Duse_collective \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Duse_bse_te \
-Dtbdyn \
-Duse_shmem
CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = mpif90 -msse3 -axcore-avx2,core-avx-i
FCL = mpif90 -mkl
FREE = -free -names lowercase
FFLAGS = -assume byterecl -w
OFLAG = -O2 -msse3 -axcore-avx2,core-avx-i
OFLAG_IN = $(OFLAG)
DEBUG = -O0
INCS =-I$(MKLROOT)/include/fftw
#LAPACK = -lmkl_scalapack_lp64
BLACS = -lmkl_blacs_openmpi_lp64
#SCALAPACK = $(LAPACK) $(BLACS)
BLAS = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
FFTLIB = -lfftw3xf
#OBJECTS = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o
OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o \
LLIBS = -L$(HPC_MKL_LIB) $(BLAS)
OBJECTS_O1 += fft3dfurth.o fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o
# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = icc -msse3 -axcore-avx2,core-avx-i
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB= linpack_double.o getshmem.o
# For the parser library
CXX_PARS = icpc
LIBS += parser
LLIBS += -Lparser -lparser -lstdc++
# Normally no need to change this
SRCDIR = ../../src
BINDIR = ../../bin