Skip to content
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

slurm schema needs to be developed #295

Closed
shahzebsiddiqui opened this issue Apr 13, 2020 · 2 comments
Closed

slurm schema needs to be developed #295

shahzebsiddiqui opened this issue Apr 13, 2020 · 2 comments
Assignees

Comments

@shahzebsiddiqui
Copy link
Member

Since we don't have a way to inject sbatch keys at the moment if user specify in run section as follows

job_test:
  description: Hello World example with OpenMP using gnu compiler
  type: script
  env:
    srcdir: $WORK/buildtest-stampede2/tests/apps/openmp/src
    exe: hello_sbatch
  run: |
    #SBATCH -N 1
    #SBATCH -n 1
    #SBATCH -p normal
    #SBATCH -t 00:10
    gcc -fopenmp -o $exe $srcdir/omp_hello.c
    OMP_NUM_THREADS=2
    ./$exe

The generated script is the following

(buildtest-framework) login4.stampede2(1113)$ cat .buildtest/hello/job_test.sh
#!/bin/bash
srcdir=$WORK/buildtest-stampede2/tests/apps/openmp/src
exe=hello_sbatch
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -p normal
#SBATCH -t 00:10
gcc -fopenmp -o $exe $srcdir/omp_hello.c
OMP_NUM_THREADS=2
./$exe

The #SBATCH keys need to be specified via executor and buildtest needs to add them before added at the top even before the environment section. If not we will get an error when running the script. Reordering the sbatch directive on top we will get the job submitted properly.

@vsoch
Copy link
Collaborator

vsoch commented Apr 13, 2020

This isn't a bug for the script type, it means that a custom type is needed for slurm, one that can take in the SBATCH variables and then write them to file before the rest of the script.

@vsoch vsoch changed the title sbatch directive out of order slurm schema needs to be developed Apr 13, 2020
@vsoch vsoch transferred this issue from buildtesters/buildtest Apr 13, 2020
@shahzebsiddiqui shahzebsiddiqui transferred this issue from buildtesters/schemas May 6, 2020
@shahzebsiddiqui
Copy link
Member Author

closing this since it is now implemented in #329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants