Former build (Makefile)

Warning

This page documents the legacy, Makefile-based way of compiling MILADY. It pre-dates the current build system and is kept for reference only: it is no longer maintained nor tested.

New users should follow the Local build page, which uses CMake and is the only supported and tested procedure.

Before the migration to CMake, MILADY was compiled by hand-editing a Makefile for the target architecture (compiler, MKL / LAPACK / ScaLapack and MPI paths) and then running make directly. The same mechanism is still used for the MILADY library that is linked into Lammps (see MILADY potentials in Lammps).

Makefile templates

A few ready-to-adapt Makefile templates are kept in the repository, under src/contents/install/Files. They can be used as a starting point and edited to match the compilers and library paths of your machine:

Typical legacy procedure

  1. Pick the Makefile template closest to your platform and edit the compiler, MKL / ScaLapack and MPI paths.

  2. Compile with a plain make invocation, for example:

    make -f Makefile.mpi clean
    make -f Makefile.mpi
    

Note

Because this procedure required manual editing of paths for every machine, it has been replaced by the CMake build, which detects the compilers and libraries automatically through the scripts/compile_milady.bash helper functions. If in doubt, use the Local build page.