| 482 | | if( cpu.nFileDone == 0 ) |
|---|
| 483 | | { |
|---|
| 484 | | // failed on very first open -> probably path is not correct |
|---|
| 485 | | fprintf( ioQQQ, "I Could not open the file %s\n", fname ); |
|---|
| 486 | | fprintf( ioQQQ, "\n\nAlthough there may be other reasons you have received this error,\n"); |
|---|
| 487 | | fprintf( ioQQQ, "the most likely reason is that the path has not been properly set.\n"); |
|---|
| 488 | | fprintf( ioQQQ, "Please have a look at the file path.h in the source directory.\n"); |
|---|
| 489 | | fprintf( ioQQQ, "Check how the variable CLOUDY_DATA_PATH is set - "); |
|---|
| 490 | | fprintf( ioQQQ, "it should give the location of the data files I need.\n"); |
|---|
| 491 | | fprintf( ioQQQ, "These are the files in the data download from the web site.\n"); |
|---|
| 492 | | fprintf( ioQQQ, "I bet that the path has not been set properly - "); |
|---|
| 493 | | fprintf( ioQQQ, "I could not find what I expected to find.\n"); |
|---|
| 494 | | cpu.printDataPath(); |
|---|
| 495 | | fprintf(ioQQQ, "Sorry.\n\n\n"); |
|---|
| 496 | | } |
|---|
| 497 | | else |
|---|
| 498 | | { |
|---|
| 499 | | fprintf( ioQQQ, " I Could not open the file %s on any of these paths:\n", fname ); |
|---|
| 500 | | for( vector<string>::size_type i=begin; i < end; ++i ) |
|---|
| 501 | | { |
|---|
| 502 | | if( cpu.chSearchPath[i].length() > 0 ) |
|---|
| 503 | | fprintf( ioQQQ, " ==%s==\n", cpu.chSearchPath[i].c_str() ); |
|---|
| 504 | | else |
|---|
| 505 | | fprintf( ioQQQ, " ==<local directory>==\n" ); |
|---|
| 506 | | } |
|---|
| 507 | | } |
|---|
| | 482 | // failed on very first open -> probably path is not correct |
|---|
| | 483 | fprintf( ioQQQ, "\nPROBLEM DISASTER I could not open the data file %s\n\n", fname ); |
|---|
| | 484 | fprintf( ioQQQ, "Although there may be other reasons you have received this error,\n"); |
|---|
| | 485 | fprintf( ioQQQ, "the most likely are that the path has not been properly set\n"); |
|---|
| | 486 | fprintf( ioQQQ, "or that the path points to an old version of the data.\n\n"); |
|---|
| | 487 | fprintf( ioQQQ, "Please have a look at the file path.h in the source directory\n"); |
|---|
| | 488 | fprintf( ioQQQ, "to check how the variable CLOUDY_DATA_PATH is set - \n"); |
|---|
| | 489 | fprintf( ioQQQ, "it should give the location of the data files I need.\n"); |
|---|
| | 490 | fprintf( ioQQQ, "These are the files in the data download from the web site.\n\n"); |
|---|
| | 491 | fprintf( ioQQQ, "Recompile the code with the correct data path set in path.h\n"); |
|---|
| | 492 | fprintf( ioQQQ, "or use the shell command \"set CLOUDY_DATA_PATH=path\" to set the\n"); |
|---|
| | 493 | fprintf( ioQQQ, "path from a command prompt.\n\n"); |
|---|
| | 494 | cpu.printDataPath(); |
|---|
| | 495 | |
|---|
| | 496 | fprintf( ioQQQ, " These are all the paths I tried:\n", fname ); |
|---|
| | 497 | for( vector<string>::size_type i=begin; i < end; ++i ) |
|---|
| | 498 | { |
|---|
| | 499 | if( cpu.chSearchPath[i].length() > 0 ) |
|---|
| | 500 | fprintf( ioQQQ, " ==%s==\n", cpu.chSearchPath[i].c_str() ); |
|---|
| | 501 | else |
|---|
| | 502 | fprintf( ioQQQ, " ==<local directory>==\n" ); |
|---|
| | 503 | } |
|---|
| | 504 | fprintf(ioQQQ, "Sorry.\n\n\n"); |
|---|