Changes between Version 21 and Version 22 of EditPath


Ignore:
Timestamp:
2017-09-09T11:26:24Z (2 weeks ago)
Author:
peter
Comment:

Mention changed behavior of environment variable after C17.

Legend:

Unmodified
Added
Removed
Modified
  • EditPath

    v21 v22  
    33'''The skinny on editing the path'''
    44If you are using a Linux computer, a Mac, or a Windows machine with [http://www.cygwin.com/ Cygwin],
    5 you can use the a makefile to build the code.
     5you can use a makefile to build the code.
    66You do not need to do the steps on this page and you can go on to the next step, CompileCode.
    77
     
    1010There are vast amounts of atomic data that the code must reference in order to compute a model.  These are the files that live in the data directory.  The code must be able to find these data files. Their location is stored in the code. This information needs to be updated so that it gives the location of the data on your machine.
    1111
    12 Setting the path to the data files is done automatically when compiling the code with ''make''. You can modify the default path generated by ''make'' by using the first method. The second method is to add an extra parameter to the compiler options when compiling from the command line, and the third method is to edit the file ''path.h'' in the source directory '''''(deprecated since version C15)'''''.
     12Setting the path to the data files is done automatically when compiling the code with ''make''. You can modify the default path generated by ''make'' by using the first method. The second method is to add an extra parameter to the compiler options when compiling from the command line, and the third method is to edit the file ''path.h'' in the source directory '''''(the last two methods are deprecated since version C17)'''''.
    1313
    1414-----
     
    2121
    2222{{{
    23 setenv CLOUDY_DATA_PATH "/usr/gary/cloudy/data"
     23setenv CLOUDY_DATA_PATH "/usr/gary/cloudy/data"  (double quotes are optional)
    2424}}}
    2525
     
    3636}}}
    3737
    38 If the environment variable is defined during compilation, it will override the default setting generated by ''make'' and this path will be stored in the executable. If the environment variable is defined during execution, it will always override the path stored in the executable.
     38If the environment variable is defined during compilation, it will override the default setting generated by ''make'' and this path will be stored in the executable. If the environment variable is defined during execution, it will always override the path stored in the executable. '''''This behavior will be changed in the first major release after C17. From then on the environment variable will only affect the code during execution, but will not affect compilation of the code.'''''
    3939
    4040The environment value CLOUDY_DATA_PATH supports a search path with multiple components, similar to the search paths used in UNIX. You can supply multiple directory paths, separated by a colon (':') on UNIX and Mac systems, or separated by a semicolon (';') on Windows systems. When Cloudy searches for a file, it will search in each of the component directories until it finds the file. An example (for UNIX) would be
     
    4646When Cloudy looks for a data file, it will first look in the directory /usr/gary/cloudy/data. If it doesn't find the file there, it will look in /usr/gary/local_data instead. The latter is convenient for storing locally generated data such as grain opacity or stellar atmosphere files. Storing them in /usr/gary/local_data avoids having to move them around every time you switch to a new Cloudy version.
    4747
    48 Starting with Cloudy version C15, the search path will also support the special path component "+" which will be expanded to the default search path that ''make'' would have generated for that release. This makes it even more convenient to maintain locally generated data files by using
     48Starting with Cloudy version C17, the search path will also support the special path component "+" which will be expanded to the default search path that ''make'' would have generated for that release. This makes it even more convenient to maintain locally generated data files by using
    4949
    5050{{{