petsc-3.13.6 2020-09-29
Report Typos and Errors

# PetscCUDAInitialize

Initializes the CUDA device and cuBLAS on the device

### Synopsis

    #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 <default yes,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

### Notes

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

### Level

beginner

### Location

src/sys/objects/init.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages