Installation¶
Download¶
The source code is hosted on github.
Prerequisites¶
To compile (and run) GPUMD one requires an Nvidia GPU card with compute capability no less than 3.5 and CUDA toolkit 9.0 or newer.
On Linux systems, one also needs a C++ compiler supporting at least the C++11 standard.
On Windows systems, one also needs the cl.exe
compiler from Microsoft Visual Studio and a 64-bit version of make.exe.
Compilation¶
In the src
directory run make
, which generates two executables, nep
and gpumd
.
Please check the comments in the beginning of the makefile for some compiling options.
Examples¶
You can find several examples for how to use both the gpumd
and nep
executables in the examples directory of the GPUMD repository.
NetCDF Setup Instructions¶
To use NetCDF (see dump_netcdf keyword) with GPUMD, a few extra steps must be taken before building GPUMD. First, you must download and install the correct version of NetCDF. Currently, GPUMD is coded to work with netCDF-C 4.6.3 and it is recommended that this version is used (not newer versions).
The setup instructions are below:
Download netCDF-C 4.6.3
Configure and build NetCDF. It is best to follow the instructions included with the software but, for the configuration, please use the following flags seen in our example line
./configure --prefix=/home/alex/netcdf --disable-netcdf-4 --disable-dap
Here, the
--prefix
determines the output directory of the build.Enable the NetCDF functionality. To do this, one must enable the
USE_NETCDF
flag. In the makefile, this will look as follows:CFLAGS = -std=c++11 -O3 -arch=sm_75 -DUSE_NETCDF
In addition to that line the makefile must also be updated to the following:
INC = -I<path>/netcdf/include LDFLAGS = -L<path>/netcdf/lib LIBS = -l:libnetcdf.a
where
<path>
should be replaced with the installation path for NetCDF (defined in--prefix
of the./configure
command).Follow the remaining GPUMD installation instructions
Following these steps will enable the dump_netcdf keyword.
PLUMED Setup Instructions¶
To use PLUMED (see plumed keyword) with GPUMD, a few extra steps must be taken before building GPUMD. First, you must download and install PLUMED.
The setup instructions are below:
Download the latest version of PLUMED, e.g. the plumed-src-2.8.2.tgz tarball.
Configure and build PLUMED. It is best to follow the instructions, but for a quick installation, you may use the following setup:
./configure --prefix=/home/user/plumed --disable-mpi --enable-openmp --enable-modules=all
Here, the
--prefix
determines the output directory of the build. Then make and install PLUMED:make && make install
Then update your environment variables (e.g., add the following lines to your bashrc file):
export PLUMED_KERNEL=<path>/lib/libplumedKernel.so export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path>/lib export PATH=$PATH:<path>/bin
where
<path>
should be replaced with the installation path for PLUMED (defined in--prefix
of the./configure
command). Finally, reopen your shell to apply changes.Enable the PLUMED functionality. To do this, one must enable the
USE_PLUMED
flag. In the makefile, this will look as follows:CFLAGS = -std=c++11 -O3 -arch=sm_75 -DUSE_PLUMED
In addition to that line the makefile must also be updated to the following:
INC = -I<path>/include LDFLAGS = -L<path>/lib -lplumed -lplumedKernel
where
<path>
should be replaced with the installation path for PLUMED (defined in--prefix
of the./configure
command).Follow the remaining GPUMD installation instructions
Following these steps will enable the plumed keyword.