Skip to content

Issue with intra-node test for OSU bandwidth GPU <=> GPU test #291

Closed

Description

@casparvl

I see strongly varying performance in the OSU bandwidth test on GPU partitions. It flips between two modes, where the bandwidth corresponds to intra and internode bandwidth - even though this is supposed to be an intranode test.

Image

Diving into the performance logs, I see that sometimes two nodes are allocated to this test. The full batch script is:

#!/bin/bash
#SBATCH --job-name="rfm_EESSI_OSU_pt2pt_GPU_87fbf5ce"
#SBATCH --ntasks=2
#SBATCH --ntasks-per-node=2
#SBATCH --cpus-per-task=32
#SBATCH --output=rfm_job.out
#SBATCH --error=rfm_job.err
#SBATCH --time=0:30:0
#SBATCH -p gpu_h100
#SBATCH --export=None
#SBATCH --mem=737280M
#SBATCH --gpus-per-node=4
source /cvmfs/software.eessi.io/versions/2023.06/init/bash
module load OSU-Micro-Benchmarks/7.5-gompi-2023b-CUDA-12.4.0
export OMP_NUM_THREADS=32
export I_MPI_PIN_CELL=core
export I_MPI_PIN_DOMAIN=32:compact
export OMPI_MCA_rmaps_base_mapping_policy=slot:PE=32
mpirun -np 2 osu_bw -m 4194304 -x 5 -i 10 -c -d cuda D D
echo "EESSI_CVMFS_REPO: $EESSI_CVMFS_REPO"
echo "EESSI_SOFTWARE_SUBDIR: $EESSI_SOFTWARE_SUBDIR"
echo "FULL_MODULEPATH: $(module --location show OSU-Micro-Benchmarks/7.5-gompi-2023b-CUDA-12.4.0)"

Surprisingly, I found out from the slurm docs that --ntasks-per-node=2 is a maximum. I.e. SLURM essentially is allowed to assign you two nodes, and give you 1 task per node - which it apparently does. The only way that I've found to prevent it, is by setting --nodes, though maybe --exclusive will also help.

I find it a weird decision by SLURM to give you more resources than absolutely needed to fulfill the request. But we have to deal with it. One option may be to set the use_nodes_option to the scheduler, see https://reframe-hpc.readthedocs.io/en/stable/config_reference.html#config.systems.partitions.sched_options.use_nodes_option . I'm not sure, the --exclusive flag may also help, but it's hard to validate as the issue doesn't consistently happen.

Activity

  1. casparvl commented on Nov 5, 2025

    @casparvl
    CollaboratorAuthor

    I've tried the use_nodes_option. The job script now looks like this:

    #!/bin/bash
    #SBATCH --job-name="rfm_EESSI_OSU_pt2pt_GPU_87fbf5ce"
    #SBATCH --ntasks=2
    #SBATCH --ntasks-per-node=2
    #SBATCH --cpus-per-task=32
    #SBATCH --output=rfm_job.out
    #SBATCH --error=rfm_job.err
    #SBATCH --time=0:30:0
    #SBATCH --nodes=1
    #SBATCH -p gpu_h100
    #SBATCH --export=None
    #SBATCH --mem=737280M
    #SBATCH --gpus-per-node=4
    source /cvmfs/software.eessi.io/versions/2023.06/init/bash
    module load OSU-Micro-Benchmarks/7.5-gompi-2023b-CUDA-12.4.0
    export OMP_NUM_THREADS=32
    export I_MPI_PIN_CELL=core
    export I_MPI_PIN_DOMAIN=32:compact
    export OMPI_MCA_rmaps_base_mapping_policy=slot:PE=32
    mpirun -np 2 osu_bw -m 4194304 -x 5 -i 10 -c -d cuda D D
    echo "EESSI_CVMFS_REPO: $EESSI_CVMFS_REPO"
    echo "EESSI_SOFTWARE_SUBDIR: $EESSI_SOFTWARE_SUBDIR"
    echo "FULL_MODULEPATH: $(module --location show OSU-Micro-Benchmarks/7.5-gompi-2023b-CUDA-12.4.0 2>&1)"
    

    Note specifically the #SBATCH --nodes=1 that got added there. This should be sufficient to get what we want... I'll push this for our own config, see if indeed we then get consistent results. If so, I think we should update all configs with this change...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions