-
Build
main.cusinggcc -O3 -flto -funroll-loops -ffast-math -march=native main.c -o main -lm -
Run
./main N L[0] L[1] L[2] Wy Wmax C[0] C[1] C[2] R Nrays
Ex run with defaults: ./main 1000 4 4 -1 2 2 0 12 0 6 1000000000
Replace main.c with mainFloat.c for the float implementation instead of double.
-
Build
mainOMP.cusinggcc -O3 -flto -funroll-loops -ffast-math -march=native mainOMP.c -o mainOMP -fopenmp -lm -
Run
./mainOMP N L[0] L[1] L[2] Wy Wmax C[0] C[1] C[2] R Nrays NumThreads
Ex run with defaults (32 threads): ./mainOMP 1000 4 4 -1 2 2 0 12 0 6 1000000000 32
Replace mainOMP.c with mainOMPFloat.c for the float implementation instead of double.
- Build
mainCuda.cuusingnvcc -arch=compute_70 -O3 mainCuda.cu -o mainCudaforV100.
Change -arch according to the GPU you are using.
- Run on the cluster using
./mainCuda Nrays N Blocks ThreadsPerBlock
Ex run (V100): srun --account=mpcs51087 --partition=gpu --gres=gpu:1 --time=00:00:10 --constraint=v100 ./mainCuda 1000000000 1000 320 1024
Replace mainCuda.cu with mainCudaFloat.cu for the float implementation instead of double.
- Build
mainCudaMPI.cuusingnvcc -arch=compute_75 -I$(mpicxx --showme:incdirs) -L$(mpicxx --showme:libdirs) -lmpi -lmpi_cxx mainCudaMPI.cu -o mainCudaMPI.
Change -arch according to the GPU you are using.
- Run on the cluster using
./mainCudaMPI Nrays N Blocks ThreadsPerBlock
Ex run (V100): mpirun -np 2 ./mainCudaMPI 1000000000 1000 320 1024
Replace mainCudaMPI.c with mainCudaMPIFloat.c for the float implementation instead of double.
-
Install the
requirements.txtusingpip install -r requirements.txt -
Run
python plotRayTracing.py output.bin <GridSize>. Ex:python plotRayTracing.py output.bin 1000for 1000 x 1000 grid.
-
Install
requirements.txt -
Run
python plotRayTracingMPI.py output_0.bin output_1.bin <GridSize>Ex:python plotRayTracingMPI.py output_0.bin output_1.bin 1000for 1000 x 1000 grid.

