Skip to content

Commit

Permalink
Values extraction #53 configuration files addition/modification
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguypierre committed Jul 8, 2024
1 parent cce3f33 commit 0c6763b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 10 deletions.
14 changes: 11 additions & 3 deletions launchProcess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ toolboxes=()
cases=()
directories=()
listing=false
#disk_path="/home" # for local
disk_path="/data/scratch" # for gaya, could also be: /data/home, /nvme0
disk_path="/home" # for local
#disk_path="/data/scratch" # for gaya, could also be: /data/home, /nvme0


if [ $# -lt 1 ] || [ "$*" == "-h" ] || [ "$*" == "--help" ]; then
Expand Down Expand Up @@ -125,6 +125,10 @@ fi
# | PROCESS START |
# +-------------------------------------------------+

# Here, we need to call configReader for getting every path and so on
# But some configuration are needed to be exported before calling reframe
# How to do it best ?

# Cleaning for avoiding interactions to be enhanced !!
rm -rf ~/feelppdb/benchmarking
rm -rf ./build/reframe/output/ ./build/reframe/stage/ ./build/reframe/perflogs
Expand Down Expand Up @@ -177,6 +181,10 @@ for tb in "${toolboxes[@]}"; do
fi

if $matched; then
#echo " > relative_path: $relative_path"
#echo " > relative_dir: $relative_dir"
#echo " > base_name: $base_name"

counter=$((counter + 1))
toolboxCounter=$((toolboxCounter + 1))

Expand All @@ -187,7 +195,7 @@ for tb in "${toolboxes[@]}"; do
yes '-' | head -n "$columns" | tr -d '\n'
echo "[Starting $relative_path]"
report_path=$(pwd)/docs/modules/${hostname}/pages/reports/${tb}/${relative_dir}/${current_date}-${base_name}.json
reframe -c "$RFM_TEST_DIR/toolboxTest.py" -S "case=$cfgPath" -r --system="$hostname" --report-file="$report_path" --exec-policy=serial
reframe -C $(pwd)/src/feelpp/benchmarking/reframe/config-files/globalConfig.py -C $(pwd)/src/feelpp/benchmarking/reframe/config-files/local.py -c "$RFM_TEST_DIR/toolboxTest.py" -S case=$cfgPath -r #--system=$hostname #--report-file="$report_path" --exec-policy=serial
fi
fi
done < <(find "$extended_path" -type f -name "*.cfg")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
'devices': [
{
'name': 'cpu_node',
'type': 'cpu',
'num_devices': 1 # --> to be set to 6 when MPI_ERR_TRUNCATE resolved
}
]
Expand Down
22 changes: 22 additions & 0 deletions src/feelpp/benchmarking/reframe/config-files/globalConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
site_configuration = {
'general': [
{
'report_file': '${HOME}/COUCOU.json',
#'remote_detect': True
}
],
'modes': [
{
'name': 'serial',
'options': [
'--exec-policy=serial'
]
},
{
'name': 'async',
'options': [
'--exec-policy=aysnc'
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
'devices': [
{
'name': 'cpu-node',
'type': 'cpu',
'num_devices': 1
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

@rfm.simple_test
class HeatToolboxTest (Setup):

descr = 'Launch testcases from the Heat Toolbox'
toolbox = 'heat'
#toolbox = variable(str)
Expand All @@ -28,18 +27,18 @@ def build_paths(self):
@run_before('run')
def set_executable_opts(self):
self.executable = f'feelpp_toolbox_{self.toolbox}'
self.executable_opts = [f'--config-file {self.case}',
self.executable_opts = [f'--config-files {self.case}',
f'--repository.prefix {self.feelppdbPath}',
f'--repository.case {self.relativeOutputPath}',
'--repository.append.np 0',
'--heat.scalability-save 1']
'--heat.scalability-save 1',
'--fail-on-unknown-option 1']
#'--case.discretization PXXX'


# Capture patterns
namePatt = '([a-zA-z\-]+)'
valPatt = '([0-9e\-\+\.]+)'


def get_constructor_name(self, index=1):
scalePath = os.path.join(self.feelOutputPath, f'{self.toolbox}.scalibility.{self.toolbox.capitalize()}Constructor.data')
return sn.extractsingle(rf'nProc[\s]+{self.namePatt}[\s]+{self.namePatt}[\s]+{self.namePatt}[\s]+{self.namePatt}[\s]+{self.namePatt}[\s]+{self.namePatt}[\s]+{self.namePatt}[\s]+{self.namePatt}[\s]+',
Expand Down

0 comments on commit 0c6763b

Please sign in to comment.