Skip to content

Commit

Permalink
Updating config file to allow SiteCustom section. Updated example ini…
Browse files Browse the repository at this point in the history
… files to reflect the change
  • Loading branch information
hagertnl committed Sep 5, 2024
1 parent e12a087 commit 9fb0522
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 38 deletions.
8 changes: 4 additions & 4 deletions configs/example_machine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ scheduler_type = slurm
joblauncher_type = srun
cpus_per_node = 16
gpus_per_node = 1
batch_queue = batch
project_id = abc123
submit_args =
nccs_test_harness_module = olcf_harness

[RepoDetails]
type_of_repository = git
Expand All @@ -20,6 +16,10 @@ git_ssh_server_url = [email protected]
git_https_server_url = https://github.com

[TestshotDefaults]
batch_queue = batch
project_id = abc123
submit_args =
path_to_sspace = /home/a_user/other_dir
system_log_tag = a_label

[SiteCustom]
22 changes: 0 additions & 22 deletions configs/olcf_examples/crusher.ini

This file was deleted.

11 changes: 9 additions & 2 deletions configs/olcf_examples/frontier.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ scheduler_type = slurm
joblauncher_type = srun
cpus_per_node = 56
gpus_per_node = 8
batch_queue = batch
submit_args =

# This section is optional, if you don't have a git repo to connect with.
# Without connecting to a repo, you will need to manually place your tests as needed.
Expand All @@ -20,3 +18,12 @@ git_ssh_server_url = [email protected]
git_https_server_url = https://github.com

[TestshotDefaults]
project_id = <myproject>
batch_queue = batch
submit_args =
path_to_sspace = /path/to/sspace
system_log_tag = frontier_test

[SiteCustom]
# Use this for custom environment variables that you may want to use in tests.
# This is a good place for database environment variables (ie, influxdb_uri, influxdb_token)
11 changes: 9 additions & 2 deletions configs/olcf_examples/summit.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ scheduler_type = lsf
joblauncher_type = jsrun
cpus_per_node = 42
gpus_per_node = 6
batch_queue = batch
submit_args =

# This section is optional, if you don't have a git repo to connect with.
# Without connecting to a repo, you will need to manually place your tests as needed.
Expand All @@ -20,3 +18,12 @@ git_ssh_server_url = [email protected]
git_https_server_url = https://github.com

[TestshotDefaults]
project_id = <myprojectid>
batch_queue = batch
submit_args =
path_to_sspace = /path/to/sspace
system_log_tag = frontier_test

[SiteCustom]
# Use this for custom environment variables that you may want to use in tests.
# This is a good place for database environment variables (ie, influxdb_uri, influxdb_token)
16 changes: 8 additions & 8 deletions harness/libraries/config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class rgt_config_file:
# These are the named sections in the config file.
machine_section = 'MachineDetails'
repository_section = 'RepoDetails'
influx_section = 'InfluxDefaults'
site_section = 'SiteCustom'
testshot_section = 'TestshotDefaults'

def __init__(self,
Expand All @@ -18,7 +18,7 @@ def __init__(self,

self.__machine_vars = {}
self.__repo_vars = {}
self.__influx_vars = {}
self.__site_vars = {}
self.__testshot_vars = {}

if machinename != None:
Expand Down Expand Up @@ -55,10 +55,10 @@ def __read_config_file(self):
self.__repo_vars = master_cfg[rgt_config_file.repository_section]
set_harness_environment(self.__repo_vars)

# Make Influx section optional, since some users don't use Influx
if master_cfg.has_section(rgt_config_file.influx_section):
self.__influx_vars = master_cfg[rgt_config_file.influx_section]
set_harness_environment(self.__influx_vars)
# Site-cutom configuration section is optional
if master_cfg.has_section(rgt_config_file.site_section):
self.__site_vars = master_cfg[rgt_config_file.site_section]
set_harness_environment(self.__site_vars)

self.__testshot_vars = master_cfg[rgt_config_file.testshot_section]
set_harness_environment(self.__testshot_vars)
Expand All @@ -74,8 +74,8 @@ def get_machine_config(self):
def get_repository_config(self):
return self.__repo_vars

def get_influx_config(self):
return self.__influx_vars
def get_site_config(self):
return self.__site_vars

def get_testshot_config(self):
return self.__testshot_vars
Expand Down

0 comments on commit 9fb0522

Please sign in to comment.