GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.lammps.org — 3.3. Build LAMMPS with make — LAMMPS documentation 3.3. Build LAMMPS with makeWarning The LAMMPS developers plan to retire the legacy build system. Please switch to using CMake instead. There is also a detailed discussion of how to use CMake with LAMMPS and the CMake online documentation. For the impatient, there is also a quick transition guide below. Contact the the LAMMPS developers at developers@lammps.org if you have any concerns or questions about this. 3.3.1. Make to CMake quick-start guide
Some general CMake tips:
3.3.2. BasicsBuilding LAMMPS with traditional makefiles requires that you have a
This build system is slowly being phased out and does no longer support all optional features and packages in LAMMPS. It is recommended to switch to the CMake based build system. 3.3.3. RequirementsThose makefiles are written for and tested with GNU make and may not be compatible with other make programs. In most cases, if the “make” program is not GNU make, then there will be a GNU make program available under the name “gmake”. If GNU make or a compatible make is not available, you may have to first install it or switch to building with CMake. The makefiles of the traditional make based build process and the scripts they are calling expect a few additional tools to be available and functioning.
3.3.4. Getting startedTo include LAMMPS packages (i.e. optional commands and styles) you must
enable (or “install”) them first, as discussed on the Build
package page. If a package requires (provided or
external) libraries, you must configure and build those libraries
before building LAMMPS itself and especially before enabling
such a package with The commands below perform a default LAMMPS build, producing the LAMMPS
executable cd lammps/src # change to main LAMMPS source folder make serial # build a serial LAMMPS executable using GNU g++ make mpi # build a parallel LAMMPS executable with MPI make # see a variety of make options Compilation can take a long time, since LAMMPS is a large project with
many features. If your machine has multiple CPU cores (most do these
days), you can speed this up by compiling sources in parallel with
After the initial build, whenever you edit LAMMPS source files, or add
or remove new files to the source directory (e.g. by installing or
uninstalling packages), you must re-compile and relink the LAMMPS
executable with the same Note Before the actual compilation starts, LAMMPS will perform several steps to collect information from the configuration and setup that is then embedded into the executable. When you build LAMMPS for the first time, it will also compile a tool to quickly determine a list of dependencies. Those are required for the make program to correctly detect, which files need to be recompiled or relinked after changes were made to the sources. 3.3.5. Customized builds and alternate makefilesThe OPTIONS # Makefiles which enable specific options MACHINES # Makefiles for specific machines MINE # customized Makefiles you create (you may need to create this folder) Simply typing Makefiles you may wish to try out, include those listed below (some require a package first be installed). Many of these include specific compiler flags for optimized performance. Please note, however, that some of these customized machine Makefile are contributed by users, and thus may have modifications specific to the systems of those users. Since compilers, OS configurations, and LAMMPS itself keep changing, their settings may become outdated, too: make mac # build serial LAMMPS on macOS make mac_mpi # build parallel LAMMPS on macOS make intel_cpu # build with the INTEL package optimized for CPUs make opt # build with the OPT package optimized for CPUs make omp # build with the OPENMP package optimized for OpenMP | ||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |