| 9 |
|
|
| 10 |
|
void sendFrcStruct( void *frcStruct, MPI_Datatype structType ){ |
| 11 |
|
|
| 12 |
< |
int mpiError; |
| 13 |
< |
|
| 14 |
< |
mpiError = MPI_Bcast(frcStruct,1,structType,0,MPI_COMM_WORLD); |
| 15 |
< |
if (mpiError != MPI_SUCCESS){ |
| 16 |
< |
mpiError = MPI_Finalize(); |
| 17 |
< |
if (mpiError != MPI_SUCCESS) mpiError = MPI_Abort(MPI_COMM_WORLD,0); |
| 18 |
< |
exit (0); |
| 19 |
< |
} |
| 12 |
> |
MPI_Bcast(frcStruct,1,structType,0,MPI_COMM_WORLD); |
| 13 |
|
} |
| 14 |
|
|
| 15 |
|
|
| 16 |
|
void recieveFrcStruct( void *frcStruct, MPI_Datatype structType ){ |
| 17 |
|
|
| 18 |
< |
int mpiError; |
| 26 |
< |
|
| 27 |
< |
mpiError = MPI_Bcast(frcStruct,1,structType,0,MPI_COMM_WORLD); |
| 28 |
< |
if (mpiError != MPI_SUCCESS){ |
| 29 |
< |
mpiError = MPI_Finalize(); |
| 30 |
< |
if (mpiError != MPI_SUCCESS) mpiError = MPI_Abort(MPI_COMM_WORLD,0); |
| 31 |
< |
exit (0); |
| 32 |
< |
} |
| 18 |
> |
MPI_Bcast(frcStruct,1,structType,0,MPI_COMM_WORLD); |
| 19 |
|
} |
| 20 |
|
|
| 35 |
– |
void ffInterfaceExit( char* errMsg ){ |
| 36 |
– |
|
| 37 |
– |
int mpiError; |
| 38 |
– |
int myNode; |
| 39 |
– |
|
| 40 |
– |
MPI_Comm_rank( MPI_COMM_WORLD, &myNode); |
| 41 |
– |
|
| 42 |
– |
if( errMsg != NULL ){ |
| 43 |
– |
fprintf( stderr, |
| 44 |
– |
"Force Field Parameter MPI error at node %d\n" |
| 45 |
– |
" => %s\n", |
| 46 |
– |
myNode, errMsg ); |
| 47 |
– |
} |
| 48 |
– |
|
| 49 |
– |
mpiError = MPI_Finalize(); |
| 50 |
– |
if (mpiError != MPI_SUCCESS) mpiError = MPI_Abort(MPI_COMM_WORLD,0); |
| 51 |
– |
exit (0); |
| 52 |
– |
} |