User Tools

Site Tools


compiling

PREREQUISITES

1) g++

2) openmpi

3) LAMMPS


COMPILATION

The following steps help compile the code for use (Download first):

In a linux terminal,

1) Move into the /lammps/src directory

cd /path/to/lammps/src

2) Build LAMMPS as a shared library

make mode=shlib machinename

where “machinename” is the machine name associated with the g++ and openmpi compilers. You can find this in the LAMMPS directory by typing “make”. There is more documentation on this here . The final result should be a shared object (.so) file.

3) Set your library path to include the newly made .so files.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/lammps/src

4) Move into the pops/src directory

cd /path/to/pops/src

5) Edit the Makefile variables LAMMPS and LAMMPSLIB to contain the paths to the lammps/src and lammps/src/.so file respectively. For example:

# Enter path to the LAMMPS src directory
LAMMPS = $(HOME)/lammps/lammps-17Nov16/src
# Enter path to the shared library (.so) file
LAMMPSLIB = ~/lammps/lammps-17Nov16/src/liblammps_g++_openmpi.so

should be at the beginning of the Makefile

6) Compile the code with

make

EXECUTABLES

Compiling currently produces the following executables:

1) ga - This is the main code that fits forces, energies and stresses.

2) calcz - This code is used to calculate error contributions.

3) ga_ifc - This is the same as “ga”, but includes fitting of force constants using Alamode .

4) calcz_ifc - Same as “calcz”, but includes force constant error contributions.

compiling.txt · Last modified: 2017/04/13 15:49 by rohskopf