Disabled MPI integration temporarily and enabled verification for MPI tests
This commit is contained in:
@@ -291,7 +291,7 @@ acDeviceLoadScalarUniform(const Device device, const Stream stream, const AcReal
|
|||||||
const AcReal value)
|
const AcReal value)
|
||||||
{
|
{
|
||||||
cudaSetDevice(device->id);
|
cudaSetDevice(device->id);
|
||||||
|
|
||||||
if (param >= NUM_REAL_PARAMS)
|
if (param >= NUM_REAL_PARAMS)
|
||||||
return AC_FAILURE;
|
return AC_FAILURE;
|
||||||
|
|
||||||
@@ -1046,8 +1046,9 @@ acDeviceRunMPITest(void)
|
|||||||
acMeshCreate(info, &candidate);
|
acMeshCreate(info, &candidate);
|
||||||
|
|
||||||
acMeshRandomize(&model);
|
acMeshRandomize(&model);
|
||||||
|
acMeshRandomize(&candidate);
|
||||||
}
|
}
|
||||||
assert(info.int_params[AC_nz] % num_processes == 0);
|
ERRCHK_ALWAYS(info.int_params[AC_nz] % num_processes == 0);
|
||||||
|
|
||||||
/// DECOMPOSITION
|
/// DECOMPOSITION
|
||||||
AcMeshInfo submesh_info = info;
|
AcMeshInfo submesh_info = info;
|
||||||
@@ -1067,22 +1068,15 @@ acDeviceRunMPITest(void)
|
|||||||
acMeshRandomize(&submesh);
|
acMeshRandomize(&submesh);
|
||||||
acDeviceDistributeMeshMPI(model, &submesh);
|
acDeviceDistributeMeshMPI(model, &submesh);
|
||||||
|
|
||||||
#define VERIFY (0)
|
|
||||||
|
|
||||||
// Master CPU
|
|
||||||
#if VERIFY
|
|
||||||
if (pid == 0) {
|
|
||||||
acMeshApplyPeriodicBounds(&model);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
Device device;
|
|
||||||
int devices_per_node = -1;
|
int devices_per_node = -1;
|
||||||
cudaGetDeviceCount(&devices_per_node);
|
cudaGetDeviceCount(&devices_per_node);
|
||||||
|
|
||||||
|
Device device;
|
||||||
acDeviceCreate(pid % devices_per_node, submesh_info, &device);
|
acDeviceCreate(pid % devices_per_node, submesh_info, &device);
|
||||||
acDeviceLoadMesh(device, STREAM_DEFAULT, submesh);
|
acDeviceLoadMesh(device, STREAM_DEFAULT, submesh);
|
||||||
|
|
||||||
|
/*
|
||||||
// Warmup
|
// Warmup
|
||||||
for (int i = 0; i < 5; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
acDeviceIntegrateStepMPI(device, FLT_EPSILON);
|
acDeviceIntegrateStepMPI(device, FLT_EPSILON);
|
||||||
@@ -1114,6 +1108,7 @@ acDeviceRunMPITest(void)
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
////////////////////////////// Timer end
|
////////////////////////////// Timer end
|
||||||
|
*/
|
||||||
acDeviceBoundStepMPI(device);
|
acDeviceBoundStepMPI(device);
|
||||||
acDeviceStoreMesh(device, STREAM_DEFAULT, &submesh);
|
acDeviceStoreMesh(device, STREAM_DEFAULT, &submesh);
|
||||||
acDeviceDestroy(device);
|
acDeviceDestroy(device);
|
||||||
@@ -1122,9 +1117,11 @@ acDeviceRunMPITest(void)
|
|||||||
acDeviceGatherMeshMPI(submesh, &candidate);
|
acDeviceGatherMeshMPI(submesh, &candidate);
|
||||||
acMeshDestroy(&submesh);
|
acMeshDestroy(&submesh);
|
||||||
|
|
||||||
|
#define VERIFY (1)
|
||||||
// Master CPU
|
// Master CPU
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
#if VERIFY
|
#if VERIFY
|
||||||
|
acMeshApplyPeriodicBounds(&model);
|
||||||
acVerifyMesh(model, candidate);
|
acVerifyMesh(model, candidate);
|
||||||
#endif
|
#endif
|
||||||
acMeshDestroy(&model);
|
acMeshDestroy(&model);
|
||||||
|
Reference in New Issue
Block a user