[FLASH-USERS] Where to compile new programs and modules in FLASH

Nathan Hearn nhearn at uchicago.edu
Wed Mar 26 15:13:33 EDT 2008


Hi Suzanne,

    Since it sounds like you are just changing files in (and adding
files to) an existing Flash module, you might want to take advantage
of the setup routine's automatic file replacement, rather than write a
new module.

    When setup runs, it takes note of the files in your problem
directory in FLASH2.5/setups.  If any file in the Flash source tree
has the same name as a file in the problem directory, the file from
the problem directory is used in its place.  In other words, if you
have a file named net.F90 in the directory

FLASH2.5/setups/detonation

(which uses the aprox13 module), setup will use this file instead of the file

source/source_terms/burn/aprox13/net.F90

when building the object directory for the detonation problem.  Files
that do not replace a Flash source file can also be added to the
problem directory; editing the Makefile in the problem directory will
allow you to tell setup that these files should also be compiled.

    If you wish to use the same modifications for more than one
problem, then you may want to create a new module in the Flash source
tree.  However, using the above method means that you will not have to
make any changes to the Flash source, avoiding any of the issues
specific to writing new modules; this could also be a good way to
prototype the code for a new module.

    If you found any of this confusing, please let me know.


- Nathan

-- 
Nathan C. Hearn
nhearn at uchicago.edu

ASC Flash Center
Computational Physics Group
University of Chicago


On Wed, Mar 26, 2008 at 1:31 PM, espresso <amidala at utk.edu> wrote:
> Hello,
>
>  I am new to Flash so I apologize for the convoluted nature of this question. I
>  am trying to add a new
>  nuclear reaction network to Flash and I am starting with the aprox13 code as a
>  model. I am currently
>  modifying FLASH2.5/source/source_terms/burn/aprox13_modified/net.F90.
>
>  I need net.F90 to call a function called read_nuclear_data and use a module
>  called nuclear_data that
>  sits in a program called data.f in the same lowest directory with net.F90.
>  (not the stub net.F90 in burn,
>  but the net.F90 that sits in aprox13_modified under burn)
>  I thought that modifying the Makefile in FLASH2.5/source/source_terms/burn,
>  where net.F90's parent
>  stub gets instructed to compile would disrupt the modular nature of the
>  program, so I wrote a new
>  Makefile in  "~burn/aprox13_modified" to compile data.f . This works if I only
>  want to do operations
>  within data.f , however when I try to use modules in data.f  in the lowest
>  net.F90 I get a compiler error
>  that states, " Error in opening the compiled module file.  Check INCLUDE
>  paths.   [NUCLEAR_DATA]". I'm
>  not sure what "Check INCLUDE paths" means in this context.
>
>   The problem may be that data.f needs to compile before net.F90, but I can't
>  figure out how to do this
>  and preserve modular structure of Flash. Should I move data.f up a directory
>  into Burn and compile it
>  using commands in the Makefile there, where net.F90's parent stub is compiled
>  ? Is there a way that I
>  can do it through a Makefile in the aprox13_modified directory below Burn
>  using "INCLUDE paths" or
>  other means?
>
>  I do have a flash2 manual and I have dug though it to frustration. On page 44
>  it tells me to "consult the
>  authors of FLASH" when attempting to add new solvers or physics so I am
>  following that suggestion
>  now.
>
>  Any help would be appreciated.
>
>  Thank you,
>
>  Suzanne Parete-Koon



More information about the flash-users mailing list