Skip to content

Enable running some commands before the bootstrap, similar to prerun_cmds in regular tests #2979

@casparvl

Description

@casparvl

The current job generated by the remote CPU detection script is:

#!/bin/bash
#SBATCH --job-name="rfm-detect-job"
#SBATCH --ntasks=1
#SBATCH --output=rfm-detect-job.out
#SBATCH --error=rfm-detect-job.err

_onerror()
{
    exitcode=$?
    echo "-reframe: command \`$BASH_COMMAND' failed (exit code: $exitcode)"
    exit $exitcode
}

trap _onerror ERR

./bootstrap.sh
mpirun -np 1 ./bin/reframe --detect-host-topology=topo.json

There is no option for the user to change this in any way currently, even though regular reframe tests have to option to define prerun_cmds to e.g. make some module environment available.

When I hit the issue in #2926 I found that I had quite few options for debugging. E.g. I wanted to provide a different pip through a virtualenv, to see if that was my problem. Something like prerun_cmds would enable one to do that. Admittedly, it's not a very concrete use case. Hence, @vkarak suggested to make this separate issue and wait for a more concrete use case before implementing it.

So, if someone also runs into a situation where having a prerun_cmds in the CPU autodetect script would have been useful to them: please let us know here :)

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions