|
131 | 131 | fatal_error "Failed to import ${testsuite_import}"
|
132 | 132 | fi
|
133 | 133 |
|
134 |
| - |
135 | 134 | # Configure ReFrame, see https://www.eessi.io/docs/test-suite/installation-configuration
|
136 | 135 | # RFM_CONFIG_FILES _has_ to be set by the site hosting the bot, so that it knows where to find the ReFrame
|
137 | 136 | # config file that matches the bot config. See https://gitlab.com/eessi/support/-/issues/114#note_2293660921
|
@@ -167,46 +166,6 @@ export RFM_SYSTEM="BotBuildTests:${REFRAME_PARTITION_NAME}"
|
167 | 166 | echo "Configured reframe with the following environment variables:"
|
168 | 167 | env | grep "RFM_"
|
169 | 168 |
|
170 |
| -# THIS WHOLE BLOCK SHOULD NO LONGER BE NEEDED IF WE HAVE SITE-SPECIFIC CONFIG FILES |
171 |
| -# # The /sys inside the container is not the same as the /sys of the host |
172 |
| -# # We want to extract the memory limit from the cgroup on the host (which is typically set by SLURM). |
173 |
| -# # Thus, bot/test.sh bind-mounts the host's /sys/fs/cgroup into /hostsys/fs/cgroup |
174 |
| -# # and that's the prefix we use to extract the memory limit from |
175 |
| -# cgroup_v1_mem_limit="/hostsys/fs/cgroup/memory/$(</proc/self/cpuset)/memory.limit_in_bytes" |
176 |
| -# cgroup_v2_mem_limit="/hostsys/fs/cgroup/$(</proc/self/cpuset)/memory.max" |
177 |
| -# if [ -f "$cgroup_v1_mem_limit" ]; then |
178 |
| -# echo "Getting memory limit from file $cgroup_v1_mem_limit" |
179 |
| -# cgroup_mem_bytes=$(cat "$cgroup_v1_mem_limit") |
180 |
| -# elif [ -f "$cgroup_v2_mem_limit" ]; then |
181 |
| -# echo "Getting memory limit from file $cgroup_v2_mem_limit" |
182 |
| -# cgroup_mem_bytes=$(cat "$cgroup_v2_mem_limit") |
183 |
| -# if [ "$cgroup_mem_bytes" = 'max' ]; then |
184 |
| -# # In cgroupsv2, the memory.max file may contain 'max', meaning the group can use the full system memory |
185 |
| -# # Here, we get the system memory from /proc/meminfo. Units are supposedly always in kb, but lets match them too |
186 |
| -# cgroup_mem_kilobytes=$(grep -oP 'MemTotal:\s+\K\d+(?=\s+kB)' /proc/meminfo) |
187 |
| -# if [[ $? -ne 0 ]] || [[ -z "$cgroup_mem_kilobytes" ]]; then |
188 |
| -# fatal_error "Failed to get memory limit from /proc/meminfo" |
189 |
| -# fi |
190 |
| -# cgroup_mem_bytes=$(("$cgroup_mem_kilobytes"*1024)) |
191 |
| -# fi |
192 |
| -# else |
193 |
| -# fatal_error "Both files ${cgroup_v1_mem_limit} and ${cgroup_v2_mem_limit} couldn't be found. Failed to get the memory limit from the current cgroup" |
194 |
| -# fi |
195 |
| -# if [[ $? -eq 0 ]]; then |
196 |
| -# # Convert to MiB |
197 |
| -# cgroup_mem_mib=$(("$cgroup_mem_bytes"/(1024*1024))) |
198 |
| -# else |
199 |
| -# fatal_error "Failed to get the memory limit in bytes from the current cgroup" |
200 |
| -# fi |
201 |
| -# echo "Detected available memory: ${cgroup_mem_mib} MiB" |
202 |
| -# |
203 |
| -# cp ${RFM_CONFIG_FILE_TEMPLATE} ${RFM_CONFIG_FILES} |
204 |
| -# echo "Replacing memory limit in the ReFrame config file with the detected CGROUP memory limit: ${cgroup_mem_mib} MiB" |
205 |
| -# sed -i "s/__MEM_PER_NODE__/${cgroup_mem_mib}/g" $RFM_CONFIG_FILES |
206 |
| -# RFM_PARTITION="${SLURM_JOB_PARTITION}" |
207 |
| -# echo "Replacing partition name in the template ReFrame config file: ${RFM_PARTITION}" |
208 |
| -# sed -i "s/__RFM_PARTITION__/${RFM_PARTITION}/g" $RFM_CONFIG_FILES |
209 |
| - |
210 | 169 | # Make debugging easier by printing the final config file:
|
211 | 170 | echo "ReFrame config file used:"
|
212 | 171 | cat "${RFM_CONFIG_FILES}"
|
|
0 commit comments