-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create 'lite' launcher for RP #3099
Comments
This is how it will look for the user: The same (*) one of the options is to use env variables for the provided config json file, keep them as part of the batch script, and |
Launcher to run IMPECCABLE workflow(s) on Frontier #!/bin/bash
WORK_DIR=$PWD/runinfo
if ! test -d "${WORK_DIR}"; then
mkdir -p "${WORK_DIR}"
fi
BASE_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"
CONFIG=$(cat "${BASE_DIR}"/config.json)
ACCOUNT=$(echo "${CONFIG}" | jq -r .run_description.project)
PARTITION=$(echo "${CONFIG}" | jq -r .run_description.queue)
NNODES=$(echo "${CONFIG}" | jq .run_description.nodes)
RUNTIME=$(echo "${CONFIG}" | jq .run_description.walltime)
CORE_SPEC=$(echo "${CONFIG}" | jq .node_description.core_spec)
SMT=$(echo "${CONFIG}" | jq .node_description.smt)
PROJ_HOME_DIR=$(echo "${CONFIG}" | jq -r .env.PROJ_HOME_DIR)
while getopts "m:n:t:" OPTION; do
case $OPTION in
m) MODULE="$OPTARG" ;;
n) NNODES="$OPTARG" ;;
t) RUNTIME="$OPTARG" ;;
*) exit 1 ;;
esac
done
if ! test -z "$MODULE"; then
OPT_MODULE="-m $MODULE"
fi
OPT_NNODES="-n $NNODES"
OPT_RUNTIME="-t $RUNTIME"
cat > /tmp/$$.slurm <<EOT
#!/bin/sh
#SBATCH --account $ACCOUNT
#SBATCH --partition $PARTITION
#SBATCH --nodes $NNODES
#SBATCH --time $(echo "$RUNTIME" | awk '{printf "%02d:%02d:00", $1/60, $1%60}')
#SBATCH --job-name "impeccable.rct"
#SBATCH --chdir $WORK_DIR
#SBATCH --output "slurm.out"
#SBATCH --error "slurm.err"
#SBATCH --core-spec $CORE_SPEC
#SBATCH --threads-per-core $SMT
#SBATCH --export NONE
export RADICAL_PILOT_BASE=$WORK_DIR
source "$PROJ_HOME_DIR/miniconda/bin/activate" rct
python \
$BASE_DIR/impeccable.py $OPT_MODULE $OPT_NNODES $OPT_RUNTIME \
> $WORK_DIR/run_report.txt 2>&1 </dev/null
EOT
echo "Submitting IMPECCABLE workflow (sbatch script: /tmp/$$.slurm)"
sbatch /tmp/$$.slurm |
Proposed launcher will make a batch submission with RP script as a target application.
PMGRLaunchingComponent._prepare_pilot
to create job descriptionPilotLauncher
to make a submission(*) PR for #3094 should be in place
The text was updated successfully, but these errors were encountered: