petsc-master 2020-07-05
Report Typos and Errors


Initializes the CUDA device and cuBLAS on the device


#include "petscsys.h"   
PetscErrorCode PetscCUDAInitialize(MPI_Comm comm)
Logically collective

Input Parameter

comm - the MPI communicator that will utilize the CUDA devices

Options Database

-cuda_initialize <yes,no> - Default no. Do the initialization in PetscInitialize(). If -cuda_initialize no is used then the default initialization is done automatically when the first CUDA call is made unless you call PetscCUDAInitialize() before any CUDA operations are performed
-cuda_view - view information about the CUDA devices
-cuda_synchronize - wait at the end of asynchronize CUDA calls so that their time gets credited to the current event; default with -log_view
-cuda_set_device <gpu> - integer number of the device
-use_gpu_aware_mpi - Assume the MPI is GPU-aware when communicating data on GPU


Initializing cuBLAS takes about 1/2 second there it is done by default in PetscInitialize() before logging begins




Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages