From 8e873e68f65c2328122b7b178233729a9a1f32f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Apr 2024 21:30:02 -0500 Subject: [PATCH] update the jarvis package to support dervied quantity and readme --- .../jarvis_coeus/adios2_gray_scott/README.md | 12 ++++++-- .../jarvis_coeus/adios2_gray_scott/pkg.py | 29 +++++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/README.md b/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/README.md index 91c939ed..2f0781e0 100644 --- a/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/README.md +++ b/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/README.md @@ -1,7 +1,7 @@ Gray-Scott is a 3D 7-Point stencil code # Installation - +The gray_scott is installed along with coeus-adapter, these step can skip ```bash git clone https://github.com/pnorbert/adiosvm pushd adiosvm/Tutorial/gs-mpiio @@ -21,7 +21,7 @@ popd Create the environment variables needed by Gray Scott ```bash spack load mpi -export PATH="${GRAY_SCOTT_PATH}:$PATH" +export PATH="${COEUS_Adapter/build/bin}:$PATH" ``````````` ## 1. Create a Resource Graph @@ -90,7 +90,7 @@ spack load hermes adios2 # On Ares spack load hermes@master # export GRAY_SCOTT_PATH=$/coeus_adapter/build/bin -export PATH="${GRAY_SCOTT_PATH}:$PATH" +export PATH="${COEUS_Adapter/build/bin}:$PATH" ``` ## 2. Create a Resource Graph @@ -135,6 +135,12 @@ jarvis pipeline append hermes_run --sleep=10 --provider=sockets jarvis pipeline append adios2_gray_scott engine=hermes ``` +For derived variable with adios2 in hermes: +```bash +jarvis pipeline append hermes_run --sleep=10 --provider=sockets +jarvis pipeline append adios2_gray_scott engine=hermes_derived +``` + ## 5. Run the Experiment Run the experiment diff --git a/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/pkg.py b/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/pkg.py index 74c852b7..dced2995 100644 --- a/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/pkg.py +++ b/test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/pkg.py @@ -153,7 +153,7 @@ def _configure_menu(self): { 'name': 'engine', 'msg': 'Engine to be used', - 'choices': ['bp5', 'hermes'], + 'choices': ['bp5', 'hermes', 'bp5_derived', 'hermes_derived'], 'type': str, 'default': 'bp5', }, @@ -163,6 +163,12 @@ def _configure_menu(self): 'type': bool, 'default': True, }, + { + 'name': 'limit', + 'msg': 'Limit the value of data to track', + 'type': int, + 'default': 0, + }, { 'name': 'db_path', 'msg': 'Path where the DB will be stored', @@ -215,11 +221,11 @@ def _configure(self, **kwargs): env=self.env)) JsonFile(self.settings_json_path).save(settings_json) - - if self.config['engine'].lower() == 'bp5': + print(f"Using engine {self.config['engine']}") + if self.config['engine'].lower() in ['bp5', 'bp5_derived']: self.copy_template_file(f'{self.pkg_dir}/config/adios2.xml', self.adios2_xml_path) - elif self.config['engine'].lower() == 'hermes': + elif self.config['engine'].lower() in ['hermes', 'hermes_derived']: self.copy_template_file(f'{self.pkg_dir}/config/hermes.xml', self.adios2_xml_path, replacements={ @@ -243,8 +249,19 @@ def start(self): :return: None """ # print(self.env['HERMES_CLIENT_CONF']) - Exec(f'adios2-gray-scott {self.settings_json_path}', - MpiExecInfo(nprocs=self.config['nprocs'], + if self.config['engine'].lower() in ['bp5_derived', 'hermes_derived']: + derived = 1 + Exec(f'adios2-gray-scott {self.settings_json_path} {derived}', + MpiExecInfo(nprocs=self.config['nprocs'], + ppn=self.config['ppn'], + hostfile=self.jarvis.hostfile, + env=self.mod_env, + do_dbg=self.config['do_dbg'], + dbg_port=self.config['dbg_port'] + )) + elif self.config['engine'].lower() in ['hermes', 'bp5']: + Exec(f'adios2-gray-scott {self.settings_json_path}', + MpiExecInfo(nprocs=self.config['nprocs'], ppn=self.config['ppn'], hostfile=self.jarvis.hostfile, env=self.mod_env))