Docstoc

KA_Setup

Document Sample
KA_Setup Powered By Docstoc
					The Center for Astrophysical Thermonuclear Flashes




         Setting Up Your Problem

                  A Beginner’s Guide




          An Advanced Simulation & Computing (ASC)
       Academic Strategic Alliances Program (ASAP) Center
                  at The University of Chicago
                          What’s Setup?


 Very basically, the Flash code is made up of
  general independent pieces, called modules,
  which can be put together and reused to solve
  different problems

 By running the setup script you specify the
  problem you want to solve, locate the needed
  modules and link all the source code to the
  object directory --- Then you can compile the
  code.



           The ASC/Alliances Center f or Astrophysical Thermonuclear Flashes
                              The University of Chicago
                     First Setup Example


 From the main flash directory, /FLASH2/ type


./setup sedov -2d -auto
    command                 problem                   dimension             Setup script
                             name                                           determines
                                                                          which modules
                                                                         to include based
                                                                          on the problem
                                                                           name (rather
                                                                          than manually)


        To run setup you shouldn’t need to modify the
             setup script (FLASH2/bin/setup.py)
            The ASC/Alliances Center f or Astrophysical Thermonuclear Flashes
                               The University of Chicago
                                  Setup options

     -auto   : setup script will automatically generate the Modules
             file based on the problem you specify

Sample Modules File
INCLUDE database/amr/paramesh2.0
INCLUDE driver/time_dep                                                          Try manually changing
                                                                                  io/amr/hdf5_serial to
INCLUDE gravity/null
                                                                                 io/amr/hdf5_parallel -
INCLUDE hydro/explicit/split/ppm                                                 Then run setup without
INCLUDE io/amr/hdf5_serial                                                            the -auto flag
INCLUDE materials/eos/gamma
INCLUDE mesh/amr/paramesh2.0/second_order_old
INCLUDE util/mappers
INCLUDE util/tools
INCLUDE util/wrapping


        If you don’t use the -auto flag, you must have a valid Modules
               file in the top FLASH directory (FLASH2/Modules)
                 The ASC/Alliances Center f or Astrophysical Thermonuclear Flashes
                                    The University of Chicago
                              Setup Options

Another way to use a specific module in setup
is with the -with-module option


 -with-module=<module>
         : force a specific module to be used in setup




./setup sedov -2d -auto
      -with-module=io/amr/hdf5_parallel



              The ASC/Alliances Center f or Astrophysical Thermonuclear Flashes
                                 The University of Chicago
                                  More Setup Options
-auto                                   Automatically generates the Modules file
-with-module=<module>                   Forces a specific module to be used
-[123]d                                 Specifies the dimension, default is 2d
-nxb=<#> -nyb=<#> -nzb=<#>              Specifies number of zones/block, default is 8
-maxblocks=<#>                          Assigns maxblocks per processor. Defaults are in place but you
                                        may want to modify depending on problem and machine specs
-site=<site> | -ostype=<ostype>         Allows you to directly specify the host or ostype. Typically setup
                                        finds this info but on some machines it isn’t directly accessible.
                                        -site=sphere.asci.uchicago.edu or -ostype=Linux
-debug | -test                          -debug: makes compiler put debugging symbols in executable,
                                        possibly checks for array out of bounds conditions, etc
                                        -test: compiles code with no debugging or optimization options
                                        -opt: compiles code for highest performance (default)
-portable                               Normally setup links files from the source directory to the object
                                        directory. With -portable files are copied to object dir instead
-objdir=<relative obj dir>              By default setup script links all files needed in compilation to the
                                        object directory. The -objdir flag allows you to specify a different
                                        or new directory
-preprocess                             Runs the preprocessor cpp on all source files
-verbose                                More wordy explanations during setup
                         The ASC/Alliances Center f or Astrophysical Thermonuclear Flashes
                                            The University of Chicago
                    Adding a New Setup


 To see all of the current setups go to
      FLASH2/setups/
 All of the setups have at least these 3 things in
  common
    • Config file
    • flash.par file
    • init_block.F90 file
 Certain problems may require other data files
  or inputs
 Look at sedov setup as an example


           The ASC/Alliances Center f or Astrophysical Thermonuclear Flashes
                              The University of Chicago
                       Adding a New Setup




 Config
     • Contains needed modules
     • Required runtime parameters (default)
 flash.par
     • Runtime parameters (these override Config parameters)
 init_block.F90
     • Initializes solution on the mesh
     • Sets up the initial values of your problem




              The ASC/Alliances Center f or Astrophysical Thermonuclear Flashes
                                 The University of Chicago

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:3
posted:6/27/2011
language:English
pages:8