--- trunk/mdtools/interface_implementation/MakeStamps.cpp 2002/10/30 22:38:22 160 +++ trunk/mdtools/interface_implementation/MakeStamps.cpp 2002/11/07 17:53:34 166 @@ -4,6 +4,7 @@ #include "MakeStamps.hpp" #include "MoleculeStamp.hpp" #include "simError.h" +#include "mpiBASS.h" LinkedMolStamp::~LinkedMolStamp(){ if( mol_stamp != NULL ) delete mol_stamp; @@ -60,9 +61,14 @@ int MakeStamps::hash( char* text ){ // if the key is less than zero, we've had an overflow error sprintf( painCave.errMsg, - "There has been an overflow error in the hash key."); + "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; @@ -105,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; + return current_mol->assignString( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.sval ); break; case DOUBLE: - current_mol->assignDouble( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.dval ); - return 1; + 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: @@ -148,7 +151,6 @@ int MakeStamps::newAtom( event* the_event ){ the_event->err_msg = current_mol->addAtom( current_atom, the_event->evt.blk_index ); if( the_event->err_msg != NULL ) return 0; - return 1; } @@ -174,20 +176,23 @@ int MakeStamps::atomAssign( event* the_event ){ switch( the_event->evt.asmt.asmt_type ){ case STRING: - current_atom->assignString( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.sval ); + the_event->err_msg = current_atom->assignString( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.sval ); + if( the_event->err_msg != NULL ) return 0; return 1; break; case DOUBLE: - current_atom->assignDouble( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.dval ); - return 1; + the_event->err_msg = current_atom->assignDouble( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.dval ); + if( the_event->err_msg != NULL ) return 0; + return 1; break; case INT: - current_atom->assignInt( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.ival ); + the_event->err_msg = current_atom->assignInt( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.ival ); + if( the_event->err_msg != NULL ) return 0; return 1; break;