git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10510 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -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
|
interface of the LAMMPS library to Fortran and also translates the MPI
|
||||||
communicator from Fortran to C.
|
communicator from Fortran to C.
|
||||||
|
|
||||||
You can then build either driver code with a compile line something
|
First, you must build LAMMPS as a library, either static or shared.
|
||||||
like this, which includes paths to the LAMMPS library interface, MPI,
|
See http://lammps.sandia.gov/doc/Section_start.html#start_5 for
|
||||||
and FFTW (assuming you built LAMMPS as a library with its PPPM
|
details. To build it as a static library type this from
|
||||||
solver).
|
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:
|
This builds the C++ driver with the LAMMPS library using a C++ compiler:
|
||||||
|
|
||||||
g++ -I/home/sjplimp/lammps/src -c simple.cpp
|
g++ -I/home/sjplimp/lammps/src -c simple.cpp
|
||||||
g++ -L/home/sjplimp/lammps/src simple.o \
|
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:
|
This builds the C driver with the LAMMPS library using a C compiler:
|
||||||
|
|
||||||
gcc -I/home/sjplimp/lammps/src -c simple.c
|
gcc -I/home/sjplimp/lammps/src -c simple.c
|
||||||
gcc -L/home/sjplimp/lammps/src simple.o \
|
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
|
This builds the Fortran wrapper and driver with the LAMMPS library
|
||||||
using a Fortran and C compiler, using the wrapper in the fortran
|
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
|
gcc -I/home/sjplimp/lammps/src -c libfwrapper.c
|
||||||
gfortran -I/home/sjplimp/lammps/src -c simple.f90
|
gfortran -I/home/sjplimp/lammps/src -c simple.f90
|
||||||
gfortran -L/home/sjplimp/lammps/src simple.o libfwrapper.o \
|
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
|
You then run simpleCC, simpleC, or simpleF on a parallel machine
|
||||||
on some number of processors Q with 2 arguments:
|
on some number of processors Q with 2 arguments:
|
||||||
|
|||||||
@ -20,5 +20,7 @@ neigh_modify delay 0 every 20 check no
|
|||||||
|
|
||||||
fix 1 all nve
|
fix 1 all nve
|
||||||
|
|
||||||
|
fix 2 all external pf/callback 1 1
|
||||||
|
|
||||||
run 10
|
run 10
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user