Skip to content

Commit

Permalink
update the jarvis package to support dervied quantity and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
waugh2010 committed Apr 24, 2024
1 parent a2ab065 commit 8e873e6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
29 changes: 23 additions & 6 deletions test/jarvis/jarvis_coeus/jarvis_coeus/adios2_gray_scott/pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand All @@ -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',
Expand Down Expand Up @@ -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={
Expand All @@ -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))
Expand Down

0 comments on commit 8e873e6

Please sign in to comment.