Skip to content

TaperChipmunk32/CSC5760-Homework03

Repository files navigation

CSC5760 and CSC4760 Parallel Programming Homework 03

Notes on running files on TN Tech Cluster

Sign in to login shell with your user account.

Accessing gpu nodes

Find what accounts you can access, run sacctmgr show assoc format=account%20 This should show that you can access an account named csc4760-001-2024s To enter a node with GPU access, hpcshell --cpus-per-task=2 --gres=gpu --account=csc4760-001-2024s

Running Kokkos programs with Cuda

Use the spack package manager to load the desired combination of Kokkos, gcc, and Cuda spack load kokkos%gcc@12 +cuda

Enter the desired example or problem folder and run: KOKKOS_DEVICES=Cuda make This sets up all of the sources files.

To run the final executables: LD_LIBRARY_PATH=$(spack location -i cuda@12)/lib64 ./program_name.cuda

Running Kokkos without Cuda

To use without Cuda, you will want to load the Cuda-less Kokkos packages spack load kokkos%gcc@12 ~cuda

Run these inside the desired example or problem KOKKOS_DEVICES=OpenMP make ./program_name.host

Running MPI and Kokkos

Do the above steps for, but also load OpenMPI with, spack load [email protected]%gcc@=8.5.0 arch=linux-rocky8-x86_64_v3 Make as normal To run MPI+Kokkos mpirun -n 2 ./prog.host You may also have to add --oversubscribe flag

License

License

Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software.

The full license statement used in all headers is available here or here.

This notice shows that this is a derivative work (if extensively changed) of the Kokkos tutorials and Kokkos repository.