--- trunk/mdtools/interface_implementation/MakeStamps.cpp 2002/07/09 18:40:59 11 +++ trunk/mdtools/interface_implementation/MakeStamps.cpp 2002/11/05 22:04:46 164 @@ -3,6 +3,8 @@ #include "MakeStamps.hpp" #include "MoleculeStamp.hpp" +#include "simError.h" +#include "mpiBASS.h" LinkedMolStamp::~LinkedMolStamp(){ if( mol_stamp != NULL ) delete mol_stamp; @@ -58,9 +60,15 @@ int MakeStamps::hash( char* text ){ // if the key is less than zero, we've had an overflow error - fprintf( stderr, - "There has been an overflow error in the hash key."); - exit(0); + sprintf( painCave.errMsg, + "There has been an overflow error in the MakeStamps hash key."); + painCave.isFatal = 1; + simError(); +#ifdef IS_MPI + if( painCave.isEventLoop ){ + if( worldRank == 0 ) mpiInterfaceExit(); + } +#endif //is_mpi } return key; @@ -103,21 +111,18 @@ int MakeStamps::moleculeAssign( event* the_event ){ switch( the_event->evt.asmt.asmt_type ){ case STRING: - current_mol->assignString( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.sval ); - return 1; - break; - - case DOUBLE: - current_mol->assignDouble( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.dval ); - return 1; + return current_mol->assignString( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.sval ); break; + case DOUBLE: + return current_mol->assignDouble( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.dval ); + break; + case INT: - current_mol->assignInt( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.ival ); - return 1; + return current_mol->assignInt( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.ival ); break; default: