next up previous contents index
Next: 3.3 Fortran Files Up: 3 Program Files, Installation, Previous: 3.1 Quickstart: How to   Contents   Index


3.2 Directory Structure

The files necessary to compile COBOLD are distributed over a few directories. The paths are stored in environment variables and can be set with the scripts setarcdeppaths.csh or setarcdeppaths.ksh. A typical setup would be to put everything into the main directory for. Then the source files would be located as in table 1.


Table 1: List of source directories with path and file name, abbreviation, and a short description.
Paths Abb. Description
${HOME}/for/mat/str/ STR string handling
${HOME}/for/uio/f90/ UIO I/O routines
${HOME}/for/eos/f90/ EOS equation of state
${HOME}/for/rad/hdrad/ RAD opacities, Matthias' radiation transport
${HOME}/for/hd/rhd/ RHD main rhd routines


The executables (and makefiles, object files, module information files) are typically located in subdirectories of the source code directories. These subdirectories should have the name of the machine, architecture, or operating system the executable is compiled for. The environment variables for the UIO routines can be e.g.

UIOSRCPATH=/home/user/for/uio/f90
UIOEXEPATH=/home/user/for/uio/f90/sun .
A script to set all necessary variables and paths can be (here for the bash shell for Linux)
#!/bin/bash
#
# --- Disk where all Fortran programs are located ---
FORTRANDISK=${HOME}/for ; export FORTRANDISK
#
# --- Machine dependent modules ---
UIOMAC=uio_mac_sun_module; export UIOMAC
RHDMAC=rhd_mac_sun_module; export RHDMAC
#
# --- Architecture dependent sub directory names ---
# --- for object file and executables            ---
MAC=linux
#
# --- Individual libraries ---
# --- uio ---
UIOPATH=${FORTRANDISK}/uio ; export UIOPATH
UIOSRCPATH=${UIOPATH}/f90 ; export UIOSRCPATH
#
# --- String handling ---
STRPATH=${FORTRANDISK}/mat/str ; export STRPATH
STRSRCPATH=${STRPATH} ; export STRSRCPATH
#
# --- Mathe ---
MATPATH=${FORTRANDISK}/mat ; export MATPATH
MATSRCPATH=${MATPATH}/f90 ; export MATSRCPATH
#
# --- gas ---
GASPATH=${FORTRANDISK}/eos/gas ; export GASPATH
GASSRCPATH=${GASPATH} ; export GASSRCPATH
#
# --- EOS ---
EOSPATH=${FORTRANDISK}/eos ; export EOSPATH
EOSSRCPATH=${EOSPATH}/f90 ; export EOSSRCPATH
#
# --- rad ---
RADPATH=${FORTRANDISK}/rad/hdrad ; export RADPATH
RADSRCPATH=${RADPATH} ; export RADSRCPATH
#
# --- RHD ---
RHDPATH=${FORTRANDISK}/hd/rhd ; export RHDPATH
RHDSRCPATH=${RHDPATH} ; export RHDSRCPATH
#
# --- Architecture dependent directories for object file and executables ---
UIOEXEPATH=${UIOSRCPATH}/${MAC}  ; export UIOEXEPATH
STREXEPATH=${STRPATH}/${MAC}     ; export STREXEPATH
MATEXEPATH=${MATSRCPATH}/${MAC}  ; export MATEXEPATH
GASEXEPATH=${GASPATH}/${MAC}     ; export GASEXEPATH
EOSEXEPATH=${EOSSRCPATH}/${MAC}  ; export EOSEXEPATH
RADEXEPATH=${RADPATH}/${MAC}     ; export RADEXEPATH
RHDEXEPATH=${RHDPATH}/${MAC}     ; export RHDEXEPATH
This script can be executed with
. $HOME/bin/setarcdeppaths.sh
This line can be put e.g. into the .bashrc file.

Some lines can be edited to account for individual choices and the target machine. With

FORTRANDISK=$HOME/for ; export FORTRANDISK
the master directory is specified. With
UIOMAC=uio_mac_sun_module; export UIOMAC
RHDMAC=rhd_mac_sun_module; export RHDMAC
you specify some machine dependent modules. The sun modules work for most machines (e.g. for Linux PCs). With
MAC=linux
you specify the name of the subdirectories with the makefiles. The other lines only have to be edited if you want to organize the directories in a completely different way.


next up previous contents index
Next: 3.3 Fortran Files Up: 3 Program Files, Installation, Previous: 3.1 Quickstart: How to   Contents   Index
Bernd Freytag 2002-02-16