git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10510 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-08-01 16:25:10 +00:00
parent 217a0a3b7f
commit f839dbf2c5
2 changed files with 16 additions and 7 deletions

View File

@ -17,22 +17,29 @@ driver in addition requires a wrapper library that interfaces the C
interface of the LAMMPS library to Fortran and also translates the MPI
communicator from Fortran to C.
You can then build either driver code with a compile line something
like this, which includes paths to the LAMMPS library interface, MPI,
and FFTW (assuming you built LAMMPS as a library with its PPPM
solver).
First, you must build LAMMPS as a library, either static or shared.
See http://lammps.sandia.gov/doc/Section_start.html#start_5 for
details. To build it as a static library type this from
the src directory:
make makelib
make -f Makefile.lib g++
You can then build either driver code with a compile lines like these,
which include paths to the LAMMPS library interface, MPI, and FFTW
(assuming you built LAMMPS as a library with its PPPM solver).
This builds the C++ driver with the LAMMPS library using a C++ compiler:
g++ -I/home/sjplimp/lammps/src -c simple.cpp
g++ -L/home/sjplimp/lammps/src simple.o \
-llmp_g++ -lfftw -lmpich -lmpl -lpthread -o simpleCC
-llammps_g++ -lfftw -lmpich -lmpl -lpthread -o simpleCC
This builds the C driver with the LAMMPS library using a C compiler:
gcc -I/home/sjplimp/lammps/src -c simple.c
gcc -L/home/sjplimp/lammps/src simple.o \
-llmp_g++ -lfftw -lmpich -lmpl -lpthread -lstdc++ -o simpleC
-llammps_g++ -lfftw -lmpich -lmpl -lpthread -lstdc++ -o simpleC
This builds the Fortran wrapper and driver with the LAMMPS library
using a Fortran and C compiler, using the wrapper in the fortran
@ -42,7 +49,7 @@ cp ../fortran/libfwrapper.c .
gcc -I/home/sjplimp/lammps/src -c libfwrapper.c
gfortran -I/home/sjplimp/lammps/src -c simple.f90
gfortran -L/home/sjplimp/lammps/src simple.o libfwrapper.o \
-llmp_g++ -lfftw -lfmpich -lmpich -lpthread -lstdc++ -o simpleF
-llammps_g++ -lfftw -lfmpich -lmpich -lpthread -lstdc++ -o simpleF
You then run simpleCC, simpleC, or simpleF on a parallel machine
on some number of processors Q with 2 arguments:

View File

@ -20,5 +20,7 @@ neigh_modify delay 0 every 20 check no
fix 1 all nve
fix 2 all external pf/callback 1 1
run 10