ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/mpi_implementation/mpiForceField.c
(Generate patch)

Comparing trunk/mdtools/mpi_implementation/mpiForceField.c (file contents):
Revision 150 by mmeineke, Fri Oct 18 21:20:29 2002 UTC vs.
Revision 261 by chuckv, Mon Feb 3 21:15:59 2003 UTC

# Line 7 | Line 7 | void sendFrcStruct( void *frcStruct, MPI_Datatype stru
7  
8  
9  
10 +
11   void sendFrcStruct( void *frcStruct, MPI_Datatype structType ){
12    
13 <  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 <  }
13 >  MPI_Bcast(frcStruct,1,structType,0,MPI_COMM_WORLD);
14   }
15  
16  
17   void recieveFrcStruct( void *frcStruct, MPI_Datatype structType ){
18    
19 <  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 <  }
19 >  MPI_Bcast(frcStruct,1,structType,0,MPI_COMM_WORLD);
20   }
21  
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 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines