Octopus 16.0
real-space, real-time, TDDFT code
cuda_low.cc File Reference
#include <config.h>
#include <stdint.h>
#include <cmath>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include "string_f.h"
#include <cassert>
#include <cstring>
#include <iterator>
#include <map>
#include <sstream>
#include <stdbool.h>
#include <vector>
#include <cstdlib>
#include <regex>
#include <fortran_types.h>
Include dependency graph for cuda_low.cc:

Macros

#define NVRTC_SAFE_CALL(x)
 
#define CUDA_SAFE_CALL(x)
 

Typedefs

typedef intptr_t CUcontext
 
typedef intptr_t CUdevice
 
typedef intptr_t CUmodule
 
typedef intptr_t CUfunction
 
typedef intptr_t CUdeviceptr
 
typedef intptr_t CUstream
 

Functions

void FC_FUNC_ (cuda_init, CUDA_INIT)(CUcontext **context
 

Variables

void CUdevice ** device
 
void CUdevice CUstream ** stream
 
void CUdevice CUstream fintdevice_number
 

Macro Definition Documentation

◆ NVRTC_SAFE_CALL

#define NVRTC_SAFE_CALL (   x)
Value:
do { \
nvrtcResult result = x; \
if (result != NVRTC_SUCCESS) { \
std::cerr << "\nerror: " #x " failed with error " \
<< nvrtcGetErrorString(result) << '\n'; \
exit(1); \
} \
} while (0)
void const double * x
Definition: spline_low.cc:50

◆ CUDA_SAFE_CALL

#define CUDA_SAFE_CALL (   x)
Value:
do { \
CUresult result = x; \
if (result != CUDA_SUCCESS) { \
const char *msg; \
cuGetErrorName(result, &msg); \
std::cerr << "\nerror: " #x " failed with error " << msg << '\n'; \
if (result == CUDA_ERROR_OUT_OF_MEMORY) { \
std::cerr << "Octopus could not allocate enough memory on the GPU.\n"; \
std::cerr \
<< "Please use either more GPUs to distribute the memory or try " \
"StatesPack = no to keep the states mostly on the CPU.\n"; \
} \
exit(1); \
} \
} while (0)

Typedef Documentation

◆ CUcontext

typedef intptr_t CUcontext

◆ CUdevice

typedef intptr_t CUdevice

◆ CUmodule

typedef intptr_t CUmodule

◆ CUfunction

typedef intptr_t CUfunction

◆ CUdeviceptr

typedef intptr_t CUdeviceptr

◆ CUstream

typedef intptr_t CUstream

Function Documentation

◆ FC_FUNC_()

void FC_FUNC_ ( cuda_init  ,
CUDA_INIT   
)

Variable Documentation

◆ device

void CUdevice** device

◆ stream

void CUdevice CUstream** stream

◆ device_number

void CUdevice CUstream fint* device_number