fix the build

This commit is contained in:
James McClure
2021-01-05 18:43:44 -05:00
parent 345b43d9f8
commit 7f4f74779c
40 changed files with 242 additions and 710 deletions

View File

@@ -6,7 +6,7 @@
#include <fstream>
#include "common/Communication.h"
#include "common/MPI_Helpers.h"
#include "common/MPI.h"
#include "common/Array.h"
using namespace std;
@@ -15,11 +15,9 @@ using namespace std;
//***************************************************************************************
int test_communication( MPI_Comm comm, int nprocx, int nprocy, int nprocz )
int test_communication( const Utilities::MPI& comm, int nprocx, int nprocy, int nprocz )
{
int rank,nprocs;
MPI_Comm_rank(comm,&rank);
MPI_Comm_size(comm,&nprocs);
int rank = comm.getRank();
int iproc,jproc,kproc;
int sendtag,recvtag;
if (rank==0) printf("\nRunning test %i %i %i\n",nprocx,nprocy,nprocz);
@@ -38,7 +36,7 @@ int test_communication( MPI_Comm comm, int nprocx, int nprocy, int nprocz )
rank_xy, rank_XY, rank_xY, rank_Xy,
rank_xz, rank_XZ, rank_xZ, rank_Xz,
rank_yz, rank_YZ, rank_yZ, rank_Yz );
MPI_Barrier(comm);
comm.barrier();
//**********************************
@@ -85,7 +83,7 @@ int test_communication( MPI_Comm comm, int nprocx, int nprocy, int nprocz )
sendCount_xy = sendCount_yz = sendCount_xz = sendCount_Xy = sendCount_Yz = sendCount_xZ = 0;
sendCount_xY = sendCount_yZ = sendCount_Xz = sendCount_XY = sendCount_YZ = sendCount_XZ = 0;
MPI_Barrier(comm);
comm.barrier();
if (rank==0) printf ("SendLists are ready on host\n");
//......................................................................................
// Use MPI to fill in the recvCounts form the associated processes
@@ -158,7 +156,7 @@ int test_communication( MPI_Comm comm, int nprocx, int nprocy, int nprocz )
recvCount_yz, recvCount_YZ, recvCount_yZ, recvCount_Yz,
rank_x, rank_y, rank_z, rank_X, rank_Y, rank_Z, rank_xy, rank_XY, rank_xY,
rank_Xy, rank_xz, rank_XZ, rank_xZ, rank_Xz, rank_yz, rank_YZ, rank_yZ, rank_Yz );
MPI_Barrier(comm);
comm.barrier();
if (rank==0) printf ("RecvLists finished\n");
// Free memory
@@ -181,11 +179,9 @@ int test_communication( MPI_Comm comm, int nprocx, int nprocy, int nprocz )
template<class TYPE>
int testHalo( MPI_Comm comm, int nprocx, int nprocy, int nprocz, int depth )
int testHalo( const Utilities::MPI& comm, int nprocx, int nprocy, int nprocz, int depth )
{
int rank,nprocs;
MPI_Comm_rank(comm,&rank);
MPI_Comm_size(comm,&nprocs);
int rank = comm.getRank();
if ( rank==0 )
printf("\nRunning Halo test %i %i %i %i\n",nprocx,nprocy,nprocz,depth);
@@ -292,7 +288,6 @@ int main(int argc, char **argv)
int N_errors_global = comm.sumReduce( N_errors );
comm.barrier();
Utilities::shutdown();
if ( rank==0 ) {
if ( N_errors_global==0 )
std::cout << "All tests passed\n";