[petsc-users] Code (possibly) not running on GPU with CUDA

Satish Balay balay at mcs.anl.gov
Wed Aug 5 12:20:53 CDT 2020


> Configure options: CC=nvcc FC=mpif90 CXX=mpicxx --prefix=/lustre/home/z04/gpsgibb/TPLS/petsc --with-cudac=nvcc --with-cuda=1 --with-mpi-dir= --with-batch

This is weird. suggest using:

CC=mpicc FC=mpif90 CXX=mpicxx --prefix=/lustre/home/z04/gpsgibb/TPLS/petsc --with-cudac=nvcc --with-cuda=1

> VecCUDACopyTo          2 1.0 1.7550e-05 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  0  0  0  0  0   0  0  0  0  0     0       0      2 4.00e-04    0 0.00e+00  0
> VecCUDACopyFrom       42 1.0 3.7747e-04 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  0  0  0  0  0   0  0  0  0  0     0       0      0 0.00e+00   42 8.40e-03  0

So GPU is getting used.

The other way to check:

[balay at p1 tests]$ ./ex28 -vec_type cuda -vec_view ascii::ascii_info
Vec Object: 1 MPI processes
  type: seqcuda
  length=25
[balay at p1 tests]$ ./ex28 -vec_view ascii::ascii_info
Vec Object: 1 MPI processes
  type: seq
  length=25


Satish



More information about the petsc-users mailing list