ENCCS / OpenACC-CUDA-beginners

ENCCS introductory lesson on OpenACC and CUDA
http://enccs.github.io/OpenACC-CUDA-beginners/
8 stars 6 forks source link

create a setup episode linked under reference #2

Open wikfeldt opened 3 years ago

wikfeldt commented 3 years ago

it should include:

wikfeldt commented 3 years ago

using Tetralith

compilation of the fortran solution of the heat equation example fails finding png.h (works for C version for some reason).

Workaround:

wikfeldt commented 3 years ago

@zhmurov @jigo3635 should participants load the nvhpc module in this way or is there a central installation they should use?

jigo3635 commented 3 years ago

@wikfeldt , should be like that. Have been in contact with NSC.

jigo3635 commented 3 years ago

png doesnot work on compute nodes (login node is fine), which I also have already been in contact with NSC support. Anyhow, I just install libpng v1.15. on /proj folder. it can be found at

https://github.com/ENCCS/OpenACC-CUDA-beginners/blob/main/examples/OpenACC/HeatEquation/solution/F90/Makefile

zhmurov commented 3 years ago

@wikfeldt , heat equation example compiles in CUDA. But I don't think I have any allocation on the cluster to try anything now. Or do they have a testing allocation that I can use?

zhmurov commented 3 years ago

I used your workaround. Thanks, BTW!

jigo3635 commented 3 years ago

@wikfeldt , we have allocation at NSC. the project snic2021-22-274 is already valid on Tetralith

jigo3635 commented 3 years ago

Actually I have one issue with CUDA module for the example "pi_MC_openacc.c" calling curand.

$ module add buildenv-gcccuda/10.2-7.3.0-bare $ pgcc -g -O3 -acc -Minfo=accel -ta=nvidia -lcurand pi_MC_openacc.c -o pi_MC_openacc $ ./pi_MC_openacc Pi equals to 3.156600 on CPU Failing in Thread:0 call to cuInit returned error -1: Other

Probably the version is too older 10.2 but the cuda driver is 11.2. I have also installed CUDA 11.2 on the /proj folder $ pgcc -g -O3 -acc -Minfo=accel -ta=nvidia -L/proj/snic2021-22-274/CUDA/11.2.0/lib64 -lcurand pi_MC_openacc.c -o pi_MC_openacc $ $ ./pi_MC_openacc Pi equals to 3.156600 on CPU Pi equals to 3.146000 on GPU

The example is https://github.com/ENCCS/OpenACC-CUDA-beginners/tree/main/examples/OpenACC/pi_monte_carlo/solution/c

jigo3635 commented 3 years ago

it should include:

  • how to get things working on Tetralith (directories, modules, cloning repo, ...)
  • how to use google colab

I can write now for Tetralith, where should we write down, in HackMD, or https://enccs.github.io/ ? Thanks.

wikfeldt commented 3 years ago

all this cluster management needs to be super clear for the participants. The setup page (which i'll send an initial pull request for later tonight) should probably be where we document cluster-specific stuff. would be great if you could add all specific module requirements for each exercise/example as comments here

wikfeldt commented 3 years ago

it should include:

  • how to get things working on Tetralith (directories, modules, cloning repo, ...)
  • how to use google colab

I can write now for Tetralith, where should we write down, in HackMD, or https://enccs.github.io/ ? Thanks.

We should put it in a setup episode i think. Let me send a PR in a minute so you can start adding to it

jigo3635 commented 3 years ago

all this cluster management needs to be super clear for the participants. The setup page (which i'll send an initial pull request for later tonight) should probably be where we document cluster-specific stuff. would be great if you could add all specific module requirements for each exercise/example as comments here

Yes, almost done for these openacc examples, every subfolder includes Makefile and job.sh. But I need to write a wrapper compiling script likes Artem did to load modules.

wikfeldt commented 3 years ago

@jigo3635 and @zhmurov are the issues listed in this conversation now fully resolved on tetralith?