Show
Ignore:
Timestamp:
05/10/08 09:03:02 (4 months ago)
Author:
peter
Message:

Merging all changes from mainline upto r2033, except r1902.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/c08_branch/source/cpu.cpp

    r1921 r2034  
    256256        /* ~ is the unary bitwise complement - all bits flip */  
    257257        NewMask = ~NewMask; 
    258         /*lint -e534 ignore value returned by function (nothing to do with it)*/ 
    259258        _controlfp( NewMask , _MCW_EM ); 
    260         /*lint +e534 ignore value returned by function (nothing to do with it)*/ 
    261259 
    262260        /* this is the code for Linux PC (but not Linux alpha) to force crash */ 
     
    426424} 
    427425 
    428 /*lint -e740 unusual pointer cast */ 
    429426 
    430427void t_cpu::printDataPath() const 
     
    483480        if( handle == NULL && lgAbort ) 
    484481        { 
    485                 if( cpu.nFileDone == 0 ) 
    486                 { 
    487                         // failed on very first open -> probably path is not correct 
    488                         fprintf( ioQQQ, "I Could not open the file %s\n", fname ); 
    489                         fprintf( ioQQQ, "\n\nAlthough there may be other reasons you have received this error,\n"); 
    490                         fprintf( ioQQQ, "the most likely reason is that the path has not been properly set.\n"); 
    491                         fprintf( ioQQQ, "Please have a look at the file path.h in the source directory.\n"); 
    492                         fprintf( ioQQQ, "Check how the variable CLOUDY_DATA_PATH is set - "); 
     482                fprintf( ioQQQ, "\nPROBLEM DISASTER I could not open the data file %s\n\n", fname ); 
     483                if( cpu.nFileDone == 0 || scheme == AS_DATA_ONLY ) 
     484                { 
     485                        // failed on very first open -> most likely path is not correct 
     486                        // failed on AS_DATA_ONLY -> CLOUDY_DATA_PATH may point to obsolete data dir 
     487                        fprintf( ioQQQ, "Although there may be other reasons you have received this error,\n"); 
     488                        fprintf( ioQQQ, "the most likely are that the path has not been properly set\n"); 
     489                        fprintf( ioQQQ, "or that the path points to an old version of the data.\n\n"); 
     490                        fprintf( ioQQQ, "Please have a look at the file path.h in the source directory\n"); 
     491                        fprintf( ioQQQ, "to check how the variable CLOUDY_DATA_PATH is set - \n"); 
    493492                        fprintf( ioQQQ, "it should give the location of the data files I need.\n"); 
    494                         fprintf( ioQQQ, "These are the files in the data download from the web site.\n"); 
    495                         fprintf( ioQQQ, "I bet that the path has not been set properly - "); 
    496                         fprintf( ioQQQ, "I could not find what I expected to find.\n"); 
     493                        fprintf( ioQQQ, "These are the files in the data download from the web site.\n\n"); 
     494                        fprintf( ioQQQ, "Recompile the code with the correct data path set in path.h\n"); 
     495                        fprintf( ioQQQ, "or use the shell command \"export CLOUDY_DATA_PATH=path\" to set the\n"); 
     496                        fprintf( ioQQQ, "path from a bash command prompt.\n\n"); 
    497497                        cpu.printDataPath(); 
    498                         fprintf(ioQQQ, "Sorry.\n\n\n"); 
    499498                } 
    500499                else 
    501500                { 
    502                         fprintf( ioQQQ, " I Could not open the file %s on any of these paths:\n", fname ); 
     501                        // failed on search including local directory -> most likely the file name 
     502                        // was mistyped on a compile command, or Cloudy is run in the wrong directory 
     503                        fprintf( ioQQQ, "These are all the paths I tried:\n" ); 
    503504                        for( vector<string>::size_type i=begin; i < end; ++i ) 
    504505                        { 
     
    508509                                        fprintf( ioQQQ, "   ==<local directory>==\n" ); 
    509510                        } 
    510                 } 
     511                        fprintf( ioQQQ, "\nAlthough there may be other reasons you have received this error,\n"); 
     512                        fprintf( ioQQQ, "the most likely are that you mistyped the file name, or that you\n"); 
     513                        fprintf( ioQQQ, "are running Cloudy in the wrong directory. If you are running a\n"); 
     514                        fprintf( ioQQQ, "COMPILE command, this needs to be done in the data directory.\n\n"); 
     515                        fprintf( ioQQQ, "Otherwise, please have a look at the file path.h in the source\n"); 
     516                        fprintf( ioQQQ, "directory to check how the variable CLOUDY_DATA_PATH is set - \n"); 
     517                        fprintf( ioQQQ, "it should give the location of the data files I need.\n"); 
     518                        fprintf( ioQQQ, "These are the files in the data download from the web site.\n\n"); 
     519                        fprintf( ioQQQ, "Recompile the code with the correct data path set in path.h\n"); 
     520                        fprintf( ioQQQ, "or use the shell command \"export CLOUDY_DATA_PATH=path\" to set the\n"); 
     521                        fprintf( ioQQQ, "path from a bash command prompt.\n\n"); 
     522                } 
     523                fprintf(ioQQQ, "Sorry.\n\n\n"); 
    511524                cdEXIT(EXIT_FAILURE); 
    512525        } 
     
    640653                return false; 
    641654} 
    642  
    643 /*lint +e740 unusual pointer cast */