MPI_BYTE runs perfect on one cluster but throws an error on the other one. Is there any reason for this, as sizeof(bool)=1 BYTE and I like 1 BYTE to be reduced. here is the code
int main( int argcs, char *pArgs[] )
{
MPI_Init( &argcs, &pArgs );
int my_rank, comsize;
MPI_Comm_rank( MPI_COMM_WORLD, &my_rank );
MPI_Comm_size( MPI_COMM_WORLD, &comsize );
bool sb=false;
if(my_rank==comsize-1)
{
sb=true;
}
bool rb=true;
MPI_Request request0;
double t1;
t1 = MPI_Wtime();
MPI_Iallreduce( &sb, &rb, sizeof(bool), MPI_BYTE, MPI_MAX, MPI_COMM_WORLD, &request0 );
MPI_Wait( &request0, MPI_STATUS_IGNORE );
double t2 = MPI_Wtime();
MPI_Finalize();
}