From 5c49bf27bdcdb8fe09f2b0ccf2fb18af5d2aef94 Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 6 Feb 2025 10:34:39 -0700 Subject: [PATCH] feat: update lammps reaxff to use newer builds Problem: we want to run apptainer with lammps, and not require any spack or previous software installed. This adds an example, and also a new variable that exposes the version of lammps to download. Signed-off-by: vsoch --- examples/apptainer/lammps-reaxff.yaml | 43 +++++++++++++++++++ .../applications/lammps/application.py | 16 ++++--- 2 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 examples/apptainer/lammps-reaxff.yaml diff --git a/examples/apptainer/lammps-reaxff.yaml b/examples/apptainer/lammps-reaxff.yaml new file mode 100644 index 000000000..305fa1e8c --- /dev/null +++ b/examples/apptainer/lammps-reaxff.yaml @@ -0,0 +1,43 @@ +ramble: + modifiers: + - name: apptainer + env_vars: + set: + OMP_NUM_THREADS: '{n_threads}' + variables: + mpi_command: '' + container_uri: docker://ghcr.io/converged-computing/metric-lammps-cpu:libfabric-zen4-reax + container_name: lammps-reax + batch_submit: '{execute_experiment}' + processes_per_node: 1 + gpus_per_node: 0 + # This is how you can add flags + # apptainer_run_args: --nv --bind {container_mounts} --writable-tmpfs + applications: + lammps: # Application name + workloads: + hns-reaxff: # Workload name from application + experiments: + strong_scale: # Arbitrary experiment name + variables: + env_name: apptainer + n_nodes: 1 + lammps_path: /usr + # Add other lammps flags + lammps_flags: "-nocite" + # This is the release that is downloaded + input_stage: stable_29Aug2024_update1 + # The input file used for lammps from the input_path directory + input_file: in.reaxff.hns + # Problem size dimensions for lammps + xx: 2 + yy: 2 + zz: 2 + software: + packages: + apptainer: + pkg_spec: apptainer + environments: + lammps: + packages: + - apptainer diff --git a/var/ramble/repos/builtin/applications/lammps/application.py b/var/ramble/repos/builtin/applications/lammps/application.py index e108a77c6..4537b412a 100644 --- a/var/ramble/repos/builtin/applications/lammps/application.py +++ b/var/ramble/repos/builtin/applications/lammps/application.py @@ -72,12 +72,10 @@ class Lammps(ExecutableApplication): input_file( "lammps-stage", - url="https://github.com/lammps/lammps/archive/refs/tags/stable_23Jun2022_update3.tar.gz", - target_dir="{application_input_dir}/stable_23Jun2022_update3", - description="Stage of lammps source from 20220623.3 release", - sha256="8a276a01b50d37eecfe6eb36f420f354cde51936d20aca7944dea60d3c098c89", + url="https://github.com/lammps/lammps/archive/refs/tags/{input_stage}.tar.gz", + target_dir="{application_input_dir}/lammps-input-stage", + description="Stage of lammps source from release", ) - executable( "copy", template=["cp {input_path} {experiment_run_dir}/input.txt"], @@ -275,12 +273,20 @@ class Lammps(ExecutableApplication): inputs=["lammps-stage"], ) + workload_variable( + "input_stage", + default="stable_23Jun2022_update3.tar.gz", + description="Stage name of LAMMPS input archive", + workloads=["hns-reaxff"] + ) + workload_variable( "input_file", default="in.reaxc.hns", description="hns-reaxff input file name", workloads=["hns-reaxff"], ) + workload_variable( "input_path", default=os.path.join(f"{intel_test_path}"),