Simpatico  v1.10
2.2.5 Compiling (Out-of-Source)

2.2.4 Configuring MPI (Prev)         2.2.5 Compiling (In-Source) (Next)

We recommend that most users perform an out-of-source build of simpatico. To compile simpatico out-of-source, after completing all of the required setup and configuration steps, one simply invokes the "make" utility with appropriate targets from the simpatico/ root directory. The overview of instructions given on a previous page included instructions for compilng simpatico out-of-source. On this page, we simply repeat these instructions with a bit more explanation of what each makefile target should do.

Compiling mcSim and mdSim

The first step in compiling simpatico should be to compile the single-processor versions of the mcSim and mdSim programs. Because these programs are standard C++ with no external dependencies, they can be compiled whether or not you have set up your environment for compiling MPI code, and generally compile with no difficulties. After setting environment variables, running the setup script, and making any desired changes in the configuration, simply cd to the simpatico/ root directory and then enter:

> make mcMd

This will:

To recompile these programs after changing the configuration (e.g., after using the configure script to enable or disable compilation of particular features), simply reissue the "make mcMd" command. The build system will detect if you have changed any of the relevant configuration files, and will recompile any file that might be effected by such changes.

Compiling the mdPp post-processor

The mdPp post-processor program is also a single-processor program that you can compile before setting up your system to compile MPI programs. To do so, cd to the simpatico/ root directory and enter:

> make tools

If this is done after compiling mcSim and mdSim, this will compile some additional code in src/tools directory, place *.o and *.d files in the simpatico/bld/serial/tools directory and install an executable named mdPp in the simpatico/bin directory.

Compiling ddSim

To compile the ddSim parallel MD program, after setup, configuration of simpatico, and configuration of MPI, simply enter

> make ddMd

from the simpatico/ root directory. If successful, this will compile code from the util/, simp/, and ddMd/ subdirectories of the src/ directory, place object, dependency and library files in the simpatico/bld/parallel directory tree, and install an executable named ddSim in the simpatico/bin directory.

Compiling mcSim and mdSim (multi-processor versions)

Multi-processor versions of mcSim and mdSim can be used to run:

To compile multi-processor versions of mcSim and mdSim, enter:

> make mcMd-mpi

from the simpatico/ root directory. If invoked after compiling ddSim, this will compile MPI-enabled version of files in the mcMd/ directory, place the resulting object, dependency and library files in the bld/parallel/mcMd directory, and create executable files named mcSim_m and mdSim_m in the simpatico/bin/ directory. The suffix "_m" on these executable names denotes "MPI", and is used to distinguish multi-processor versions of the mcSim and mdSim executables from single processor versions.

Cleaning Up

If, for any reason, you would like to clean up after compiling by removing all of the object, dependency and library files that are created during compilation, enter

> make clean

from the root directory. This will remove any files generated by compilation in the bld/serial, bld/parallel and src/ directories.

If you want to remove generated files from only one build directory (e.g., from bld/parallel, but not bld/serial or src/), simply enter "make clean" from the root of that build directory (e.g., from the bld/parallel directory), rather than from the simpatico/ root directory. Entering "make clean" from a namespace level subdirectory of any build directory will instead remove all generated files from that subdirectory, without effecting files in other subdirectories.

The "make clean" command removes files that are generated by compilation, but does not remove the various makefile fragments and C++ that were created by the "setup" script. To remove these files as well, and thus return the simpatico/ directory tree to a state as close as possible to the state it had immediately after it was cloned, instead enter

> make veryclean

from the simpatico/ root directory. Because this command removes files that are created by the setup script, you will need to invoke

> ./setup

after "make veryclean" before attempting to compile any code. Because this command restores default settings, you will also need to use the configure script to re-establish any desired non-default configuration choices before recompiling.


2.2.4 Configuring MPI (Prev)         2.2 Compiling (Up)         2.2.5 Compiling (In-Source) (Next)