MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / initialize

Method initialize

src/Initializer/MemoryManager.cpp:100–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98#endif // ACL_DEVICE
99
100void seissol::initializer::MemoryManager::initialize()
101{
102 // initialize global matrices
103 GlobalDataInitializerOnHost::init(m_globalDataOnHost, m_memoryAllocator, memory::Standard);
104 if constexpr (seissol::isDeviceOn()) {
105 // the serial order for initialization is needed for some (older) driver versions on some GPUs
106 bool serialize = false;
107 const char* envvalue = std::getenv("SEISSOL_SERIAL_NODE_DEVICE_INIT");
108 if (envvalue != nullptr) {
109 if (strcmp(envvalue, "1") == 0) {
110 serialize = true;
111 }
112 else if (strcmp(envvalue, "0") == 0) {
113 serialize = false;
114 }
115 else {
116 logError() << "Invalid value for \"SEISSOL_SERIAL_NODE_DEVICE_INIT\"";
117 }
118 }
119 if (serialize) {
120 logInfo(MPI::mpi.rank()) << "Initializing device global data on a node in serial order.";
121 MPI::mpi.serialOrderExecute([&]() {
122 GlobalDataInitializerOnDevice::init(m_globalDataOnDevice, m_memoryAllocator, memory::DeviceGlobalMemory);
123 }, MPI::mpi.sharedMemComm());
124 }
125 else {
126 GlobalDataInitializerOnDevice::init(m_globalDataOnDevice, m_memoryAllocator, memory::DeviceGlobalMemory);
127 }
128 }
129}
130
131void seissol::initializer::MemoryManager::correctGhostRegionSetups()
132{

Callers 15

runProxyFunction · 0.45
mainFunction · 0.45
initMethod · 0.45
enableFreeSurfaceOutputFunction · 0.45
evaluateOnDeviceMethod · 0.45
evaluateOnDeviceMethod · 0.45
evaluateOnDeviceMethod · 0.45
computeBatchedAderMethod · 0.45

Calls 2

isDeviceOnFunction · 0.85
rankMethod · 0.80

Tested by

no test coverage detected