wiki:CompilingOnBluehive

Version 31 (modified by trac, 12 years ago) ( diff )

Compiling AstroBEAR and its Dependencies on the Bluehive Research Cluster


Loading the Appropriate Modules

The following lines should be present (or added) to the ~/.bashrc file at bluehive:

module load intel
module load hdf5-intel
module load fftw3-intel
module load openmpi-intel


Setting the Environment Variable(s)

The following line should be present (or added) to your ~/.bashrc file at bluehive:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/bshroyer/local/hypre_ompi_opt/lib

Typing source ~/.bashrc, or just logging out and back in, will apply the changes made to ~/.bashrc.


Obtaining the AstroBEAR Code

AstroBEAR is maintained using the Subversion (or SVN) version control system. It is used to automatically track changes and updates to the code, and to store the code in a central location. The user's primary interaction with it is to initially download the entire code package from the repository, to download any updates as they become available, and to upload any important changes he or she has made.


Downloading (Checking-Out) AstroBEAR from SVN

To download, or "check-out", a copy of the AstroBEAR code, type the following from your home directory:

svn co https://data-store.pas.rochester.edu/svn/orda/bearclaw1/dev bearclaw
svn co https://data-store.pas.rochester.edu/svn/orda/bear2fix/dev bear2fix 

A copy of the AstroBEAR code and the bear2fix utility will be checked out using CURRENT_DIR/bearclaw and CURRENT_DIR/bear2fix as the respective target directories.

This initial checkout will create a directory tree that should be complete and nearly ready to be compiled. After this initial checkout, you should only ever need to "update" your working version rather than check out the entire code again. You will likely become very familiar with SVN as you continue to work with AstroBEAR, and we invite you to visit our SVN tutorial for an overview of some commonly-used commands.


Setting-up AstroBEAR's Makefile for use with Bluehive

Several versions of Makefile.inc are included in AstroBEAR to deal with the configuration demands of different clusters. To set-up the proper options for bluehive, enter the following commands from your home directory @ bluehive:

cd bearclaw
rm Makefile.inc 
ln -s Makefile.bluehive.inc Makefile.inc


Compiling AstroBEAR

At this point you should be ready to compile AstroBEAR. To start this process, type cd ~/bearclaw/contrib/astro. This takes you to the directory where the AstroBEAR executable will be compiled. To compile, simply type make xbear or make mpibear, depending on whether you want a single-processor or a multi-processor executable.

cd ~/bearclaw/contrib/astro
make mpibear

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

  • make clean: Wipes out all compiled modules, executables, data files and objects so that the user can start from scratch.
  • 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 BEARCLAW_DIR/lib will remain untouched.
  • make astrodistclean: This command wipes out problem modules specific to the Computational Astrophysics (contrib/astro) directory. At the moment, this is functionally very similar to make distclean, since contrib/astro is the only working directory we have.

Note that you can supply the make command with more than one argument, e.g. make clean distclean astrodistclean will completely clean out the entire compiled code in order to start from scratch.

If there are still problems, then there may be an error with the optimization flags, or even the code itself. Be sure to visit the Troubleshooting Page and the Developer Logs to see if your problem has been encountered before— reinventing the wheel for compiler problems is (usually) not fun.

Note: See TracWiki for help on using the wiki.