Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
gpu_base.cpp File Reference
#include <stdio.h>
#include <iostream>
#include "common.h"
#include "mpi.h"
#include "gpu_base.hpp"
#include "velocity_mesh_parameters.h"
#include "object_wrapper.h"
#include "../vlasovsolver/gpu_moments.h"
#include "../spatial_cells/velocity_mesh_gpu.h"
#include "../spatial_cells/velocity_block_container.h"
#include "../vlasovsolver/cpu_trans_pencils.hpp"
#include "logger.h"
Include dependency graph for gpu_base.cpp:

Go to the source code of this file.

Functions

__host__ uint gpu_getThread ()
__host__ uint gpu_getMaxThreads ()
unsigned int nextPowerOfTwo (unsigned int n)
__host__ void gpu_init_device ()
__host__ void gpu_clear_device ()
__host__ gpuStream_t gpu_getStream ()
__host__ gpuStream_t gpu_getPriorityStream ()
__host__ int gpu_getDevice ()
__host__ uint gpu_getAllocationCount ()
int gpu_reportMemory (const size_t local_cells_capacity, const size_t ghost_cells_capacity, const size_t local_cells_size, const size_t ghost_cells_size)
__host__ void gpu_vlasov_allocate (const uint maxBlockCount)
__host__ void gpu_calculateProbeAllocation (const uint maxBlockCount)
__host__ void gpu_vlasov_deallocate ()
__host__ uint gpu_vlasov_getSmallestAllocation ()
__host__ void gpu_vlasov_allocate_perthread (uint allocID, uint blockAllocationCount)
__host__ void gpu_batch_allocate (uint nCells, uint maxNeighbours)
__host__ void gpu_acc_allocate (uint maxBlockCount)
__host__ void gpu_acc_deallocate ()
__host__ void gpu_acc_allocate_perthread (uint allocID, uint firstAllocationCount, uint columnSetAllocationCount)
__host__ void gpu_trans_allocate (cuint nAllCells, cuint largestVmesh, cuint unionSetSize)
__host__ void gpu_trans_deallocate ()

Variables

int gpuMultiProcessorCount = 0
int blocksPerMP = 0
int threadsPerMP = 0
Logger logFile
int myDevice
int myRank
gpuStream_t gpuStreamList [MAXCPUTHREADS]
gpuStream_t gpuPriorityStreamList [MAXCPUTHREADS]
ColumnOffsetshost_columnOffsetData = NULL
size_t gpu_probeFullSize = 0
size_t gpu_probeFlattenedSize = 0
size_t gpu_probeStride = 0
split::SplitVector< vmesh::GlobalID > * unionOfBlocks =NULL
split::SplitVector< vmesh::GlobalID > * dev_unionOfBlocks =NULL
Hashinator::Hashmap< vmesh::GlobalID, vmesh::LocalID > * unionOfBlocksSet =NULL
Hashinator::Hashmap< vmesh::GlobalID, vmesh::LocalID > * dev_unionOfBlocksSet =NULL
GPUMemoryManager gpuMemoryManager
uint allocationCount = 0
std::vector< uint > gpu_vlasov_allocatedSize
std::vector< size_t > gpu_vlasov_subPointers
uint gpu_allocated_largestVmeshSizePower = 0
uint gpu_allocated_unionSetSize = 0
uint gpu_largest_columnCount = 0

Function Documentation

◆ gpu_acc_allocate()

__host__ void gpu_acc_allocate ( uint maxBlockCount)

Definition at line 537 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_acc_allocate_perthread()

__host__ void gpu_acc_allocate_perthread ( uint allocID,
uint firstAllocationCount,
uint columnSetAllocationCount )

Definition at line 567 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_acc_deallocate()

__host__ void gpu_acc_deallocate ( )

Definition at line 556 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_batch_allocate()

__host__ void gpu_batch_allocate ( uint nCells,
uint maxNeighbours )

Allocation and deallocation for pointers used by batch operations in block adjustment

Definition at line 462 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_calculateProbeAllocation()

__host__ void gpu_calculateProbeAllocation ( const uint maxBlockCount)

Definition at line 359 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_clear_device()

__host__ void gpu_clear_device ( )

Definition at line 229 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_getAllocationCount()

__host__ uint gpu_getAllocationCount ( )

Definition at line 259 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_getDevice()

__host__ int gpu_getDevice ( )

Definition at line 253 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_getMaxThreads()

__host__ uint gpu_getMaxThreads ( )

Definition at line 84 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_getPriorityStream()

__host__ gpuStream_t gpu_getPriorityStream ( )

Definition at line 248 of file gpu_base.cpp.

Here is the call graph for this function:

◆ gpu_getStream()

__host__ gpuStream_t gpu_getStream ( )

Definition at line 244 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_getThread()

__host__ uint gpu_getThread ( )

Definition at line 77 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_init_device()

__host__ void gpu_init_device ( )

Definition at line 103 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_reportMemory()

int gpu_reportMemory ( const size_t local_cells_capacity,
const size_t ghost_cells_capacity,
const size_t local_cells_size,
const size_t ghost_cells_size )

Definition at line 266 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_trans_allocate()

__host__ void gpu_trans_allocate ( cuint nAllCells,
cuint largestVmesh,
cuint unionSetSize )

Definition at line 607 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_trans_deallocate()

__host__ void gpu_trans_deallocate ( )

Definition at line 663 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_vlasov_allocate()

__host__ void gpu_vlasov_allocate ( const uint maxBlockCount)

Definition at line 335 of file gpu_base.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gpu_vlasov_allocate_perthread()

__host__ void gpu_vlasov_allocate_perthread ( uint allocID,
uint blockAllocationCount )

Definition at line 421 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_vlasov_deallocate()

__host__ void gpu_vlasov_deallocate ( )

Definition at line 401 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ gpu_vlasov_getSmallestAllocation()

__host__ uint gpu_vlasov_getSmallestAllocation ( )

Definition at line 410 of file gpu_base.cpp.

Here is the caller graph for this function:

◆ nextPowerOfTwo()

unsigned int nextPowerOfTwo ( unsigned int n)

Definition at line 92 of file gpu_base.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ allocationCount

uint allocationCount = 0

Definition at line 67 of file gpu_base.cpp.

◆ blocksPerMP

int blocksPerMP = 0

Definition at line 43 of file gpu_base.cpp.

◆ dev_unionOfBlocks

split::SplitVector<vmesh::GlobalID> * dev_unionOfBlocks =NULL

Definition at line 60 of file gpu_base.cpp.

◆ dev_unionOfBlocksSet

Hashinator::Hashmap<vmesh::GlobalID,vmesh::LocalID> * dev_unionOfBlocksSet =NULL

Definition at line 61 of file gpu_base.cpp.

◆ gpu_allocated_largestVmeshSizePower

uint gpu_allocated_largestVmeshSizePower = 0

Definition at line 73 of file gpu_base.cpp.

◆ gpu_allocated_unionSetSize

uint gpu_allocated_unionSetSize = 0

Definition at line 74 of file gpu_base.cpp.

◆ gpu_largest_columnCount

uint gpu_largest_columnCount = 0

Definition at line 75 of file gpu_base.cpp.

◆ gpu_probeFlattenedSize

size_t gpu_probeFlattenedSize = 0

Definition at line 57 of file gpu_base.cpp.

◆ gpu_probeFullSize

size_t gpu_probeFullSize = 0

Definition at line 57 of file gpu_base.cpp.

◆ gpu_probeStride

size_t gpu_probeStride = 0

Definition at line 57 of file gpu_base.cpp.

◆ gpu_vlasov_allocatedSize

std::vector<uint> gpu_vlasov_allocatedSize

Definition at line 69 of file gpu_base.cpp.

◆ gpu_vlasov_subPointers

std::vector<size_t> gpu_vlasov_subPointers

Definition at line 70 of file gpu_base.cpp.

◆ gpuMemoryManager

GPUMemoryManager gpuMemoryManager

Definition at line 64 of file gpu_base.cpp.

◆ gpuMultiProcessorCount

int gpuMultiProcessorCount = 0

Definition at line 42 of file gpu_base.cpp.

◆ gpuPriorityStreamList

gpuStream_t gpuPriorityStreamList[MAXCPUTHREADS]

Definition at line 52 of file gpu_base.cpp.

◆ gpuStreamList

gpuStream_t gpuStreamList[MAXCPUTHREADS]

Definition at line 51 of file gpu_base.cpp.

◆ host_columnOffsetData

ColumnOffsets* host_columnOffsetData = NULL

Definition at line 55 of file gpu_base.cpp.

◆ logFile

Logger logFile
extern

Definition at line 25 of file main.cpp.

◆ myDevice

int myDevice

Definition at line 47 of file gpu_base.cpp.

◆ myRank

int myRank

Definition at line 48 of file gpu_base.cpp.

◆ threadsPerMP

int threadsPerMP = 0

Definition at line 44 of file gpu_base.cpp.

◆ unionOfBlocks

split::SplitVector<vmesh::GlobalID>* unionOfBlocks =NULL

Definition at line 60 of file gpu_base.cpp.

◆ unionOfBlocksSet

Hashinator::Hashmap<vmesh::GlobalID,vmesh::LocalID>* unionOfBlocksSet =NULL

Definition at line 61 of file gpu_base.cpp.