It's UWAweek 47

help5507

This forum is provided to promote discussion amongst students enrolled in CITS5507 High Performance Computing.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 148 articles.
Currently 21 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍?
helpful
5:19pm Fri 6th Sep, ANONYMOUS

Moreover I have never tried to use sbatch before because I thought running a program with srun should have identical or at least similar performance.

For example, if I were you I would run openmp_101-b.sh as:

cc -fopenmp -o openmp_101 ./openmp_101.c

export OMP_NUM_THREADS=56 # Anything you want

srun \
    --account=courses0101 \
    --partition=work \
    --nodes=1 \
    --ntasks=1 \
    --ntasks-per-node=1 \
    --cpus-per-task=28 \
    --mem=100G \
    --time=00:30:00 \
    --qos=high \
    --mail-type=END,FAIL \
    [email protected] \
    ./openmp_101

This worked well for all of my programs so I have never used sbatch.

To answer your question I tried to execute your program using sbatch openmp_101-b.sh and it indeed completed within 15 seconds. However when I used the commands above to execute the program directly using srun, the program would take more than 140 seconds to complete. In this case, srun is much slower than sbatch.

I felt confused and tried to execute my project 1 using sbatch. And it would take forever to complete the multiplication. However, normally my program would take around two minutes to complete the multiplication. In this case, sbatch is much slower than srun.

So now I am also getting confused. I don't know the reason behind this, so hopefully there will be anyone to answer this. However before ending my post I still want to share some fun facts I observed:

If you remove the rand() call and replace it with something like i*i, sbatch will be much slower than srun. This is funny as my project did not use rand(), so I guess the performance difference may have something to do with rand(). Moreover, if you do not use rand() in your code and use srun to run your program directly under different thread counts you can notice a difference.

I just don't know why.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy