Installation instructions for Arroyo


(WARNING - the build will fail if you have not installed the required third party libraries.)

Downloading an Arroyo Release

1) Get a fresh copy of the software
Direct your browser to this link. Download the latest distribution.
2) Unpack the software
Run 'gunzip' to uncompress the file:
gunzip arroyo-0.5.2.tar.gz

Unpack the tar file:
tar xvf arroyo-0.5.tar.gz


Downloading the Development Version from the CVS Repository

The development release is where I add experimental functionality to the library and fix bugs. I believe that the development release API is backwards compatible with the stable release, but naturally contains a fairly large number of extensions. In time, the development release will become version 0.6 of the Arroyo library, which will be publically distributed as a tar file. If you would like to use the development release, you are welcome to do so. You can check the code out from CVS by following the instructions below. As always, I'm interested in receiving comments, bug reports, and feature requests. However, I cannot guarantee that I will respond to these in a timely fashion.
1) Get a fresh copy of the software
setenv CVS_RSH ssh
setenv CVSROOT :pserver:anonymous@eraserhead.caltech.edu:/scr3/mbritton/cvsroot
cvs checkout -r Devel_0-6_branch arroyo
NOTE: The -r flag in cvs checkout appears to have been redefined some time between cvs version 1.9 and version 1.11. Please make sure that your version of cvs supports checkout by revision. You can check this by typing

cvs checkout --help

and looking at the -r flag option.

2) Run the bootstrap.sh script
You will require automake, autoconf and libtool to perform the configuration. Click here for the required version numbers of these packages. Presumably later versions will also work.
cd arroyo
./bootstrap.sh


Making the Code

1) Set the LD_LIBRARY_PATH environment variable
You will need to ensure that your LD_LIBRARY_PATH environment variable is set correctly. This is usually set to something like /usr/local/lib. If you plan to install Arroyo in a different location, you will need to set this environment variable appropriately. For example, if you install Arroyo in /home/somebody/local, do the following:

For csh:
setenv LD_LIBRARY_PATH /home/somebody/local:/usr/local/lib 

For bash:
LD_LIBRARY_PATH=/home/somebody/local:/usr/local/lib; export LD_LIBRARY_PATH 

You can put these into your .cshrc or .bashrc file for convenience.

2) Make the code under GCC 3x or GCC 4x compilers
Change into the Arroyo source directory.

Configure the distribution. If you have not installed the third party libs in the usual locations, you will need to add include and lib paths to the configure line.

Here is also where you'll choose whether to use gcc3x or gcc4x compilers. In moving to version 4x of their compilers, gcc dropped support for Fortran 77 and went with Fortran 95. This change requires linking fortran code against the correct library: g2c or gfortran, respectively. This is accomplished in configure script by setting flags on the configure line: --with-g77 or --with-gfortran, respectively. You will also need to be linking against a version of LAPACK compiled with the corresponding version of the gnu fortran compiler: g77 or gfortran, respectively. I was able to make this change in the LAPACK package by switching the compiler in the make.inc file.

In the lines below, gcc-3 has been aliased to a gcc 3x version, with analogous notation for gcc-4.
gcc3x
./configure CXX=gcc-3 --with-g77 --prefix=/home/myusername/local CXXFLAGS='-I/home/myusername/local/local_include' LDFLAGS='-L/home/myusername/local/local_lib'
gcc4x
./configure CXX=gcc-4 --with-gfortran --prefix=/home/myusername/local CXXFLAGS='-I/home/myusername/local/local_include' LDFLAGS='-L/home/myusername/local/local_lib'
make 

make install 


You may also do this by using environment variables:
CXXFLAGS='-I/home/myusername/local/local_include' ; export CXXFLAGS 
LDFLAGS='-L/home/myusername/local/local_lib' ; export LDFLAGS 
./configure --prefix-/home/myusername/local 
make install 

Optionally you may choose to run
make check 
to run the regression testing. All tests should pass - if not please let me know. The tests generate a number of files that are placed in the tests subdirectories under arroyo/test/tests To get started using Arroyo, you may find it useful to look at the test programs and the files that they generate.

The 'make install' command places include files in subdirectories of the the directory that you specified with the '--prefix=' flag to configure. If no '--prefix=' flag was specified, the include files will be placed in /usr/local/include/arroyo, libraries in /usr/local/lib, executables in /usr/local/bin, and html documentation in /usr/local/share/arroyo. Documenation may be viewed by pointing your browser to the file /usr/local/share/arroyo/index.html.

All the customary GNU configuration options are available. These options may be viewed by running ./configure --help. In particular, the --prefix option will allow you to choose a location other than /usr/local to install bins, libs, include files, and documentation. If you choose to do this, you will need to prepend the lib directory path to your LD_LIBRARY_PATH environment variable, as mentioned above.



Platform specific notes

64-bit Opteron
If you have a 64-bit Opteron processor, you should use AMD's version of the lapack library, called 'acml'. Download this from here. (If you do not use this modified version of the library, some lapack calls will hang in an infinite loop.) Make sure that you have the variable '$MACHTYPE' set, and that it is of the form 'x86_64', e.g. 'x86_64-suse-linux'. If it is not, then set it yourself in your .login. This must be done before 'configure' so that the make files will use the acml library instead of lapack.

MAC OS10

(Courtesy of Marshall Perrin and Russ Makidon).
When running configure, force addition of the dynamic flag to allow use of shared object libraries. Also, use the MAC OS10 version of LAPACK.

./configure LDFLAGS=-dynamic LAPACK_LIBS="-framework vecLib"
Cygwin
By default, Arroyo builds only a static library on cygwin. In order to allow transparent extension of classes without modifying the core library, Arroyo uses the Alexandrescu 'Object Factory' pattern. A side effect of this pattern is that there are no unresolved references which cause the linker to link some of the .o files from a static library, and Arroyo won't be able to instantiate some classes. Jose Milovich at LLNL has managed to compile a shared object library in Arroyo through a method that involves modification of files like configure.ac and Makefile.am. Please contact Jose directly at milovich1@llnl.gov if you are interested in compiling Arroyo on Cygwin.