From 7c17b965f89be3fb26eb2e84ce7d3e2417c56150 Mon Sep 17 00:00:00 2001 From: "Oriol.Tinto.Prims" Date: Tue, 16 Jun 2020 15:13:13 +0200 Subject: [PATCH 1/3] Experiment recipes can be specified in param.cfg which allows us to have everything saved there. --- Makefile | 7 +++++++ param.cfg | 3 +++ 2 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 1c36fcf..59d083b 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,13 @@ help: @echo "Modify the file param.cfg to select the branch inside the nemo mirror that you would like to profile." @echo "" @echo +################################################### +# Experiment recipes specified in param.cfg file +experiment: + for recipe in ${experiment_recipes} ; do \ + echo $${recipe} ; \ + $(MAKE) $${recipe} ; \ + done #################################################### # NEMO Sources diff --git a/param.cfg b/param.cfg index 521396b..30c6540 100644 --- a/param.cfg +++ b/param.cfg @@ -19,3 +19,6 @@ trace_steps=20 number_of_processes=48 96 192 # This value will be passed to the slurm parameter --ntasks-per-node (default in mn4 is 48) processes_per_node=48 + +# Which parts of the recipe will be executed when we run make experiment +experiment_recipes = json -- GitLab From 65c4d5f3f1f5f79a7ef034fe6fdd04f255932c66 Mon Sep 17 00:00:00 2001 From: "Oriol.Tinto.Prims" Date: Tue, 16 Jun 2020 16:56:49 +0200 Subject: [PATCH 2/3] Prototype of multiexperiment launcher --- experiment_launcher.cmd | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 experiment_launcher.cmd diff --git a/experiment_launcher.cmd b/experiment_launcher.cmd new file mode 100755 index 0000000..62bbbbd --- /dev/null +++ b/experiment_launcher.cmd @@ -0,0 +1,22 @@ +# Script to control a multiexperiment + +experiments_folder=experiments +experiment_configurations_folder=experiments_to_run + +# Create experiments folder if it does not exist +[ ! -d experiments ] && mkdir ${experiments_folder} + +# Look at the experiments that need to be launched +experiment_configurations=$( ls ${experiment_configurations_folder} ) + +# For each experiment clone the repo there +for experiment in ${experiment_configurations} ; do + # Clone repository to the new experiment folder + git clone . ${experiments_folder}/${experiment} + # Copy the configuration file into the new folder + cp ${experiment_configurations_folder}/${experiment} ${experiments_folder}/${experiment}/param.cfg + # Launch the experiment in background and save the log + cd ${experiments_folder}/${experiment} + nohup make experiment &> log & + cd - +done -- GitLab From 11f6f641e38cd047e90d625ace5dd7a5f1f8b4b5 Mon Sep 17 00:00:00 2001 From: "Oriol.Tinto.Prims" Date: Wed, 17 Jun 2020 16:59:04 +0200 Subject: [PATCH 3/3] Examples of experiment configurations to be executed by the experiment_launcher.cmd --- experiments_to_run/O0 | 24 ++++++++++++++++++++++++ experiments_to_run/Production | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 experiments_to_run/O0 create mode 100644 experiments_to_run/Production diff --git a/experiments_to_run/O0 b/experiments_to_run/O0 new file mode 100644 index 0000000..67108a7 --- /dev/null +++ b/experiments_to_run/O0 @@ -0,0 +1,24 @@ +# Branch to profile +nemo_branch=avoid_error_partition +# Configuration name +configuration_name=BENCH +# the following parameter should be cfgs in case the configuration is based on ORCA or tests if it is based n the bench +configuration_folder=tests +# Details of the configuration which you would put after makenemo, excluding the arch file +configuration_details=-a BENCH +# For BENCH specifies the resolution at which it will run +configuration_resolution=orca1 +# Suffix of the arch file used +arch_file_prefix=O0 +# Enable or disable output (TRUE or FALSE) +output=FALSE +# Number of steps used in test (Adjust acording to cost) +test_steps=200 +trace_steps=20 +# Processes used for the modelfactor +number_of_processes=48 96 +# This value will be passed to the slurm parameter --ntasks-per-node (default in mn4 is 48) +processes_per_node=48 + +# Which parts of the recipe will be executed when we run make experiment +experiment_recipes = json diff --git a/experiments_to_run/Production b/experiments_to_run/Production new file mode 100644 index 0000000..30c6540 --- /dev/null +++ b/experiments_to_run/Production @@ -0,0 +1,24 @@ +# Branch to profile +nemo_branch=avoid_error_partition +# Configuration name +configuration_name=BENCH +# the following parameter should be cfgs in case the configuration is based on ORCA or tests if it is based n the bench +configuration_folder=tests +# Details of the configuration which you would put after makenemo, excluding the arch file +configuration_details=-a BENCH +# For BENCH specifies the resolution at which it will run +configuration_resolution=orca1 +# Suffix of the arch file used +arch_file_prefix=prod +# Enable or disable output (TRUE or FALSE) +output=FALSE +# Number of steps used in test (Adjust acording to cost) +test_steps=200 +trace_steps=20 +# Processes used for the modelfactor +number_of_processes=48 96 192 +# This value will be passed to the slurm parameter --ntasks-per-node (default in mn4 is 48) +processes_per_node=48 + +# Which parts of the recipe will be executed when we run make experiment +experiment_recipes = json -- GitLab