[CTest] best practice for running tests on a cluster

I’m wondering what the best way to run tests on a cluster would be when I use CTest. The objective is to run a number of tests on the compute nodes of a cluster that has the SLURM resource aanager. Any tips are welcome :slight_smile:

@chuckatkins? My gut says that the test commands would need to use slrum, but maybe there’s some other trick available.

Ok, I suspected as much as googling did not turn up much.

Some testing shows that it is easy to do with an interactive job, e.g. to run an 8-core “test_command” on a single node:

add_test(NAME test_srun 
         COMMAND srun --nodes 1 --output test_output-%A.out 
                 mpirun -n 8 <test_command> <test_options>)