Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/toolbox_heat/thermal_bridges_case_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"output_directory": "{{machine.output_app_dir}}/toolboxes/heat/ThermalBridgesENISO10211/Case3",
"use_case_name": "ThermalBridgesENISO10211",
"timeout":"0-00:10:00",
"memory":"250G",
"platforms": {
"apptainer":{
"image": {
Expand Down Expand Up @@ -31,7 +32,7 @@
"--heat.json.patch='{\"op\": \"replace\",\"path\": \"/Meshes/heat/Import/filename\",\"value\": \"{{platforms.{{machine.platform}}.input_dir}}/partitioning/case3/{{parameters.meshes.value}}/case3_p{{parameters.nb_tasks.tasks.value}}.json\" }'"
],
"env_variables":{
"OMP_NUM_THREADS":1
"OMP_NUM_THREADS":"1"
},
"outputs": [
{
Expand Down
16 changes: 13 additions & 3 deletions src/feelpp/benchmarking/reframe/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,17 @@ def buildExecutionMode(self):
else:
return "-r"

def buildCommand(self,timeout):
def buildJobOptions(self,timeout,memory):
#TODO: Generalize (only workf for slurm ?)
options = []
if timeout:
options.append(f"-J time={timeout}")
if memory:
options.append(f"-J mem={memory}")
return " ".join(options)


def buildCommand(self,timeout,memory):
assert self.report_folder_path is not None, "Report folder path not set"
cmd = [
'reframe',
Expand All @@ -53,7 +63,7 @@ def buildCommand(self,timeout):
f'--exec-policy={self.machine_config.execution_policy}',
f'--prefix={self.machine_config.reframe_base_dir}',
f'--report-file={str(os.path.join(self.report_folder_path,"reframe_report.json"))}',
f"-J '#SBATCH --time={timeout}'",
f"{self.buildJobOptions(timeout,memory)}",
f'--perflogdir={os.path.join(self.machine_config.reframe_base_dir,"logs")}',
f'{"-"+"v"*self.parser.args.verbose if self.parser.args.verbose else ""}',
f'{self.buildExecutionMode()}'
Expand Down Expand Up @@ -97,7 +107,7 @@ def main_cli():
app_reader.updateConfig(machine_reader.processor.flattenDict(machine_reader.config,"machine"))
app_reader.updateConfig() #Update with own field

reframe_cmd = cmd_builder.buildCommand( app_reader.config.timeout )
reframe_cmd = cmd_builder.buildCommand( app_reader.config.timeout, app_reader.config.memory)

exit_code = os.system(reframe_cmd)

Expand Down
1 change: 1 addition & 0 deletions src/feelpp/benchmarking/reframe/config/configSchemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class AdditionalFiles(BaseModel):
class ConfigFile(BaseModel):
executable: str
timeout: str
memory: Optional[str] = None
platforms:Optional[Dict[str,Platform]] = {"builtin":Platform()}
output_directory:Optional[str] = ""
use_case_name: str
Expand Down
Loading