Skip to content

Commit

Permalink
almost working, just needs the values from ramble.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dyokelson committed Dec 9, 2024
1 parent fe779ee commit dd6bd06
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions modifiers/caliper/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ class Caliper(SpackModifier, BaseModifier):
# The filename for metadata forwarded from Benchpark to Caliper
_caliper_metadata_file = "{experiment_run_dir}/{experiment_name}_metadata.json"

<<<<<<< HEAD
=======
# The metadata dictionary
caliper_metadata = {"application_name": "{application_name}", "experiment_name": "{experiment_name}",
"workload_name": "{workload_name}"}

>>>>>>> 7eda7b6 (initial checkin, needs merge and initial testing)
_default_mode = "time"

# Write out the metadata file once all variables are resolved
Expand All @@ -56,11 +49,7 @@ class Caliper(SpackModifier, BaseModifier):

env_var_modification(
"CALI_CONFIG",
<<<<<<< HEAD
"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),
=======
"spot(output={}),metadata(file={})".format(_cali_datafile, _caliper_metadata_file),
>>>>>>> 7eda7b6 (initial checkin, needs merge and initial testing)
method="set",
modes=[_default_mode],
)
Expand Down Expand Up @@ -103,7 +92,6 @@ class Caliper(SpackModifier, BaseModifier):

def _build_metadata(self, workspace, app_inst):
''' Write the caliper metadata to json '''
<<<<<<< HEAD
# Load the Caliper metadata variable from ramble.yaml
# experiment_metadata = self.expander.expand_var('caliper_metadata', typed=True, merge_used_stage=False)
# Error: expand_var() got an unexpected keyword argument 'merge_used_stage'
Expand All @@ -117,27 +105,10 @@ def _build_metadata(self, workspace, app_inst):
# print(json.dumps(experiment_metadata))
with open(cali_metadata_file, "w") as f:
f.write(json.dumps(experiment_metadata))
=======

# Load the Caliper metadata variable from ramble.yaml
experiment_metadata = self.expander.expand_var('caliper_metadata', typed=True, merge_used_stage=False)
self.expander.flush_used_variables()

# Write
cali_metadata_file = self.expander.expand_var(_caliper_metadata_file)

with open(cali_metadata_file, "w+") as f:
json.dump(experiment_metadata, stream=f)
>>>>>>> 7eda7b6 (initial checkin, needs merge and initial testing)


archive_pattern(_cali_datafile)

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

<<<<<<< HEAD
required_package("caliper")
=======
required_package("caliper")

>>>>>>> 7eda7b6 (initial checkin, needs merge and initial testing)

0 comments on commit dd6bd06

Please sign in to comment.