3 |
|
#include <cstring> |
4 |
|
|
5 |
|
#include "Globals.hpp" |
6 |
+ |
#include "simError.h" |
7 |
+ |
#ifdef IS_MPI |
8 |
+ |
#include "mpiBASS.h" |
9 |
+ |
#endif // is_mpi |
10 |
|
|
11 |
|
/* |
12 |
|
* The following section lists all of the defined tokens for the |
142 |
|
switch( the_event->evt.asmt.asmt_type ){ |
143 |
|
|
144 |
|
case STRING: |
145 |
< |
current_component->assignString( the_event->evt.asmt.lhs, |
146 |
< |
the_event->evt.asmt.rhs.sval ); |
147 |
< |
return 1; |
145 |
> |
return current_component->assignString( the_event->evt.asmt.lhs, |
146 |
> |
the_event->evt.asmt.rhs.sval, |
147 |
> |
&(the_event->err_msg)); |
148 |
|
break; |
149 |
|
|
150 |
|
case DOUBLE: |
151 |
< |
current_component->assignDouble( the_event->evt.asmt.lhs, |
152 |
< |
the_event->evt.asmt.rhs.dval ); |
153 |
< |
return 1; |
151 |
> |
return current_component->assignDouble( the_event->evt.asmt.lhs, |
152 |
> |
the_event->evt.asmt.rhs.dval, |
153 |
> |
&(the_event->err_msg)); |
154 |
|
break; |
155 |
|
|
156 |
|
case INT: |
157 |
< |
current_component->assignInt( the_event->evt.asmt.lhs, |
158 |
< |
the_event->evt.asmt.rhs.ival ); |
159 |
< |
return 1; |
157 |
> |
return current_component->assignInt( the_event->evt.asmt.lhs, |
158 |
> |
the_event->evt.asmt.rhs.ival, |
159 |
> |
&(the_event->err_msg)); |
160 |
|
break; |
161 |
|
|
162 |
|
default: |
797 |
|
|
798 |
|
// if the key is less than zero, we've had an overflow error |
799 |
|
|
800 |
< |
fprintf( stderr, |
800 |
> |
sprintf( painCave.errMsg, |
801 |
|
"There has been an overflow error in the Globals' hash key."); |
802 |
< |
exit(0); |
802 |
> |
painCave.isFatal = 1; |
803 |
> |
simError(); |
804 |
> |
#ifdef IS_MPI |
805 |
> |
if( painCave.isEventLoop ){ |
806 |
> |
if( worldRank == 0 ) mpiInterfaceExit(); |
807 |
> |
} |
808 |
> |
#endif //is_mpi |
809 |
|
} |
810 |
|
|
811 |
|
return key; |
822 |
|
key = hash( text ); |
823 |
|
the_element->setNext( command_table[key] ); |
824 |
|
command_table[key] = the_element; |
825 |
< |
}; |
825 |
> |
} |