Adding support for a new machine or operating system/compiler combination¶
One can preset the variables needed for a particular machine or operating system/compiler set by creating a ''machine file''. Machine files reside in the machines subdirectory of Bilder.
Machine files have three sections, the "KEEP THIS" section, the operating system variables section, and the package variables section. These are illustrated in the machine file, empty.ness, which provides an example.
The KEEP THIS section¶
This section begins with the line,
# KEEP THIS
and ends with the line,
# END KEEP THIS
In this section one should put any logic that one would like to keep when one is updating the file using the mkvars.sh script defined below. Examples of usage are shown in, e.g., cray.pgi.
The system variables section¶
The next section is the system variables section. It is where one can define variables that apply
to all packages being built on this system. It ends with the line starting with "Variables for the packages, ...". In this section one sets compilers, compile flags, Java flags, and any system locations for the linear algebra libraries and the HDF5 and NetCDF libraries.
The package variables section¶
This section allows one to specify the per-package variables. An example is
# ATLAS_BLDRVERSION=${ATLAS_BLDRVERSION:-""}
# ATLAS_BUILDS=${ATLAS_BUILDS:-""}
# ATLAS_CC4PY_OTHER_ARGS=${ATLAS_CC4PY_OTHER_ARGS:-""}
# ATLAS_CLP_OTHER_ARGS=${ATLAS_CLP_OTHER_ARGS:-""}
# ATLAS_SER_OTHER_ARGS=${ATLAS_SER_OTHER_ARGS:-""}
This stanza is commented out, so no variables are set, but it indicates that one could set the desired version of the ATLAS package, which builds one desires, and for each of the builds (cc4py - compiled for Python, clp - built with CLAPACK, ser - regular serial build) one can specify additional arguments to be passed to the configuration step. The syntax shown above is a Bilder standard, that one should not set a variable unless it is empty, so that the first definition takes precedence.
Creating a new machines file¶
To create a new machines file, go into the directory where you would like the file created, and run "mkvars.sh -f <oldfile>" to get on stdout a stream that has the settings of <oldfile> along with commented out sections for all variable values that one can set to influence Bilder. E.g., in the machines directory,
../mkvars.sh -f empty.ness | tee machine.new
gives a file, machine.new, that has the KEEP THIS section, unchanged, at the top, then the system variables and package variables sections with all the settings of empty.ness along with new commented out sections for any new packages it has found.
Updated by Tech-X Corporation almost 9 years ago · 2 revisions