======= (c) Z Koza, 2013 ============= ======= przykładowa KOMPILACJA programu mpi_cuda.cpp ============= /usr/local/mvapich2_1.8/bin/mpic++ -O2 mpi_cuda.cpp -I/usr/local/cuda/include -lcuda -lcudart -lcublas -L/usr/local/cuda/lib64 ===================================================================== ============== WYNIKI ==================== ============== 1 proces MPI, 1 GPU ==================== > time /usr/local/mvapich2_1.8/bin/mpirun -np 1 ./a.out 600000000 [0.0000] : "start" [0.0001] : "cudaDeviceSynchronize = CUDA initialization" Running 1 MPI processes; found 6 CUDA-capable devices Processing 600000000 doubles (4.80 GB) [0.0000] : "Checking the number of devices" [2.0087] : "Array allocation on host" [11.4684] : "Array initialization on host" [0.6902] : "Calculating the sum on host" Sum on the CPU: 300005959.6066419 [0.0001] : "cudaSetDevice" [0.0045] : "cudaMalloc" [1.1303] : "cudaMemcpy" [0.0017] : "cublasCreate" [0.0517] : "cublasDasum (calculates the sum on the GPU)" [0.0006] : "cublasDestroy" [0.0896] : "cudaFree" Sum on the GPU: 300005959.6065826 real 0m22.996s user 0m12.901s sys 0m8.273s ============== 6 procesów MPI, 6 GPU ====================== > time /usr/local/mvapich2_1.8/bin/mpirun -np 6 ./a.out 600000000 [0.0000] : "start" [0.0000] : "cudaDeviceSynchronize = CUDA initialization" Running 6 MPI processes; found 6 CUDA-capable devices Processing 600000000 doubles (4.80 GB) [0.0000] : "Checking the number of devices" [0.5303] : "Array allocation on host" [2.1090] : "Array initialization on host" [0.2729] : "Calculating the sum on host" Sum on the CPU: 299989790.6363971 [0.0001] : "cudaSetDevice" [0.0137] : "cudaMalloc" [0.2763] : "cudaMemcpy" [1.3154] : "cublasCreate" [0.0087] : "cublasDasum (calculates the sum on the GPU)" [1.5487] : "cublasDestroy" [1.4360] : "cudaFree" Sum on the GPU: 299989790.6364686 real 1m12.696s user 0m24.462s sys 0m57.052s ================================================================== ====== Wnioski??? ====== ==================================================================