ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/utils/simError.cpp
(Generate patch)

Comparing:
trunk/src/utils/simError.c (file contents), Revision 1442 by gezelter, Mon May 10 17:28:26 2010 UTC vs.
branches/development/src/utils/simError.c (file contents), Revision 1600 by gezelter, Wed Aug 3 20:20:37 2011 UTC

# Line 92 | Line 92 | int simError( void ) {
92    }
93    
94   #ifdef IS_MPI
95 <  if ( painCave.isEventLoop ) {
96 <    sprintf( nodeMsg, " (reported by MPI node %d)", worldRank);
97 <    strncat(errorMsg, nodeMsg, strlen(nodeMsg));
98 <  }
95 >  if (worldRank == 0) {
96 >    if ( painCave.isEventLoop ) {
97 >      sprintf( nodeMsg, " (reported by MPI node %d)", worldRank);
98 >      strncat(errorMsg, nodeMsg, strlen(nodeMsg));
99 >    }
100   #endif
101 <
102 <  strcat(errorMsg, ":\n\t");
103 <
104 <  strncat(errorMsg, painCave.errMsg, strlen(painCave.errMsg));
105 <
106 <  strcat(errorMsg, "\n");
107 <  fprintf(stderr, errorMsg);
108 <
101 >    
102 >    strcat(errorMsg, ":\n\t");
103 >    
104 >    strncat(errorMsg, painCave.errMsg, strlen(painCave.errMsg));
105 >    
106 >    strcat(errorMsg, "\n");
107 >    fprintf(stderr, "%s", errorMsg);
108 >    
109   #ifdef IS_MPI
110 <  if (painCave.isEventLoop)
111 <    return 1;
110 >    if (painCave.isEventLoop)
111 >      return 1;
112 >  }
113   #endif  
114  
115    if (painCave.isFatal) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines