4 |
|
#include "MakeStamps.hpp" |
5 |
|
#include "MoleculeStamp.hpp" |
6 |
|
#include "simError.h" |
7 |
+ |
#include "mpiBASS.h" |
8 |
|
|
9 |
|
LinkedMolStamp::~LinkedMolStamp(){ |
10 |
|
if( mol_stamp != NULL ) delete mol_stamp; |
61 |
|
// if the key is less than zero, we've had an overflow error |
62 |
|
|
63 |
|
sprintf( painCave.errMsg, |
64 |
< |
"There has been an overflow error in the hash key."); |
64 |
> |
"There has been an overflow error in the MakeStamps hash key."); |
65 |
|
painCave.isFatal = 1; |
66 |
|
simError(); |
67 |
+ |
#ifdef IS_MPI |
68 |
+ |
if( painCave.isEventLoop ){ |
69 |
+ |
if( worldRank == 0 ) mpiInterfaceExit(); |
70 |
+ |
} |
71 |
+ |
#endif //is_mpi |
72 |
|
} |
73 |
|
|
74 |
|
return key; |
111 |
|
switch( the_event->evt.asmt.asmt_type ){ |
112 |
|
|
113 |
|
case STRING: |
114 |
< |
current_mol->assignString( the_event->evt.asmt.lhs, |
115 |
< |
the_event->evt.asmt.rhs.sval ); |
110 |
< |
return 1; |
114 |
> |
the_event->err_msg = current_mol->assignString( the_event->evt.asmt.lhs, |
115 |
> |
the_event->evt.asmt.rhs.sval ); |
116 |
|
break; |
117 |
|
|
118 |
|
case DOUBLE: |
119 |
< |
current_mol->assignDouble( the_event->evt.asmt.lhs, |
120 |
< |
the_event->evt.asmt.rhs.dval ); |
116 |
< |
return 1; |
119 |
> |
the_event->err_msg = current_mol->assignDouble( the_event->evt.asmt.lhs, |
120 |
> |
the_event->evt.asmt.rhs.dval ); |
121 |
|
break; |
122 |
< |
|
122 |
> |
|
123 |
|
case INT: |
124 |
< |
current_mol->assignInt( the_event->evt.asmt.lhs, |
125 |
< |
the_event->evt.asmt.rhs.ival ); |
122 |
< |
return 1; |
124 |
> |
the_event->err_msg = current_mol->assignInt( the_event->evt.asmt.lhs, |
125 |
> |
the_event->evt.asmt.rhs.ival ); |
126 |
|
break; |
127 |
|
|
128 |
|
default: |
131 |
|
return 0; |
132 |
|
break; |
133 |
|
} |
134 |
< |
return 0; |
134 |
> |
if( the_event->err_msg != NULL ) return 0; |
135 |
> |
return 1; |
136 |
|
} |
137 |
|
|
138 |
|
int MakeStamps::moleculeEnd( event* the_event ){ |
152 |
|
the_event->err_msg = current_mol->addAtom( current_atom, |
153 |
|
the_event->evt.blk_index ); |
154 |
|
if( the_event->err_msg != NULL ) return 0; |
151 |
– |
|
155 |
|
return 1; |
156 |
|
} |
157 |
|
|
177 |
|
switch( the_event->evt.asmt.asmt_type ){ |
178 |
|
|
179 |
|
case STRING: |
180 |
< |
current_atom->assignString( the_event->evt.asmt.lhs, |
181 |
< |
the_event->evt.asmt.rhs.sval ); |
180 |
> |
the_event->err_msg = |
181 |
> |
current_atom->assignString( the_event->evt.asmt.lhs, |
182 |
> |
the_event->evt.asmt.rhs.sval ); |
183 |
> |
if( the_event->err_msg != NULL ) return 0; |
184 |
|
return 1; |
185 |
|
break; |
186 |
|
|
187 |
|
case DOUBLE: |
188 |
< |
current_atom->assignDouble( the_event->evt.asmt.lhs, |
189 |
< |
the_event->evt.asmt.rhs.dval ); |
190 |
< |
return 1; |
188 |
> |
the_event->err_msg = |
189 |
> |
current_atom->assignDouble( the_event->evt.asmt.lhs, |
190 |
> |
the_event->evt.asmt.rhs.dval ); |
191 |
> |
if( the_event->err_msg != NULL ) return 0; |
192 |
> |
return 1; |
193 |
|
break; |
194 |
|
|
195 |
|
case INT: |
196 |
< |
current_atom->assignInt( the_event->evt.asmt.lhs, |
197 |
< |
the_event->evt.asmt.rhs.ival ); |
196 |
> |
the_event->err_msg = |
197 |
> |
current_atom->assignInt( the_event->evt.asmt.lhs, |
198 |
> |
the_event->evt.asmt.rhs.ival ); |
199 |
> |
if( the_event->err_msg != NULL ) return 0; |
200 |
|
return 1; |
201 |
|
break; |
202 |
|
|