{"id":27643396,"url":"https://github.com/rrze-hpc/md-bench","last_synced_at":"2025-04-24T00:13:43.236Z","repository":{"id":38829287,"uuid":"281977314","full_name":"RRZE-HPC/MD-Bench","owner":"RRZE-HPC","description":"A performance-oriented prototyping harness for state of the art Molecular Dynamics algorithms","archived":false,"fork":false,"pushed_at":"2025-04-19T08:37:30.000Z","size":4855,"stargazers_count":13,"open_issues_count":3,"forks_count":8,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-24T00:13:07.807Z","etag":null,"topics":["benchmark","cuda-programming","hpc","molecular-dynamics","scientific-computing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RRZE-HPC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-23T14:41:12.000Z","updated_at":"2025-01-18T13:00:44.000Z","dependencies_parsed_at":"2023-02-13T03:46:14.487Z","dependency_job_id":"3910b2ac-9e8b-4fa1-8198-afea1de56494","html_url":"https://github.com/RRZE-HPC/MD-Bench","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRZE-HPC%2FMD-Bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRZE-HPC%2FMD-Bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRZE-HPC%2FMD-Bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRZE-HPC%2FMD-Bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RRZE-HPC","download_url":"https://codeload.github.com/RRZE-HPC/MD-Bench/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535112,"owners_count":21446509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","cuda-programming","hpc","molecular-dynamics","scientific-computing"],"created_at":"2025-04-24T00:13:42.620Z","updated_at":"2025-04-24T00:13:43.224Z","avatar_url":"https://github.com/RRZE-HPC.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MD-Bench\n\n| :exclamation:  The repository was restructured and cleaned up and in this process the history was rewritten. Please make fresh forks and clones.   |\n|-----------------------------------------|\n\nMD-Bench is a toolbox for the performance engineering of short-range force\ncalculation kernels on molecular-dynamics applications. It aims at covering\nstate-of-the-art algorithms from different community codes such as\nLAMMPS and GROMACS.\n\n## Getting started\n\nClone the repository from GitHub:\n\n```shell=\ngit clone https://github.com/RRZE-HPC/MD-Bench.git\n```\n\nEdit config.mk and configure the compiler toolchain\n\n```makefile=\n# Compiler tool chain (GCC/CLANG/ICC/ICX/ONEAPI/NVCC)\nTOOLCHAIN ?= CLANG\n```\n\nBest supported are ICC (deprecated legacy Intel compiler) and ICX (LLVM based\nIntel compiler). Choose NVCC to enable CUDA GPU kernels.\n\nThe toolchain settings are located in the `./make` directory. Review the\nsettings for the configured toolchain. You can configure different settings in\n`config.mk`, for starters on a X86 based system the defaults are fine.\n\nTo build the binary call, don't forget to load the compiler module on the\nNHR@FAU clusters (e.g. `module load intel`):\n\n```shell=\nmake\n```\n\nWhile the Makefile works with any version of GNU make, some features require GNU\nmake \u003e v4.\n\nYou can run MD-Bench without any arguments:\n\n```shell=\n./MDBench-VL-ICX-X86-AVX2-DP\n```\n\n## Build system\n\nMD-Bench uses a Makefile with pattern rules and automatic dependency generation.\nIf you add source files you do not need to change the Makefile as long as the\nsources are placed either in the `./src/verletlist/`, `./src/clusterpair/` or\n`./src/common` directories. If you change a file, all object files that depend\non it are rebuild.\n\nAll configuration variables can be overwritten from the command line, e.g. to\nbuild with ICC without changing `./config.mk` build with:\n\n```shell=\nmake TOOLCHAIN=ICC\n```\n\nMultiple configurations can be build at the same time. Every configuration has a\nunique binary name `./MDBENCH-\u003cbuild tag\u003e`. Intermediate build results are\nlocated in a `./build/build-\u003cbuild tag\u003e/` directory.\n\nAll make targets act on the current configuration set in `./config.mk`, but this\ncan be of course overwritten on the command line.\n\nSupported make targets:\n\n- `make`: Build the binary for current configuration.\n- `make clean`: Remove intermediate build results.\n- `make distclean`: Remove intermediate build results and binary. Also removes\ngenerated tags and clangd files, more on that later.\n- `make cleanall`: Remove all generated files. **Note**: This target applies to\nall configurations.\n- `make info` Output compiler version, useful for logging in automated benchmark\nscripts.\n- `make asm`: Generate assembly output of all source files. The assembly files\nare placed in the intermediate build directory.\n- `make format`: Reformat all source files with `clang-format` using the format\nspecification in `.clang-format`.\n\n### Build time options\n\n- `TOOLCHAIN`: Determines which toolchain makefile is included\n- `ISA`: No usage apart from tag strings\n- `SIMD`: Controls the generation of intrinsic kernels for clusterpair\n- `OPT_SCHEME`: Algorithmic variant (verletlist or clusterpair), different\nsource directories and main routines are used\n- `ENABLE_LIKWID`: Turn on LIKWID instrumentation, the LIKWID library has to be available\n- `DATA_TYPE`: Switch between single precision and double precision floating\npoint. This is controlled by defines.\n- `DATA_LAYOUT`: Switch between array-of-structure (AOS) and structure-of-array\n(SOA) layout for atom positions and forces. Tradeoff between better cache\nutilisation and easier SIMD vectorization.\n- `DEBUG`: Enable additional debug output\n- `SORT_ATOMS`: Resort atoms to ensure that atoms that are nearby are also close\nto each other in the data structures\n- `ONE_ATOM_TYPE`: Simulate only one atom type and do not perform table lookup for parameters.\n- `ENABLE_OMP_SIMD`: This enforces the use of `#pragma omp simd` for the\nverletlist half-neighbour list force kernel. Without is the Intel compiler (at\nleast ICC) refuses to do SIMD vectorization.\n- `USE_REFERENCE_VERSION`: Enforce usage of C implementation for clusterpair\nalgorithm for validation\n- `USE_CUDA_HOST_MEMORY`: Enable pinned host memory for faster host-device transfers\n- `ENABLE_MPI:` Turn on the MPI parallel version of the code\n\n### Build for GPU targets\n\nMD-Bench currently only supports Nvidia GPUs using CUDA kernels. To enable CUDA\nkernels you need to specify `NVCC` as toolchain. The CUDA source code is in the\nsame source directories with Cuda suffix and `.cu` as file type ending. If\n`NVCC` is set as toolchain, all supported kernels are automatically set to their\nCUDA variants at build time. This means a binary either supports CPU kernels or\nGPU kernels.\n\n## Command line arguments\n\nMD-Bench can be executed without any arguments, in this case the full neighbor\nlist testcase with LJ force will be computed for 200 steps and a size of\n32x32x32 unit cells.\n\n- `-p / --params \u003cstring\u003e`: file to read parameters from (can be specified more\nthan once). Default initialization sets parameters for default LJ testcase.\n*`-f \u003cstring\u003e`: force field (lj, eam), default lj. For anything different than\nlj you also need to provide spcific parameter file.\n- `-i \u003cstring\u003e`:  input file with atom positions (dump). MD-Bench supports\nBrookhaven protein data bank (.pdb), GROMACS GROMOS87 (.gro), and LAMMPS dump\n(.dmp) file formats\n- `-e \u003cstring\u003e`:  input file for EAM parameters\n- `-n / --nsteps \u003cint\u003e`:  set number of timesteps for simulation (default 200)\n- `-nx/-ny/-nz \u003cint\u003e`:  set linear dimension of systembox in x/y/z direction\n(default 32 in every dimension)\n- `-half \u003cint\u003e`: use half (1) or full (0) neighbor lists (default 0 - full\nneighbor list)\n- `-r / --radius \u003creal\u003e`:   set cutoff radius (default 2.5)\n- `-s / --skin \u003creal\u003e`:   set skin (verlet buffer, default 0.3)\n- `-w \u003cfile\u003e`:  write input atoms to file\n- `--freq \u003creal\u003e`:  processor frequency (GHz), used to calculate cycle metrics\n(default 2.4)\n- `--vtk \u003cstring\u003e`:    VTK output file for visualization\n\n## Available testcases\n\nFor all variants you can switch between single precision and double precision\nand between AOS versus SOA data layouts using build time options. You can use\nthe half neighbour list algorithm instead of the default full neighbour list by\nsetting `-half 1`. To enforce SIMD vectorization for the half neighbour list\nalgorithm you can set the option `ENABLE_OMP_SIMD=true`.\n\n### Lennard-Jones potential for solid copper\n\nJust start without any command line argument, this is the default testcase. You\nmay change the number of timesteps using the `-n` options and change the problem\nsize using the `-nz, -ny, -nz` options.\n\n### EAM potential for solid copper\n\nCall MD-Bench as follows:\n\n```shell=\n./MDBench-\u003cTAG\u003e -n 400 -f eam -e ./data/Cu_u3.eam\n```\n\nTwo different EAM variants are available: `Cu_u3.eam` and `Cu_u6.eam`. The EAM\npotential is currently only available for verletlist.\n\n### Lennard-Jones potential for melted copper\n\nThe melted copper testcase has only 32000 atoms in the default configuration.\nCall MD-Bench as follows:\n\n```shell=bash\n./MDBench-\u003cTAG\u003e -n 400  -i ./data/copper_melting/input_lj_cu_one_atomtype_20x20x20.dmp\n```\n\n### Lennard-Jones potential for melted copper with explicit types\n\nCompile MD-Bench with `EXPLICIT_TYPES=true` in `config.mk`.\n\nCall MD-Bench as follows:\n\n```shell=bash\n./MDBench-\u003cTAG\u003e -n 400  -i ./data/copper_melting/input_lj_cu_one_atomtype_20x20x20.dmp\n```\n\n**This testcase currently segvaults!**\n\n### EAM potential for melted copper\n\nCall MD-Bench as follows:\n\n```shell=bash\n./MDBench-\u003cTAG\u003e -n 400 -f eam -e ./data/Cu_u3.eam  -i ./data/copper_melting/input_eam_cu_one_atomtype_20x20x20.dmp\n```\n\nTwo different EAM variants are available: `Cu_u3.eam` and `Cu_u6.eam`. The EAM\npotential is currently only available for verletlist.t.\n\n### Lennard-Jones potential for argon gas\n\nCall MD-Bench as follows:\n\n```shell=bash\n./MDBench-\u003cTAG\u003e -i ./data/argon/input.gro  -p ./data/argon/mdbench_params.conf\n```\n\n## Citations\n\nRafael Ravedutti Lucio Machado, Jan Eitzinger, Jan Laukemann, Georg Hager,\nHarald Köstler and Gerhard Wellein: MD-Bench: A performance-focused prototyping\nharness for state-of-the-art short-range molecular dynamics algorithms. Future\nGeneration Computer Systems\n([FGCS](https://www.sciencedirect.com/journal/future-generation-computer-systems)),\nVolume 149, 2023, Pages 25-38, ISSN 0167-739X, DOI:\n[https://doi.org/10.1016/j.future.2023.06.023](https://doi.org/10.1016/j.future.2023.06.023)\n\nRafael Ravedutti Lucio Machado, Jan Eitzinger, Harald Köstler, and Gerhard\nWellein: MD-Bench: A generic proxy-app toolbox for state-of-the-art molecular\ndynamics algorithms. Accepted for [PPAM](https://ppam.edu.pl/) 2022, the 14th\nInternational Conference on Parallel Processing and Applied Mathematics, Gdansk,\nPoland, September 11-14, 2022. PPAM 2022 Best Paper Award. Preprint:\n[arXiv:2207.13094](https://arxiv.org/abs/2207.13094), DOI:\n[https://dl.acm.org/doi/10.1007/978-3-031-30442-2_24](https://dl.acm.org/doi/10.1007/978-3-031-30442-2_24)\n\n## Credits\n\nMD-Bench is developed by the Erlangen National High Performance Computing Center\n([NHR@FAU](https://hpc.fau.de/)) at the University of Erlangen-Nürnberg.\n\n## License\n\n[LGPL-3.0](https://github.com/RRZE-HPC/MD-Bench/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrze-hpc%2Fmd-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrze-hpc%2Fmd-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrze-hpc%2Fmd-bench/lists"}