The steps are still relevant and workable, but if you are doing a lot of customisation pathing or you just simply wish to tweak the parameters in the configuration file, here is my sample script. I got my information from the Message threads of LAMMPS http://lammps.sandia.gov/threads/msg12768.html
Here are my settings, amending the $SOURCE/lammps-30Mar10/src/MAKE/Makefile.Linux
# linux = RedHat Linux box, Intel icc, MPICH2, FFTW SHELL = /bin/sh # --------------------------------------------------------------------- # compiler/linker settings # specify flags and libraries needed for your compiler CC = mpicc CCFLAGS = -g -O -I/usr/local/fftw/include -DFFT_FFTW DEPFLAGS = -M LINK = mpicc LINKFLAGS = -O USRLIB = -lfftw -lmpi LIB = -lstdc++ -lpthread ARCHIVE = ar ARFLAGS = -rc SIZE = size # --------------------------------------------------------------------- # LAMMPS-specific settings # specify settings for LAMMPS features you will use # LAMMPS ifdef options, see doc/Section_start.html LMP_INC = -DLAMMPS_GZIP # MPI library, can be src/STUBS dummy lib # INC = path for mpi.h, MPI compiler settings # PATH = path for MPI library # LIB = name of MPI library:wq MPI_INC = -DMPICH_IGNORE_CXX_SEEK MPI_PATH = -L/usr/mpi/intel/lib # where I store my openmpi binary and lib MPI_LIB = -lmpi -lpthread # FFT library, can be -DFFT_NONE if not using PPPM from KSPACE package # INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings # PATH = path for FFT library # LIB = name of FFT library FFT_INC = -DFFT_FFTW FFT_PATH = -L/usr/local/fftw/lib # I've put my fftw at /usr/local/fftw FFT_LIB = -lfftw .............
You can add further flags at CCFLAGS. See my other blog entry
2 comments:
Dear Sir,
I'm trying to install lammps using Makefile.linux. I have edited my Makefile.linux as suggested by you. after creating many .o file, it show the following error:
fix_reax_bonds.o: In function `LAMMPS_NS::FixReaxBonds::end_of_step()':
fix_reax_bonds.cpp:(.text+0x128): undefined reference to `getnsbmax_'
fix_reax_bonds.cpp:(.text+0x135): undefined reference to `getcutof3_'
fix_reax_bonds.cpp:(.text+0x2bd): undefined reference to `cbkia_'
fix_reax_bonds.cpp:(.text+0x2ca): undefined reference to `cbkia_'
fix_reax_bonds.cpp:(.text+0x314): undefined reference to `cbkia_'
fix_reax_bonds.cpp:(.text+0x31e): undefined reference to `cbkc_'
fix_reax_bonds.cpp:(.text+0x33d): undefined reference to `cbkia_'
fix_reax_bonds.cpp:(.text+0x365): undefined reference to `cbknubon2_'
fix_reax_bonds.cpp:(.text+0x36d): undefined reference to `cbkbo_'
fix_reax_bonds.cpp:(.text+0x388): undefined reference to `cbkabo_'
fix_reax_bonds.cpp:(.text+0x393): undefined reference to `cbklonpar_'
please help in building lammps. Thanks in advance.
Hi,
I'm assuming you are using Intel Compilers, FFTW and OpenMPI on CentOS?
Can you post me your Makefile?
Post a Comment