wiki:CompilingAstroBear

Version 3 (modified by Erica Kaminski, 12 years ago) ( diff )

Compiling AstroBEAR

( ===Chapter 1. User's Manual=== )

Compiling AstroBEAR

  1. Within the modules directory there are a number of sample problem files. To select a problem module directory for compilation, execute the following commands from your AstroBEAR directory:
    cd modules
    ln -s <name of problem directory> Problem
    
    This will create a symbolic link to the problem directory that the compiler can use to locate the appropriate module file. For example, to compile FieldLoopAdvection, you would create the following symbolic link from the modules directory:
    ln -s FieldLoopAdvection Problem
    
    If a symbolic link already exists to Problem, you must first remove it by using the command:
    rm Problem
    
    After which you can create a new symbolic link to Problem.
  1. AstroBEAR comes with a makefile and several Makefile.inc files containing machine-specific parameters. In order to compile, you need to create a link to the Makefile.inc file for the machine you are using from the AstroBEAR root directory:
    ln -s Makefile.inc.<machine_name> Makefile.inc
    
    Currently there are Makefile.inc files in the repository for three machines: grass, bluehive, and itasca.
  1. If you are planning to use self-gravity or diffusion, you will need to compile AstroBEAR with hypre. To do this, open Makefile.inc and set the HYPREFLAG variable to 1. Note that if you are not using gravity or diffusion, then you will want to turn it off by setting HYPREFLAG to 0.
  1. Once you have linked a problem directory and a properly-configured Makefile.inc, return to the AstroBEAR root directory. AstroBEAR 2.0's build process is much more streamlined than AstroBEAR 1.0; to compile, simply type make. To wipe out .mod and .o files, type make clean.
  1. You will now have an executable file astrobear in your AstroBEAR root directory. Use it wisely.
Note: See TracWiki for help on using the wiki.