MPI_Barrier(MPI_COMM_WORLD);
//Try SMPI_SHARED_CALL function, which should call hash only once and for all.
MPI_Barrier(MPI_COMM_WORLD);
//Try SMPI_SHARED_CALL function, which should call hash only once and for all.
if(rank==size-1){
SMPI_SHARED_CALL(hash,str,str,buf);
}
if(rank==size-1){
SMPI_SHARED_CALL(hash,str,str,buf);
}
printf("[%d] After change, the value in the shared buffer is: %" PRIu64"\n", rank, *buf);
SMPI_SHARED_FREE(buf);
printf("[%d] After change, the value in the shared buffer is: %" PRIu64"\n", rank, *buf);
SMPI_SHARED_FREE(buf);