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 447 by mmeineke, Thu Apr 3 20:21:54 2003 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 61 | Line 61 | void throwMPIEvent(event* the_event)
61        mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int  
62      break;
63  
64 +    case RIGIDBODY:
65 +      mpiEventContainer.type = mpiRIGIDBODY;
66 +      mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int  
67 +    break;
68 +
69      case ATOM:
70        mpiEventContainer.type = mpiATOM;
71        mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int
# Line 81 | 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 ZCONSTRAINT:
90 +      mpiEventContainer.type = mpiZCONSTRAINT;
91 +      mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int
92 +      break;
93 +
94      case COMPONENT:
95        mpiEventContainer.type = mpiCOMPONENT;
96        mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int
# Line 95 | 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 105 | Line 115 | void throwMPIEvent(event* the_event)
115        mpiEventContainer.d1 = the_event->evt.cnstr; // pack constraint coord into d
116        break;
117        
118 <    case MEMBER:
119 <      mpiEventContainer.type = mpiMEMBER;
120 <      mpiEventContainer.i1 = the_event->evt.mbr.a ; // pack member ints into i
111 <      mpiEventContainer.i2 = the_event->evt.mbr.b;
112 <      mpiEventContainer.i3 = the_event->evt.mbr.c;  
113 <      mpiEventContainer.i4 = the_event->evt.mbr.d;  
118 >    case MEMBERS:
119 >      mpiEventContainer.type = mpiMEMBERS;
120 >      mpiEventContainer.i1 = the_event->evt.mbrs.nMembers ; // pack member ints into i
121        break;
122        
123      case ASSIGNMENT:
# Line 153 | 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 176 | Line 193 | void mpiEventLoop(void)
193            "  COMPONENT   %d\n"
194            "  POSITION    %d\n"
195            "  ASSIGNMENT  %d\n"
196 <          "  MEMBER      %d\n"
196 >          "  MEMBERS     %d\n"
197            "  CONSTRAINT  %d\n"
198            "  ORIENTATION %d\n"
199 <          "  START_INDEX %d\n"
199 >          "  ZCONSTRAINT %d\n"
200 >          "  RIGIDBODY   %d\n"
201            "  BLOCK_END   %d\n"
202            "\n",
203            worldRank,
204            MOLECULE, ATOM, BOND, BEND, TORSION, COMPONENT,
205 <          POSITION, ASSIGNMENT, MEMBER, CONSTRAINT, ORIENTATION,
206 <          START_INDEX, BLOCK_END );
205 >          POSITION, ASSIGNMENT, MEMBERS, CONSTRAINT, ORIENTATION,
206 >          ZCONSTRAINT, RIGIDBODY, BLOCK_END );
207   #endif
208  
209    MPI_Bcast(&mpiContinue,1,MPI_INT,0,MPI_COMM_WORLD);
# Line 216 | Line 234 | void mpiCatchEvent(void)
234      the_event.event_type = MOLECULE;
235      the_event.evt.blk_index = mpiEventContainer.i1;
236      break;
237 +
238 +  case mpiRIGIDBODY:
239 +    the_event.event_type = RIGIDBODY;
240 +    the_event.evt.blk_index = mpiEventContainer.i1;
241 +    break;
242      
243    case mpiATOM:
244      the_event.event_type = ATOM;
# Line 236 | Line 259 | void mpiCatchEvent(void)
259      the_event.event_type = TORSION;
260      the_event.evt.blk_index = mpiEventContainer.i1;
261      break;
262 +
263 +  case mpiZCONSTRAINT:
264 +    the_event.event_type = ZCONSTRAINT;
265 +    the_event.evt.blk_index = mpiEventContainer.i1;
266 +    break;
267      
268    case mpiCOMPONENT:
269      the_event.event_type = COMPONENT;
# Line 252 | 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 262 | Line 290 | void mpiCatchEvent(void)
290      the_event.evt.cnstr = mpiEventContainer.d1;
291      break;
292      
293 <  case mpiMEMBER:
294 <    the_event.event_type = MEMBER;
295 <    the_event.evt.mbr.a = mpiEventContainer.i1;
296 <    the_event.evt.mbr.b = mpiEventContainer.i2;
297 <    the_event.evt.mbr.c = mpiEventContainer.i3;  
298 <    the_event.evt.mbr.d = mpiEventContainer.i4;  
293 >  case mpiMEMBERS:
294 >    the_event.event_type = MEMBERS;
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