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 957 by gezelter, Mon Jan 19 16:08:21 2004 UTC vs.
Revision 1153 by gezelter, Tue May 11 04:21:52 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 66 | Line 66 | void throwMPIEvent(event* the_event)
66        mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int  
67      break;
68  
69 +    case CUTOFFGROUP:
70 +      mpiEventContainer.type = mpiCUTOFFGROUP;
71 +      mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int  
72 +    break;
73 +
74      case ATOM:
75        mpiEventContainer.type = mpiATOM;
76        mpiEventContainer.i1 = the_event->evt.blk_index; // pack block index into first int
# Line 105 | Line 110 | void throwMPIEvent(event* the_event)
110  
111      case ORIENTATION:
112        mpiEventContainer.type = mpiORIENTATION;
113 <      mpiEventContainer.d1 = the_event->evt.ornt.x; // pack orientation coord into d
114 <      mpiEventContainer.d2 = the_event->evt.ornt.y;
115 <      mpiEventContainer.d3 = the_event->evt.ornt.z;  
113 >      mpiEventContainer.d1 = the_event->evt.ornt.phi; // pack orientation coord into d
114 >      mpiEventContainer.d2 = the_event->evt.ornt.theta;
115 >      mpiEventContainer.d3 = the_event->evt.ornt.psi;  
116        break;
117        
118      case CONSTRAINT:
# Line 115 | Line 120 | void throwMPIEvent(event* the_event)
120        mpiEventContainer.d1 = the_event->evt.cnstr; // pack constraint coord into d
121        break;
122        
123 <    case MEMBER:
124 <      mpiEventContainer.type = mpiMEMBER;
125 <      mpiEventContainer.i1 = the_event->evt.mbr.a ; // pack member ints into i
121 <      mpiEventContainer.i2 = the_event->evt.mbr.b;
122 <      mpiEventContainer.i3 = the_event->evt.mbr.c;  
123 <      mpiEventContainer.i4 = the_event->evt.mbr.d;  
123 >    case MEMBERS:
124 >      mpiEventContainer.type = mpiMEMBERS;
125 >      mpiEventContainer.i1 = the_event->evt.mbrs.nMembers ; // pack member ints into i
126        break;
127        
128      case ASSIGNMENT:
# Line 163 | Line 165 | void throwMPIEvent(event* the_event)
165  
166      MPI_Bcast(&mpiEventContainer,1,mpiBASSEventType,0,MPI_COMM_WORLD);
167  
168 +    if (the_event->event_type == MEMBERS) {
169 +
170 +      // For member lists, we need a separate broadcast to spew out the
171 +      // membership array:
172 +      MPI_Bcast(the_event->evt.mbrs.memberList, the_event->evt.mbrs.nMembers,
173 +                MPI_INT, 0, MPI_COMM_WORLD);
174 +      
175 +    }  
176 +
177      sprintf( checkPointMsg,
178               "BASS Event broadcast successful" );
179 +
180      MPIcheckPoint();
181    }
182   }
# Line 186 | Line 198 | void mpiEventLoop(void)
198            "  COMPONENT   %d\n"
199            "  POSITION    %d\n"
200            "  ASSIGNMENT  %d\n"
201 <          "  MEMBER      %d\n"
201 >          "  MEMBERS     %d\n"
202            "  CONSTRAINT  %d\n"
203            "  ORIENTATION %d\n"
204            "  ZCONSTRAINT %d\n"
205            "  RIGIDBODY   %d\n"
206 +          "  CUTOFFGROUP %d\n"
207            "  BLOCK_END   %d\n"
208            "\n",
209            worldRank,
210            MOLECULE, ATOM, BOND, BEND, TORSION, COMPONENT,
211 <          POSITION, ASSIGNMENT, MEMBER, CONSTRAINT, ORIENTATION,
212 <          ZCONSTRAINT, RIGIDBODY, BLOCK_END );
211 >          POSITION, ASSIGNMENT, MEMBERS, CONSTRAINT, ORIENTATION,
212 >          ZCONSTRAINT, RIGIDBODY, CUTOFFGROUP, BLOCK_END );
213   #endif
214  
215    MPI_Bcast(&mpiContinue,1,MPI_INT,0,MPI_COMM_WORLD);
# Line 232 | Line 245 | void mpiCatchEvent(void)
245      the_event.event_type = RIGIDBODY;
246      the_event.evt.blk_index = mpiEventContainer.i1;
247      break;
248 +
249 +  case mpiCUTOFFGROUP:
250 +    the_event.event_type = CUTOFFGROUP;
251 +    the_event.evt.blk_index = mpiEventContainer.i1;
252 +    break;
253      
254    case mpiATOM:
255      the_event.event_type = ATOM;
# Line 273 | Line 291 | void mpiCatchEvent(void)
291  
292    case mpiORIENTATION:
293      the_event.event_type = ORIENTATION;
294 <    the_event.evt.ornt.x = mpiEventContainer.d1;
295 <    the_event.evt.ornt.y = mpiEventContainer.d2;
296 <    the_event.evt.ornt.z = mpiEventContainer.d3;  
294 >    the_event.evt.ornt.phi   = mpiEventContainer.d1;
295 >    the_event.evt.ornt.theta = mpiEventContainer.d2;
296 >    the_event.evt.ornt.psi   = mpiEventContainer.d3;  
297      break;
298        
299    case mpiCONSTRAINT:
# Line 283 | Line 301 | void mpiCatchEvent(void)
301      the_event.evt.cnstr = mpiEventContainer.d1;
302      break;
303      
304 <  case mpiMEMBER:
305 <    the_event.event_type = MEMBER;
306 <    the_event.evt.mbr.a = mpiEventContainer.i1;
307 <    the_event.evt.mbr.b = mpiEventContainer.i2;
308 <    the_event.evt.mbr.c = mpiEventContainer.i3;  
309 <    the_event.evt.mbr.d = mpiEventContainer.i4;  
304 >  case mpiMEMBERS:
305 >    the_event.event_type = MEMBERS;
306 >    the_event.evt.mbrs.nMembers = mpiEventContainer.i1;
307 >
308 >    the_event.evt.mbrs.memberList = (int *) calloc(the_event.evt.mbrs.nMembers,
309 >                                                    sizeof(int));
310 >    
311 >    // Grab the member list since we have a number of members:
312 >    MPI_Bcast(the_event.evt.mbrs.memberList, the_event.evt.mbrs.nMembers,
313 >              MPI_INT, 0, MPI_COMM_WORLD);
314 >    
315      break;
316      
317    case mpiASSIGNMENT_s:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines