Skip to content

Commit

Permalink
adde node.json file on LC to default - can configure this later, shou…
Browse files Browse the repository at this point in the history
…ldn't fail if not found
  • Loading branch information
dyokelson committed Dec 11, 2024
1 parent ce9d179 commit 8031519
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modifiers/caliper/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Caliper(SpackModifier):

env_var_modification(
"CALI_CONFIG",
"spot(output={}{}),metadata(file={})".format(_cali_datafile, "${CALI_CONFIG_MODE}", _caliper_metadata_file),
"spot(output={}{}),metadata(file={}),metadata(file=/etc/node_info.json,keys=\"host.name,host.cluster,host.os\")".format(_cali_datafile, "${CALI_CONFIG_MODE}", _caliper_metadata_file),
method="set",
modes=[_default_mode],
)
Expand Down Expand Up @@ -102,7 +102,7 @@ def _build_metadata(self, workspace, app_inst):

# Write to the Caliper metadata file
cali_metadata_file = self.expander.expand_var(self._caliper_metadata_file)
print(f"writing to %s", cali_metadata_file)
# print(json.dumps(experiment_metadata))
with open(cali_metadata_file, "w") as f:
f.write(json.dumps(experiment_metadata))

Expand All @@ -111,5 +111,4 @@ def _build_metadata(self, workspace, app_inst):

software_spec("caliper", pkg_spec="caliper")

required_package("caliper")

required_package("caliper")

0 comments on commit 8031519

Please sign in to comment.