The root host mesh is no longer allocated during benchmarking as this caused out-of-memory errors in weak scaling tests
This commit is contained in:
@@ -284,6 +284,9 @@ Resets all devices on the current grid.
|
||||
*/
|
||||
AcResult acGridQuit(void);
|
||||
|
||||
/** Randomizes the local mesh */
|
||||
AcResult acGridRandomize(void);
|
||||
|
||||
/** */
|
||||
AcResult acGridSynchronizeStream(const Stream stream);
|
||||
|
||||
|
@@ -107,7 +107,7 @@ main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
const TestType test = TEST_STRONG_SCALING;
|
||||
const TestType test = TEST_WEAK_SCALING;
|
||||
if (test == TEST_WEAK_SCALING) {
|
||||
uint3_64 decomp = decompose(nprocs);
|
||||
info.int_params[AC_nx] *= decomp.x;
|
||||
@@ -126,10 +126,15 @@ main(int argc, char** argv)
|
||||
|
||||
// GPU alloc & compute
|
||||
acGridInit(info);
|
||||
acGridRandomize();
|
||||
|
||||
/*
|
||||
AcMesh model;
|
||||
acMeshCreate(info, &model);
|
||||
acMeshRandomize(&model);
|
||||
acGridLoadMesh(STREAM_DEFAULT, model);
|
||||
*/
|
||||
|
||||
/*
|
||||
acGridLoadMesh(STREAM_DEFAULT, model);
|
||||
|
||||
|
@@ -2,7 +2,7 @@ find_package(CUDAToolkit)
|
||||
|
||||
## Astaroth Core
|
||||
add_library(astaroth_core STATIC device.cc node.cc astaroth.cc astaroth_fortran.cc)
|
||||
target_link_libraries(astaroth_core astaroth_kernels CUDA::cudart CUDA::cuda_driver)
|
||||
target_link_libraries(astaroth_core astaroth_utils astaroth_kernels CUDA::cudart CUDA::cuda_driver)
|
||||
|
||||
## Options
|
||||
if (MPI_ENABLED)
|
||||
|
@@ -1242,6 +1242,22 @@ acGridSynchronizeStream(const Stream stream)
|
||||
return AC_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
#include "astaroth_utils.h" // HACK TO RANDOMIZE
|
||||
AcResult
|
||||
acGridRandomize(void)
|
||||
{
|
||||
ERRCHK(grid.initialized);
|
||||
|
||||
AcMesh host;
|
||||
acMeshCreate(grid.submesh.info, &host);
|
||||
acMeshRandomize(&host);
|
||||
acDeviceLoadMesh(grid.device, STREAM_DEFAULT, host);
|
||||
acMeshDestroy(&host);
|
||||
|
||||
return AC_SUCCESS;
|
||||
}
|
||||
|
||||
AcResult
|
||||
acGridInit(const AcMeshInfo info)
|
||||
{
|
||||
|
Reference in New Issue
Block a user