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.
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 RHDEXEPATHThis script can be executed with
. $HOME/bin/setarcdeppaths.shThis 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 FORTRANDISKthe master directory is specified. With
UIOMAC=uio_mac_sun_module; export UIOMAC RHDMAC=rhd_mac_sun_module; export RHDMACyou specify some machine dependent modules. The
sun
modules
work for most machines (e.g. for Linux PCs).
With
MAC=linuxyou 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.