Building LAMMPS-22Aug18

Dear Experts,

Kindly, from LAMMPS manual I know how to use “cmake” or traditional “make” to build the code. How can I combine the two following commands for traditional “make”:
“make yess-std” and “make machine”.
The former command builds with standard packages but not with desired compiler options, and the latter builds NOT_WITH standard packages but with desired compiler options.
I would be grateful for any comments.

Best regards,
Mahmoud Payami
Theoretical & Computational Physics Group,
AEOI, Tehran, Iran

If you run the CMake gui you can select which packages to install. The machine options are less relevant because CMake searches for libraries and things itself so there is less need to have system-specific stuff in the Makefile.

Hi,

Kindly, from LAMMPS manual I know how to use "cmake" or traditional "make"
to build the code. How can I combine the two following commands for
traditional "make":
"make yess-std" and "make machine".
The former command builds with standard packages but not with desired
compiler options, and the latter builds NOT_WITH standard packages but with
desired compiler options.

Note that lammps provides pre-built executables; see manual section 3.
Note that i think the intention is that the cmake route is simpler
than the traditional make route (but note that there have been reports
of necessary bug fixes relative to stable version 22Aug18 for cmake).

To be specific the former command, ie make yes-std, selects packages
to be built; see manual section 3.6. The latter command, ie make machine,
is a template for an actual command that will build lammps. You need
to replace 'machine', eg with 'serial'; see section 3.2.

You are also missing some intermediate steps - namely the extra building
required by some packages; see section 3.7 after doing this:
make yes-std
make package-status

You are advised to determine what packages, ie features, you need.
Building packages you do not plan to use is likely wasted effort.

Here is perhaps a 'decent practice' for getting close to yes-std
without too much extra work (but note that i have not yet used this
on 22Aug18, it's from the previous stable version) (cd commands are
all relative and will need tweaking, eg cd ../..):
cd src
# clean up any preexisting attempts
make clean-all
make purge
make no-all
# more or less install all std internal packages and no external ones
make yes-standard
make no-ext
make no-latte
make no-reax
# get installed package list
make package-status
# make the extra libraries
cd lib/poems/
make -f Makefile.icc clean
make -f Makefile.icc
cd lib/meam/
make -f Makefile.ifort clean
make -f Makefile.ifort
cd lib/gpu/
# README ... requires mpi
make -f Makefile.linux clean
# stick rpath here; be careful to verify -arch=sm_60:
    make -f Makefile.linux -e CUDA_ARCH='-arch=sm_60' CUDA_HOME="CUDA\_HOME"     \# correct CUDA\_HOME     mv Makefile\.lammps Makefile\.lammps\.bac     cat Makefile\.lammps\.bac | sed \-e"s@\.\.\.8023\.\.\. = \-L\.\*@gpu\_SYSPATH = \-L{CUDA_HOME}/lib64 -Wl,-rpath=${CUDA_HOME}/lib64@" > Makefile.lammps
cd lib/colvars/
make -f Makefile.g++ cleanmake -f Makefile.g++
# build lammps after choosing machine
make 'machine'

So you can see that this is not a path to be taken by installers
unfamiliar with building scientific software.

scott