Skip to content
/ GOMC Public

GOMC - GPU Optimized Monte Carlo is a parallel molecular simulation code designed for high-performance simulation of large systems

License

Notifications You must be signed in to change notification settings

GOMC-WSU/GOMC

Repository files navigation

GOMC - GPU Optimized Monte Carlo

Current Release: 2.75 (6/21/2022)

Gitter chat Build Status

We recommend the GOMC Project Website and the user manual for further information and examples.

To cite GOMC project, please cite the following papers:

  1. Y. Nejahi, M. Soroush Barhaghi, G. Schwing, L. Schwiebert, J. Potoff. SoftwareX, 13, 100627 (2021). doi: 10.1016/j.softx.2020.100627.
  2. Y. Nejahi, M. Soroush Barhaghi, J. Mick, B. Jackman, K. Rushaidat, Y. Li, L. Schwiebert, J. Potoff. SoftwareX, 9, 20-27 (2019). doi: 10.1016/j.softx.2018.11.005.

Building GOMC on GNU/Linux, macOS, or Cygwin:

  1. Clone or download our code from GitHub:
    git clone https://github.com/GOMC-WSU/GOMC.git
  2. Go into the GOMC directory:
    cd GOMC
  3. Give execution permission:
    chmod u+x metamake.sh
  4. Run metamake file:
    ./metamake.sh
  5. Step 4 will place all the executables in the bin directory.

./metamake.sh accepts a list of which ensembles to compile. Default behavior, listing no ensembles, is to compile all CPU ensembles and, if CUDA is available, all GPU ensembles. Multiple ensemble names must be separated by spaces. Current accepted values are: CPU to compile all CPU ensembles, GPU to compile all GPU ensembles, or you can compile ensembles individually by using any of the following keywords: NVT, NPT, GCMC, GEMC, GPU_NVT, GPU_NPT, GPU_GCMC, GPU_GEMC.

NOTES: Building GOMC requires CMake version 3.18 or newer. CMake is available in most Linux package repositories (as cmake). If you wish to utilize NVIDIA graphics cards you will need to install the NVIDIA toolkit before compiling. The metamake file will automatically detect the location of your CUDA installation. More detailed info can be found in the user manual "User Manual".

Building GOMC on Windows:

  1. If building GPU executables and the CUDA version is older than CUDA 11, download the CUB library.
  2. If building GPU executables and the CUDA version is older than CUDA 11, extract the CUB library and copy the "cub" folder from the CUB library into the "lib" folder inside the GOMC directory.
  3. Open the Windows-compatible CMake GUI.
  4. Set the Source Folder to the GOMC root folder.
  5. Set the Build Folder to your build folder.
  6. Click Configure, select your compiler/environment.
  7. Click Generate after CMake finishes configurating the project.
  8. Click Open Project after CMake finishes generating the project.
  9. Using the solution in the IDE, build GOMC per the IDE's standard release compilation/executable generation methods.

NOTES: You can also use CMake from the Windows command line if its directory is added to the PATH environment variable.

Executing GOMC:

You can set the number of CPU threads using the +pN argument, where N is the number of threads. For example:

./GOMC_GPU_GEMC +p4 in.conf

will run a simulation with the Gibbs ensemble on the GPU using 4 CPU threads and loads configuration settings from the file "in.conf".