2. Installation

Compatibility

MCARaTS v0.9.5 works in UNIX or Linux-like environment. Tested sets are as follows:

  • Gfortran, Mac OS X with Intel Core 2 Duo

  • G95 (Fortran compiler), Cygwin, Windows

  • Intel Fortran Compiler version 9 , Redhat Linux WS3 with Intel Xeon

  • Intel Fortran compiler version 9.1 or higher, SuSE Linux, SGI Altix4700

Older versions also worked under the following conditions, but not tested for MCARaTS v0.9.5:

  • GCC (GNU Compiler Collection) version 2.95 or higher

  • Fujitsu Fortran compiler version 3.0

  • UNIX on the HP (Compaq) AlphaServerSC with HP (Compaq) Fortran compiler

  • Mac OS X on an Apple PPC Macintosh with GCC version 3.2 or higher

  • SUN Solaris on a UltraSPARC workstation with SUN Fortran 77 version 4.2.1.

  • UNIX on SGI Origin2000 with SGI Fortran compiler.

Your reports about porting to the other type of computer system are welcome. Reports of computational speed are also welcome.

Unpacking

The softwares are archived to a tar-gzipped file. To unpack it,

% gunzip mcarats-*.tar.gz

% tar xf mcarats-*.tar

then you will find a directory, mcarats-*, that includes the source codes and sample files as follows:

ReadMe : Read this first

src/ : Source codes

examples/ : Example I/O files

shl/ : Shell scripts.

Configuration

In some cases, a few system-dependent configurations must be done before installation.

If the Fortran compiler command is not "f77" and/or you would like to use compiler-specific options, then you have to edit the file:

./src/Makefile

./src/*/Makefile

If you are building MPI-parallelized codes, you might need to edit a file, ./src/mcarats/Makefile, for system-specific configuration of MPI libraries.

How to install

To build the executable files, execute the following commands:

% cd src

% make install

% cd ..

After installation you will find executable files in ./bin directory. If you have some problem, see the next section.

To build the parallelization codes, for example,

% cd src

% make clean install USE_MPI=1 BINDIR=../bin-mpi

% cd ..

Radiative transfer codes are parallelized with MPI, but other codes are not. See corresponding Makefile, src/mcarats/Makefile, for details.

Possible problems

Possible problems in the installation and resolutions are as follows:

1. Non-standard manners for Fortran77

The codes in the package use some extensions of Fortran 77, but they are common, and some of them are compatible with Fortran90.

  • Namelist input

  • "do/end do" loop,

  • "getarg()" to get arguments,

  • "itime()" to get the time. It is used to initialize random number,

  • Long variable name.

If you had some problems, a possible reason is the compatibility related to the above non-standard functions. Some compilers may require specific options to make the above extensions to work. For example, Intel Fortran compiler v7 requires "-Vaxlib" option to compile "getarg" and "itime" extensions (higher versions of Intel compiler does not require such a special option).

2. Bug?

Any bug report will be appreciated.

Tests

It is highly recommended for users to test the codes for the sample cases. For that purpose, a shell script is provided.

% ./examples/Job.csh

The results will be found in ./case[1-3] directories. They can be compared with sample files in ./samples/case[1-3]. Using larger number of photons for simulation, you may get more accurate result that might be closer to the sample files. The number of photons are defined in the shell script. Note that the result will differ second by second, because the random number for Monte Carlo simulation is initialized with a time the user starts the simulation. Usages and functions of the codes are easily learned from the tests.

Memory tuning

The memory size used for the executables can be tuned in the followings, before the installation:

./src/mcarats/mcarats1d.inc

./src/mcarats/mcarats2d.inc

./src/mcarats/mcarats3d.inc

./src/process/process.inc

By default, the codes require about 350 MB at maximum for memory.

Porting to Mac

Mac OS X provides a good platform for numerical computing with gcc and some "Xcode" tools (make and ar etc.) that are included in "Developer tools". But any Fortran compiler is not included by default. To compile Fortran source code, there is a good guide webpageproviding binary packages of Fortran compilers (g77) for Mac OS X. One should follow instructions written in the above webpage (installation of Developer tools and the g77 package, operating ranlib command). Using them, one of the authors tried the computation on Mac OS X 10.2 and 10.3. The gcc (g77) versions 3.3 and 3.4 were usable. Recommended compile options are "-O -ffast-math -I.". GCC g77 binaries are also available from Fink.

Next