openacc-mpi-demos

所属分类:Fortran编程
开发工具:Fortran
文件大小:0KB
下载次数:0
上传日期:2017-09-18 17:36:11
上 传 者sh-1993
说明:  使用OpenACC和MPI进行多GPU编程的演示
(Demos for multi-GPU programming with OpenACC and MPI)

文件列表:
Makefile (217, 2017-09-18)
saxpy_acc.f90 (726, 2017-09-18)
saxpy_acc_mpi.f90 (2946, 2017-09-18)
saxpy_mpi.f90 (2523, 2017-09-18)

OpenACC/MPI Demos ================= These demos use OpenACC and MPI to run SAXPY in various contexts. Contents -------- * **saxpy\_acc** runs a SAXPY in parallel on a single GPU. * **saxpy\_mpi** runs SAXPY on CPU with multiple MPI processes. The root allocates an array for the global problem, then scatters local subarrays to the other ranks. Then, each rank computes SAXPY on its subarray. Finally, the subarrays are gathered back onto the root to check the results. The length of the global problem must be evenly divisible by the number of MPI ranks. * **saxpy\_acc\_mpi** runs SAXPY with multiple MPI processes. Each process offloads its local work to GPU using OpenACC kernels. The MPI scheme is the same as saxpy\_mpi, and the length of the global problem must be evenly divisible by the number of MPI ranks. The number of NVIDIA-capable GPUs can be arbitrarily >= 1; each rank's kernels will be round-robin scheduled on the available GPUs. Building -------- Ensure that the `mpif90` in your path uses pgfortran. Then simply run `make all`. Running ------- MPI programs are run as usual, e.g: `mpirun -np 2 ./saxpy_acc_mpi` Profiling --------- The nvprof users' manual describes how to profile and visualize MPI sessions: * [MPI Profiling With nvprof](http://docs.nvidia.com/cuda/profiler-users-guide/index.html#mpi-nvprof) * [Import Multi-Process nvprof Session](http://docs.nvidia.com/cuda/profiler-users-guide/index.html#import-multi-nvprof-session) For example, you could run nvprof as the following, where `%p` is substituted with the corresponding process ID: ``` Shell mpirun -np 2 nvprof --export-profile saxpy.%p.prof ./sgemm_acc_mpi ``` After copying the `*.nvprof` files to your local computer, you can import and visual them in nvvp.

近期下载者

相关文件


收藏者