| 80 | 
  | 
        inFile_ = fopen(filename_.c_str(), "r"); | 
| 81 | 
  | 
 | 
| 82 | 
  | 
        if (inFile_ == NULL) { | 
| 83 | 
< | 
            sprintf(painCave.errMsg, "Cannot open file: %s\n", filename_.c_str()); | 
| 83 | 
> | 
            sprintf(painCave.errMsg, "DumpReader: Cannot open file: %s\n", filename_.c_str()); | 
| 84 | 
  | 
            painCave.isFatal = 1; | 
| 85 | 
  | 
            simError(); | 
| 86 | 
  | 
        } | 
| 108 | 
  | 
        error = fclose(inFile_); | 
| 109 | 
  | 
 | 
| 110 | 
  | 
        if (error) { | 
| 111 | 
< | 
            sprintf(painCave.errMsg, "Error closing %s\n", filename_.c_str()); | 
| 111 | 
> | 
            sprintf(painCave.errMsg, "DumpReader Error: Error closing %s\n", filename_.c_str()); | 
| 112 | 
  | 
            painCave.isFatal = 1;             | 
| 113 | 
  | 
            simError(); | 
| 114 | 
  | 
        } | 
| 155 | 
  | 
 | 
| 156 | 
  | 
        if (feof(inFile_)) { | 
| 157 | 
  | 
            sprintf(painCave.errMsg, | 
| 158 | 
< | 
                    "File \"%s\" ended unexpectedly at line %d\n", | 
| 158 | 
> | 
                    "DumpReader Error: File \"%s\" ended unexpectedly at line %d\n", | 
| 159 | 
  | 
                    filename_.c_str(), | 
| 160 | 
  | 
                    lineNum); | 
| 161 | 
  | 
            painCave.isFatal = 1; | 
| 172 | 
  | 
 | 
| 173 | 
  | 
            if (feof(inFile_)) { | 
| 174 | 
  | 
                sprintf(painCave.errMsg, | 
| 175 | 
< | 
                        "File \"%s\" ended unexpectedly at line %d\n", | 
| 175 | 
> | 
                        "DumpReader Error: File \"%s\" ended unexpectedly at line %d\n", | 
| 176 | 
  | 
                        filename_.c_str(), | 
| 177 | 
  | 
                        lineNum); | 
| 178 | 
  | 
                painCave.isFatal = 1; | 
| 185 | 
  | 
 | 
| 186 | 
  | 
                if (feof(inFile_)) { | 
| 187 | 
  | 
                    sprintf(painCave.errMsg, | 
| 188 | 
< | 
                            "File \"%s\" ended unexpectedly at line %d," | 
| 188 | 
> | 
                            "DumpReader Error: File \"%s\" ended unexpectedly at line %d," | 
| 189 | 
  | 
                                " with atom %d\n", filename_.c_str(), | 
| 190 | 
  | 
                            lineNum, | 
| 191 | 
  | 
                            j); | 
| 254 | 
  | 
                    "does not match the meta-data file's nIntegrable, %d.\n", | 
| 255 | 
  | 
                filename_.c_str(), | 
| 256 | 
  | 
                nTotObjs, | 
| 257 | 
< | 
                info_->getNIntegrableObjects()); | 
| 257 | 
> | 
                info_->getNGlobalIntegrableObjects()); | 
| 258 | 
  | 
 | 
| 259 | 
  | 
        painCave.isFatal = 1; | 
| 260 | 
  | 
        simError(); | 
| 265 | 
  | 
    eof_test = fgets(read_buffer, sizeof(read_buffer), inFile_); | 
| 266 | 
  | 
 | 
| 267 | 
  | 
    if (eof_test == NULL) { | 
| 268 | 
< | 
        sprintf(painCave.errMsg, "error in reading commment in %s\n", | 
| 268 | 
> | 
        sprintf(painCave.errMsg, "DumpReader Error: error in reading commment in %s\n", | 
| 269 | 
  | 
                filename_.c_str()); | 
| 270 | 
  | 
        painCave.isFatal = 1; | 
| 271 | 
  | 
        simError(); | 
| 284 | 
  | 
 | 
| 285 | 
  | 
            if (eof_test == NULL) { | 
| 286 | 
  | 
                sprintf(painCave.errMsg, | 
| 287 | 
< | 
                        "error in reading file %s\n" | 
| 287 | 
> | 
                        "DumpReader Error: error in reading file %s\n" | 
| 288 | 
  | 
                            "natoms  = %d; index = %d\n" | 
| 289 | 
  | 
                            "error reading the line from the file.\n", | 
| 290 | 
  | 
                        filename_.c_str(), | 
| 324 | 
  | 
        eof_test = fgets(read_buffer, sizeof(read_buffer), inFile_); | 
| 325 | 
  | 
 | 
| 326 | 
  | 
        if (eof_test == NULL) { | 
| 327 | 
< | 
            sprintf(painCave.errMsg, "Error reading 1st line of %s \n ", | 
| 327 | 
> | 
            sprintf(painCave.errMsg, "DumpReader Error: Error reading 1st line of %s \n ", | 
| 328 | 
  | 
                    filename_.c_str()); | 
| 329 | 
  | 
            painCave.isFatal = 1; | 
| 330 | 
  | 
            simError(); | 
| 353 | 
  | 
        eof_test = fgets(read_buffer, sizeof(read_buffer), inFile_); | 
| 354 | 
  | 
 | 
| 355 | 
  | 
        if (eof_test == NULL) { | 
| 356 | 
< | 
            sprintf(painCave.errMsg, "error in reading commment in %s\n", | 
| 356 | 
> | 
            sprintf(painCave.errMsg, "DumpReader Error: error in reading commment in %s\n", | 
| 357 | 
  | 
                    filename_.c_str()); | 
| 358 | 
  | 
            painCave.isFatal = 1; | 
| 359 | 
  | 
            simError(); | 
| 376 | 
  | 
                mol = info_->getMoleculeByGlobalIndex(i); | 
| 377 | 
  | 
 | 
| 378 | 
  | 
                if (mol == NULL) { | 
| 379 | 
< | 
                    sprintf(painCave.errMsg, "Molecule not found on node %d!", worldRank); | 
| 379 | 
> | 
                    sprintf(painCave.errMsg, "DumpReader Error: Molecule not found on node %d!", worldRank); | 
| 380 | 
  | 
                        painCave.isFatal = 1; | 
| 381 | 
  | 
                    simError(); | 
| 382 | 
  | 
                } | 
| 388 | 
  | 
 | 
| 389 | 
  | 
                    if (eof_test == NULL) { | 
| 390 | 
  | 
                        sprintf(painCave.errMsg, | 
| 391 | 
< | 
                                "error in reading file %s\n" | 
| 391 | 
> | 
                                "DumpReader Error: error in reading file %s\n" | 
| 392 | 
  | 
                                    "natoms  = %d; index = %d\n" | 
| 393 | 
  | 
                                    "error reading the line from the file.\n", | 
| 394 | 
  | 
                                filename_.c_str(), | 
| 412 | 
  | 
 | 
| 413 | 
  | 
                    if (eof_test == NULL) { | 
| 414 | 
  | 
                        sprintf(painCave.errMsg, | 
| 415 | 
< | 
                                "error in reading file %s\n" | 
| 415 | 
> | 
                                "DumpReader Error: error in reading file %s\n" | 
| 416 | 
  | 
                                    "natoms  = %d; index = %d\n" | 
| 417 | 
  | 
                                    "error reading the line from the file.\n", | 
| 418 | 
  | 
                                filename_.c_str(), | 
| 443 | 
  | 
                 | 
| 444 | 
  | 
                mol = info_->getMoleculeByGlobalIndex(i); | 
| 445 | 
  | 
                if (mol == NULL) { | 
| 446 | 
< | 
                    sprintf(painCave.errMsg, "Molecule not found on node %d!", worldRank); | 
| 446 | 
> | 
                    sprintf(painCave.errMsg, "DumpReader Error: Molecule not found on node %d!", worldRank); | 
| 447 | 
  | 
                    painCave.isFatal = 1; | 
| 448 | 
  | 
                    simError(); | 
| 449 | 
  | 
                } | 
| 485 | 
  | 
 | 
| 486 | 
  | 
    if (nTokens < 14) { | 
| 487 | 
  | 
            sprintf(painCave.errMsg, | 
| 488 | 
< | 
                    "Not enough Tokens.\n"); | 
| 488 | 
> | 
                    "DumpReader Error: Not enough Tokens.\n"); | 
| 489 | 
  | 
            painCave.isFatal = 1; | 
| 490 | 
  | 
            simError(); | 
| 491 | 
  | 
    } | 
| 493 | 
  | 
    std::string name = tokenizer.nextToken(); | 
| 494 | 
  | 
 | 
| 495 | 
  | 
    if (name != integrableObject->getType()) { | 
| 496 | 
< | 
         | 
| 496 | 
> | 
 | 
| 497 | 
> | 
            sprintf(painCave.errMsg, | 
| 498 | 
> | 
                    "DumpReader Error: Atom type [%s] in %s does not match Atom Type [%s] in .md file.\n", | 
| 499 | 
> | 
                    name.c_str(), filename_.c_str(), integrableObject->getType().c_str()); | 
| 500 | 
> | 
            painCave.isFatal = 1; | 
| 501 | 
> | 
            simError();         | 
| 502 | 
  | 
    } | 
| 503 | 
  | 
 | 
| 504 | 
  | 
    pos[0] = tokenizer.nextTokenAsDouble(); | 
| 522 | 
  | 
        if (qlen < oopse::epsilon) { //check quaternion is not equal to 0 | 
| 523 | 
  | 
             | 
| 524 | 
  | 
            sprintf(painCave.errMsg, | 
| 525 | 
< | 
                    "initial quaternion error (q0^2 + q1^2 + q2^2 + q3^2 ~ 0).\n"); | 
| 525 | 
> | 
                    "DumpReader Error: initial quaternion error (q0^2 + q1^2 + q2^2 + q3^2 ~ 0).\n"); | 
| 526 | 
  | 
            painCave.isFatal = 1; | 
| 527 | 
  | 
            simError(); | 
| 528 | 
  | 
             | 
| 556 | 
  | 
    //comment line should at least contain 10 tokens: current time(1 token) and  h-matrix(9 tokens) | 
| 557 | 
  | 
    if (nTokens < 10) { | 
| 558 | 
  | 
            sprintf(painCave.errMsg, | 
| 559 | 
< | 
                    "Not enough tokens in comment line: %s", line); | 
| 559 | 
> | 
                    "DumpReader Error: Not enough tokens in comment line: %s", line); | 
| 560 | 
  | 
            painCave.isFatal = 1; | 
| 561 | 
  | 
            simError();    | 
| 562 | 
  | 
    } |