When setup is run it generates many files in the object directory. They fall into three major categories:
(a) | Files not required to build the FLASH executable, but which contain useful information, |
(b) | Generated F90 or C code, and |
(c) | Makefiles required to compile the FLASH executable. |
setup_call | contains the options with which setup was called and the command line resulting after shortcut expansion |
setup_libraries | contains the list of libraries and their arguments (if any) which was linked in to generate the executable |
setup_units | contains the list of all units which were included in the current setup |
setup_defines |
contains a list of all pre-process symbols passed to the compiler invocation directly |
setup_flags | contains the exact compiler and linker flags |
setup_params |
contains the list of runtime parameters defined in the Config files processed by setup |
setup_vars | contains the list of variables, fluxes, species, particle properties, and mass scalars used in the current setup, together with their descriptions. |
These routines are generated by the setup call and provide simulation-specific code.
setup_buildstamp.F90 | contains code for the subroutine setup_buildstamp which returns the setup and build time as well as code for setup_systemInfo which returns the uname of the system used to setup the problem |
setup_buildstats.c | contains code which returns build statistics including the actual setup call as well as the compiler flags used for the build |
setup_getFlashUnits.F90 | contains code to retrieve the number and list of flashUnits used to compile code |
setup_flashRelease.F90 | contains code to retrieve the version of FLASH used for the build |
Flash.h | contains simulation specific preprocessor macros, which change based upon setup unlike constants.h. It is described in Chp:Flash.h |
Simulation_mapIntToStr.F90 | contains code to map an index described in Flash.h to a string described in the Config file. |
Simulation_mapStrToInt.F90 | contains code to map a string described in the Config file to an integer index described in the Flash.h file. |
Simulation_mapParticlesVar.F90 | contains a mapping between particle properties and grid variables. Only generated when particles are included in a simulation. |
Particles_specifyMethods.F90 | contains code to make a data structure with information about the mapping and initialization method for each type of particle. Only generated when particles are included in a simulation. |
Apart from the master Makefile, setup generates a makefile for each unit, which is “included” in the master Makefile. This is true even if the unit is not included in the application. These unit makefiles are named Makefile.Unit and are a concatenation of all the Makefiles found in unit hierarchy processed by setup.
For example, if an application uses
Grid/GridMain/paramesh/paramesh4/Paramesh4.0, the file
Makefile.Grid
will be a concatenation of the Makefiles found in
As another example, if an application does not use PhysicalConstants, then Makefile.PhysicalConstants is just the contents of PhysicalConstants/Makefile at the API level.
Since the order of concatenation is arbitrary, the behavior of the
Makefiles should not depend on the order in which they have been
concatenated. The makefiles inside the units contain lines of the form:
Unit += file1.o file2.o ...
where Unit is the name of the unit, which was Grid in the example above. Dependency on data modules files need not be specified since the setup process determines this requirement automatically.