wiki:DeprecatedBuildingAstroBEAR Building AstroBEAR 1.0

Building AstroBEAR


AstroBEAR development uses Red Hat Enterprise Linux 4 on 64-bit processors, but AstroBEAR still has 32-bit support. AstroBEAR can be compiled with GCC (a standard compiler on most Linux distros) in single- and parallelized multi-processor modes.

AstroBEAR has been used most extensively with the Intel compilers on Beowulf-style clusters using OpenMPI. It has been ported to bluegene architecture (see below), as well as alternative MPI implementations such as MPICH2.

Machine-specific compilation notes :


The following compilation instructions apply to the UR-specific machine grass.pas.rochester.edu:

Required Packages

  • Compilers: AstroBEAR is written in Fortran 95 using C preprocessor tags. Development efforts utilize Intel compilers (version 9.0), but we can't guarantee other compilers will work. Other packages' installation instructions assume you are using the version 9.0 Intel compilers.
  • MPI Support: MPI (Message Passing Interface) support is required for parallelization. Current AstroBEAR builds use OpenMPI.
  • Other Packages: PGPlot and OpenDX are plotting and visualization packages for which AstroBEAR has built-in support.

For a complete list of installation instructions for required AstroBEAR packages, click here.


Loading Modules

To load the proper code modules for AstroBEAR compilation on grass, type the following into the command line:

module load hdf5/1.8.1 ifort openmpi fftw3

It is simpler to add these loads to your .bash_profile or .bashrc. If you do this, you will need to wrap them in an IF statement, e.g.

if [ $TERM != "dumb" ]
  then
    module load ifort visit hdf5 fftw3 openmpi pgplot
fi

Otherwise the modules commands may conflict with remote SSH connections.


Obtaining AstroBEAR Code

The Subversion (or SVN) version control system stores and tracks AstroBEAR code updates in a central repository. The user initially downloads the entire code package and any updates as they become available, and uploads important source changes he or she has made.


Downloading (Checking Out) AstroBEAR from SVN

To download (check out) a copy of the AstroBEAR code and the bear2fix utility, using CURRENT_DIR/astrobear and CURRENT_DIR/bear2fix as the target directories:

svn co svn+ssh://[username]@clover.pas.rochester.edu/var/repositories/astrobear/dev astrobear
svn co svn+ssh://[username]@clover.pas.rochester.edu/var/repositories/bear2fix/dev bear2fix 

This initial checkout will create a complete directory tree nearly ready for compilation. After this initial checkout, you can "update" your working version rather than downloading the entire source again. From the astrobear or bear2fix directores:

svn update

See SVN tutorial for a quick overview of commonly-used commands.


Compiling AstroBEAR

  1. Select the appropriate ASTROBEAR_DIR/Makefile.inc file for your computing environment. The default Makefile (Makefile.inc) is set for compilation on grass.rochester.edu; if you are NOT compiling on grass, you will need to select the file for your machine. The naming convention is Makefile.cluster_name.inc). Set this file to Makefile.inc by typing
rm Makefile.inc
ln -s Makefile.cluster_name.inc Makefile.inc

The Makefile.inc file contains the machine's optimization and debugging options (optimization is on by default; debugging is not), so the wrong Makefile.inc file can result in compilation and run-time errors, as well as poor performance. You will probably need to do this again after each svn update call.

  1. cd to the compilation directory (for U of R users this will be ASTROBEAR_DIR/contrib/astro).
  1. Compile the code. For a single-processor executable, type
make xbear 

For a multi-processor executable, type

make mpibear 

A working executable (xbear or mpibear) will appear in astrobear/contrib/astro. (Note that compiling bear2fix is directly analogous, by running make bear2fix in the bear2fix directory.)

If you have compiled the code before and are having difficulties, try running one or both of the following commands:

  • make clean: Wipes out all compiled modules, executables, data files and objects so the user can start over.
  • make distclean: Less sweeping than make clean, this command wipes out linked objects, data files and some problem-specific modules. Most of the compiled modules in ASTROBEAR_DIR/lib will remain untouched.

Note that you can supply make more than one argument, e.g. make clean distclean astrodistclean will completely clean out the entire compiled code.

If problems persist, then there may be a problem with the optimization flags or even the code itself. Refer to the astroBEAR ticket system for troubleshooting, or the Troubleshooting and Developer Logs pages to see if your problem has been encountered before.

Last modified 14 years ago Last modified on 04/07/11 15:13:36
Note: See TracWiki for help on using the wiki.