Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$ module load openmpi/version
$ cc -c main.c 
$ cc -o main main.o -L/usr/local/mylib/libs -l<library-name>

...

To compile openACC enabled code or MPI+openACC enabled code, use -fopenmp fopenacc flag during compilation

Code Block
$ cc -fopenacc -c main.c
$ cc -o main main.o -fopenacc -L/usr/local/mylib/libs -l<library-name>

...

To compile CUDA enabled GPU code or MPI+CUDA enabled GPU code on Topaz or Garrawarla

Code Block
$ module load cuda/version
$ nvcc main.c

...