{"id":19347509,"url":"https://github.com/lammps/lammps-testing","last_synced_at":"2025-04-23T05:32:19.670Z","repository":{"id":45634454,"uuid":"66879278","full_name":"lammps/lammps-testing","owner":"lammps","description":"Collection of regression tests for LAMMPS MD code","archived":false,"fork":false,"pushed_at":"2024-08-15T02:24:47.000Z","size":56218,"stargazers_count":12,"open_issues_count":1,"forks_count":14,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-16T02:28:59.885Z","etag":null,"topics":["continuous-integration","lammps","python"],"latest_commit_sha":null,"homepage":"","language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lammps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-08-29T20:45:33.000Z","updated_at":"2024-08-16T02:28:59.886Z","dependencies_parsed_at":"2024-04-05T20:42:28.329Z","dependency_job_id":null,"html_url":"https://github.com/lammps/lammps-testing","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lammps%2Flammps-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lammps%2Flammps-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lammps%2Flammps-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lammps%2Flammps-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lammps","download_url":"https://codeload.github.com/lammps/lammps-testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223909904,"owners_count":17223592,"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":["continuous-integration","lammps","python"],"created_at":"2024-11-10T04:16:44.408Z","updated_at":"2024-11-10T04:16:44.884Z","avatar_url":"https://github.com/lammps.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LAMMPS Test Suite\n\nThis repository contains code and examples that drive the testing on\n[ci.lammps.org](https://ci.lammps.org). It's is run on hardware that is hosted\nat Temple University.\n\nThe tools provided here can also be installed locally for testing on a workstation.\n\n`lammps_test` is a utility to compile LAMMPS in different configurations on\nvarious environments using containers and perform compilation, run, regression, and unit tests.\n\n## Prerequisites\n\n* Singularity (https://sylabs.io/guides/3.9/user-guide/)\n\n## Installation\n\n```bash\n# regular install\npython setup.py install\n\n# for development install\npython setup.py develop\n```\n\n## Configuration\n\n```bash\n# Example configuration in ~/.bashrc\nexport LAMMPS_DIR=$HOME/GitHub/lammps/lammps\nexport LAMMPS_TESTING_DIR=$HOME/GitHub/lammps/lammps-testing\nexport LAMMPS_CACHE_DIR=$HOME/GitHub/lammps/cache\nexport LAMMPS_COMPILE_NPROC=24\n```\n\n`LAMMPS_DIR`\nLAMMPS source directory\n\n`LAMMPS_TESTING_DIR`\nLAMMPS testing source directory\n\n`LAMMPS_CACHE_DIR`\nDirectory storing compiled binaries and containers\n\n## Basic Usage\n\nThe general idea behind `lammps_test` is to provide similar feedback to a LAMMPS commit to what is available when running on `ci.lammps.org`. The main benefit of running it locally on your workstation is that you have the same exact binaries and output folders as on the CI server.\n\nWhen you type `lammps_test status` what you get is a full report of the current testing status of the HEAD commit in your LAMMPS git checkout (specified by `LAMMPS_DIR`).\n\n```bash\n$ lammps_test status\nCompilation Tests:\n ⭕ centos7/cmake_mpi_openmp_bigbig_static (4a048e3f)\n ⭕ centos7/cmake_serial_smallsmall_static (4a048e3f)\n ⭕ centos7/cmake_mpi_smallbig_shared (4a048e3f)\n ⭕ centos7/legacy_serial_openmp_smallsmall_static (4a048e3f)\n ⭕ fedora/cmake_kokkos_mpi_openmp_clang_shared (4a048e3f)\n ⭕ fedora/cmake_serial_smallsmall_static (4a048e3f)\n ⭕ fedora/cmake_mpi_smallbig_shared (4a048e3f)\n ⭕ fedora/legacy_mpi_bigbig_shared (4a048e3f)\n ⭕ intel/cmake_mpi_openmp_bigbig_icc_static (4a048e3f)\n ⭕ intel/cmake_kokkos_mpi_openmp_smallbig_icc_shared (4a048e3f)\n ⭕ intel_oneapi/cmake_mpi_openmp_bigbig_oneapi_static (4a048e3f)\n ⭕ intel_oneapi/cmake_kokkos_mpi_openmp_smallbig_oneapi_shared (4a048e3f)\n ⭕ ubuntu/cmake_mpi_openmp_bigbig_static (4a048e3f)\n ⭕ ubuntu/legacy_mpi_bigbig_shared (4a048e3f)\n ⭕ ubuntu/legacy_serial_openmp_smallsmall_static (4a048e3f)\n ⭕ windows/cmake_mpi_openmp_smallbig_shared_win64 (4a048e3f)\n ⭕ windows/cmake_serial_smallsmall_static_win32 (4a048e3f)\n\nRun Tests:\n ⭕ ubuntu/cmake_testing_serial (4a048e3f)\n ⭕ ubuntu/cmake_testing_mpi (4a048e3f)\n ⭕ ubuntu/cmake_testing_openmp (4a048e3f)\n\nRegression Tests:\n ⭕ ubuntu/cmake_regression_mpi (4a048e3f)\n\nUnit Tests:\n ⭕ ubuntu/cmake_mpi_openmp_smallsmall_shared (4a048e3f)\n ⭕ ubuntu/cmake_mpi_openmp_smallbig_shared (4a048e3f)\n ⭕ ubuntu/cmake_mpi_openmp_bigbig_shared (4a048e3f)\n ⭕ ubuntu_gpu/cmake_gpu_cuda_double_smallbig_clang_shared (4a048e3f)\n ⭕ ubuntu_gpu/cmake_gpu_cuda_single_bigbig_static (4a048e3f)\n ⭕ ubuntu_gpu/cmake_gpu_opencl_double_bigbig_shared (4a048e3f)\n ⭕ ubuntu_gpu/cmake_gpu_opencl_mixed_smallbig_clang_static (4a048e3f)\n```\n\nAs you execute other `lammps_test` subcommands, this status is updated. Before running tests, you will need the LAMMPS containers.\n\n## Containers\n\nTo make builds reproducible, `lammps_test` uses [Singularity](https://sylabs.io/singularity/) containers for\nbuilding all binaries. Singularity must be installed and the current user must\nhave `sudo` rights to build containers.\n\nContainer definitions are located in `containers/singularity/`, built\ncontainers are stored in `$LAMMPS_CACHE_DIR/containers/`.\n\nWhile you can create containers in any way you want using the `singularity`\ncommand-line, there is a utility command for building one or more containers\nwith `lammps_test`:\n\n```bash\n# builds all container definitions at once\nlammps_test env build ALL\n\n# only build ubuntu18.04 container\nlammps_test env build ubuntu18.04\n\n# build multiple containers\nlammps_test env build ubuntu18.04 centos7 fedora30_mingw\n```\n\n## Compilation Tests\n\nThe compilation tests done by the LAMMPS Jenkins server executes several bash\nscripts on multiple containers. Each environment that should be tested defines\na YAML file in the `scripts/` folder. Currently it has 7 definitions:\n\n* ubuntu.yml\n* ubuntu_gpu.yml\n* centos7.yml\n* fedora.yml\n* intel.yml\n* intel_oneapi.yml\n* windows.yml\n\nEach of these environment defines a list of `builds` and the used\n`singularity_image`. The names of the builds correspond to bash scripts located\nin `scripts/builds/\u003cBUILD_NAME\u003e.sh`.\n\nThese build scripts assume the necessary environment variables described above\nare defined and will compile LAMMPS in the current working directory.\n`lammps_test compile` is a wrapper command that create the necessary\nworking directory inside of the `$LAMMPS_CACHE_DIR` folder, and then launches\nthese scripts inside the correct container.\n\nOn ci.lammps.org, these tests are one environment at a time, running multiple compilations in parallel. Below is a visualization of the current compilation test pipeline that both runs for the [develop](https://ci.lammps.org/blue/organizations/jenkins/dev%2Fdevelop%2Fcompilation_tests/activity) branch (current development version of LAMMPS) and each pull request.\n\n| ![Pipeline View of Compilation Tests](doc/images/compilation_tests.png \"Compilation Tests pipeline on ci.lammps.org\") | ![Pipeline View of Compilation Tests](doc/images/compilation_tests2.png \"Compilation Tests pipeline on ci.lammps.org for a particular environment\") |\n|---|---|\n\n### Running compilation tests locally\n\nYou can build all compilation tests at once as follows:\n\n```bash\n# this will launch all ubuntu, centos and windows compilation tests\nlammps_test compile\n```\n\nTo limit the compilation tests use the environment name as selector:\n\n```bash\n# only run ubuntu compilation tests\nlammps_test compile ubuntu\n```\n\nIf only a few builds in an environment should be run specify them with their full name:\n\n\n```bash\n# only run 'cmake_mpi_smallbig_shared' compilation test on ubuntu\nlammps_test compile ubuntu/cmake_mpi_smallbig_shared\n\n# run two compilations tests on ubuntu\nlammps_test compile ubuntu/cmake_serial_smallsmall_static ubuntu/cmake_mpi_smallbig_shared\n\n# run only legacy compilation tests\nlammps_test compile ubuntu/legacy*\n```\n\n## Build directories\n\nEach build will create its own working directory based on the current Git SHA\nof the `LAMMPS_DIR` checkout.\n\nIt will be located in: `$LAMMPS_CACHE_DIR/builds_\u003cCURENT_LAMMPS_SHA\u003e/\u003cCONFIG_NAME\u003e/\u003cBUILD_NAME\u003e`\n\n### Example:\n\n```bash\nlammps_test compile ubuntu/cmake_mpi_smallbig_shared\n```\n\nwill create the folder:\n`$LAMMPS_CACHE_DIR/builds_\u003cCURENT_LAMMPS_SHA\u003e/ubuntu/cmake_mpi_smallbig_shared`\n\nTo modify this behaviour and use the same build directory, independent of the current SHA, use the `--ignore-commit` option:\n\n### Example:\n\n```bash\nlammps_test compile --ignore-commit ubuntu/cmake_mpi_smallbig_shared\n```\n\nwill create the folder:\n`$LAMMPS_CACHE_DIR/builds/ubuntu/cmake_mpi_smallbig_shared`\n\n## Run Tests\n\nRun tests define a set of test cases which will execute LAMMPS input scripts.\nWe only observe if the test case completes without an error. Similar to\ncompilation tests, each configuration can define a list of `run_tests` in\ntheir YAML file. The names correspond to folders in the\n`scripts/run_tests` directory.\n\n```yaml\ndisplay_name: 'Ubuntu 18.04'\ncontainer_image: 'ubuntu18.04'\nbuilds:\n - cmake_kokkos_mpi_openmp_clang_shared\n - cmake_mpi_openmp_bigbig_static\n - legacy_mpi_bigbig_shared\n - legacy_serial_openmp_smallsmall_static\n\nrun_tests:\n - cmake_testing_serial\n - cmake_testing_mpi\n - cmake_testing_openmp\n```\n\nEach run test consists of two scripts:\n\nbuild.sh:\n    A script which compiles a LAMMPS binary for testing\n\ntest.sh:\n    A script which launches the test suite\n\n\nTo launch all run tests at once use the `lammps_test run` command:\n\n```bash\n# this will launch all ubuntu, centos and windows run tests\nlammps_test runtest\n```\n\nTo only test a single environment:\n\n```bash\n# only run a single ubuntu run tests\nlammps_test runtest run ubuntu/*\n```\n\nTo further limit the run tests to invividual builds, specify each build individual:\n\n\n```bash\n# Launch serial run tests on ubuntu\nlammps_test runtest run ubuntu/cmake_testing_serial\n\n# Lauch MPI and OpenMP run tests on ubuntu\nlammps_test runtest run ubuntu/cmake_testing_mpi ubuntu/cmake_testing_openmp\n```\n\n## Regression Tests\n\nRegression tests are similar to run tests. However, they not only require\nscripts to complete without an error, but that their generated outputs are\n\"identical\" to the ones of a reference run.\n\nRegression tests are defined for each configuration by adding a\n`regression_tests` list to their YAML file. The names correspond to folders\nin the `scripts/regression_tests` directory.\n\n```yaml\ndisplay_name: 'Ubuntu 18.04'\ncontainer_image: 'ubuntu18.04'\nbuilds:\n - cmake_kokkos_mpi_openmp_clang_shared\n - cmake_mpi_openmp_bigbig_static\n - legacy_mpi_bigbig_shared\n - legacy_serial_openmp_smallsmall_static\n\n...\n\nregression_tests:\n - cmake_regression_mpi\n```\n\nEach regression test consists of two scripts:\n\nbuild.sh:\n    A script which compiles a LAMMPS binary for testing\n\ntest.sh:\n    A script which launches the test suite\n\n\nTo launch all regressions tests at once use the `lammps_test reg` command:\n\n```bash\n# this will launch all ubuntu, centos and windows regression tests\nlammps_test reg run\n```\n\nTo only test a single environment specify the environment name:\n\n```bash\n# only run ubuntu regression tests\nlammps_test reg run ubuntu\n```\n\nTo further limit the regression tests to individual builds, specify the full name:\n\n```bash\n# Launch serial regression tests on ubuntu\nlammps_test reg run ubuntu/cmake_regression_mpi\n```\n\n\u003e **NOTE**:  Both `lammps_test runtest` and `lammps_test reg` have the `--build-only` and `--test-only` option. Use them to avoid one of the two phases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flammps%2Flammps-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flammps%2Flammps-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flammps%2Flammps-testing/lists"}