ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/mpiBASS.c
(Generate patch)

Comparing trunk/OOPSE/libBASS/mpiBASS.c (file contents):
Revision 988 by gezelter, Tue Jan 27 19:37:48 2004 UTC vs.
Revision 998 by gezelter, Thu Jan 29 23:01:17 2004 UTC

# Line 15 | Line 15 | void mpiEventInit(void)
15  
16   void mpiEventInit(void)
17   {
18 <  int blockCounts[5] = {1,3,4,120,80};
18 >  int blockCounts[5] = {1,3,1,120,80};
19    MPI_Aint dspls[5];
20    MPI_Datatype types[5];
21    mBEvent protoEvent;
# Line 86 | Line 86 | void throwMPIEvent(event* the_event)
86        mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int
87        break;
88  
89    case MEMBER:
90      mpiEventContainer.type = mpiMEMBER;
91      mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int
92      break;
93
89      case ZCONSTRAINT:
90        mpiEventContainer.type = mpiZCONSTRAINT;
91        mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int
# Line 110 | Line 105 | void throwMPIEvent(event* the_event)
105  
106      case ORIENTATION:
107        mpiEventContainer.type = mpiORIENTATION;
108 <      mpiEventContainer.d1 = the_event->evt.ornt.x; // pack orientation coord into d
109 <      mpiEventContainer.d2 = the_event->evt.ornt.y;
110 <      mpiEventContainer.d3 = the_event->evt.ornt.z;  
108 >      mpiEventContainer.d1 = the_event->evt.ornt.phi; // pack orientation coord into d
109 >      mpiEventContainer.d2 = the_event->evt.ornt.theta;
110 >      mpiEventContainer.d3 = the_event->evt.ornt.psi;  
111        break;
112        
113      case CONSTRAINT:
# Line 122 | Line 117 | void throwMPIEvent(event* the_event)
117        
118      case MEMBERS:
119        mpiEventContainer.type = mpiMEMBERS;
120 <      mpiEventContainer.i1 = the_event->evt.mbrs.a ; // pack member ints into i
126 <      mpiEventContainer.i2 = the_event->evt.mbrs.b;
127 <      mpiEventContainer.i3 = the_event->evt.mbrs.c;  
128 <      mpiEventContainer.i4 = the_event->evt.mbrs.d;  
120 >      mpiEventContainer.i1 = the_event->evt.mbrs.nMembers ; // pack member ints into i
121        break;
122        
123      case ASSIGNMENT:
# Line 168 | Line 160 | void throwMPIEvent(event* the_event)
160  
161      MPI_Bcast(&mpiEventContainer,1,mpiBASSEventType,0,MPI_COMM_WORLD);
162  
163 +    if (the_event->event_type == MEMBERS) {
164 +
165 +      // For member lists, we need a separate broadcast to spew out the
166 +      // membership array:
167 +      MPI_Bcast(the_event->evt.mbrs.memberList, the_event->evt.mbrs.nMembers,
168 +                MPI_INT, 0, MPI_COMM_WORLD);
169 +      
170 +    }  
171 +
172      sprintf( checkPointMsg,
173               "BASS Event broadcast successful" );
174 +
175      MPIcheckPoint();
176    }
177   }
# Line 196 | Line 198 | void mpiEventLoop(void)
198            "  ORIENTATION %d\n"
199            "  ZCONSTRAINT %d\n"
200            "  RIGIDBODY   %d\n"
199          "  MEMBER      %d\n"
201            "  BLOCK_END   %d\n"
202            "\n",
203            worldRank,
204            MOLECULE, ATOM, BOND, BEND, TORSION, COMPONENT,
205            POSITION, ASSIGNMENT, MEMBERS, CONSTRAINT, ORIENTATION,
206 <          ZCONSTRAINT, RIGIDBODY, MEMBER, BLOCK_END );
206 >          ZCONSTRAINT, RIGIDBODY, BLOCK_END );
207   #endif
208  
209    MPI_Bcast(&mpiContinue,1,MPI_INT,0,MPI_COMM_WORLD);
# Line 259 | Line 260 | void mpiCatchEvent(void)
260      the_event.evt.blk_index = mpiEventContainer.i1;
261      break;
262  
262  case mpiMEMBER:
263    the_event.event_type = MEMBER;
264    the_event.evt.blk_index = mpiEventContainer.i1;
265    break;
266
263    case mpiZCONSTRAINT:
264      the_event.event_type = ZCONSTRAINT;
265      the_event.evt.blk_index = mpiEventContainer.i1;
# Line 284 | Line 280 | void mpiCatchEvent(void)
280  
281    case mpiORIENTATION:
282      the_event.event_type = ORIENTATION;
283 <    the_event.evt.ornt.x = mpiEventContainer.d1;
284 <    the_event.evt.ornt.y = mpiEventContainer.d2;
285 <    the_event.evt.ornt.z = mpiEventContainer.d3;  
283 >    the_event.evt.ornt.phi   = mpiEventContainer.d1;
284 >    the_event.evt.ornt.theta = mpiEventContainer.d2;
285 >    the_event.evt.ornt.psi   = mpiEventContainer.d3;  
286      break;
287        
288    case mpiCONSTRAINT:
# Line 296 | Line 292 | void mpiCatchEvent(void)
292      
293    case mpiMEMBERS:
294      the_event.event_type = MEMBERS;
295 <    the_event.evt.mbrs.a = mpiEventContainer.i1;
296 <    the_event.evt.mbrs.b = mpiEventContainer.i2;
297 <    the_event.evt.mbrs.c = mpiEventContainer.i3;  
298 <    the_event.evt.mbrs.d = mpiEventContainer.i4;  
295 >    the_event.evt.mbrs.nMembers = mpiEventContainer.i1;
296 >
297 >    the_event.evt.mbrs.memberList = (int *) calloc(the_event.evt.mbrs.nMembers,
298 >                                                    sizeof(int));
299 >    
300 >    // Grab the member list since we have a number of members:
301 >    MPI_Bcast(the_event.evt.mbrs.memberList, the_event.evt.mbrs.nMembers,
302 >              MPI_INT, 0, MPI_COMM_WORLD);
303 >    
304      break;
305      
306    case mpiASSIGNMENT_s:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines