forked from toastpp/toastpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0833f21
Showing
3,190 changed files
with
2,073,032 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
TOAST compilation and installation from source tree. 25.1.08 | ||
==================================================== | ||
|
||
Contents | ||
-------- | ||
|
||
1. Obtaining the toast sources | ||
1.1 Toast sources from CVS | ||
1.2 Toast sources from a tarball | ||
|
||
2. Compiling the sources | ||
2.1 Linux | ||
2.2 Windows | ||
|
||
|
||
1. Obtaining the toast sources | ||
------------------------------ | ||
|
||
1.1 Toast sources from CVS | ||
-------------------------- | ||
|
||
You can only check out the toast sources from CVS, if | ||
|
||
- you have an account at cs.ucl.ac.uk | ||
- you are a member of the 'medim' group (type 'groups' at the shell | ||
prompt to find out). | ||
|
||
If you don't have access to CVS, you need to get the sources in a | ||
tar-ball from the authors (see Sec. 1.2). | ||
|
||
Define the following environment variables: | ||
|
||
setenv CVSROOT :ext:<username>@sonic.cs.ucl.ac.uk:/cs/research/medim/projects0/green/projects/cvsroot | ||
setenv CVS_RSH ssh | ||
|
||
(Replace <username> with your CS login name.) | ||
|
||
If you are using bash instead of csh, the environment variables are set up as follows: | ||
|
||
export CVSROOT=:ext:<username>@sonic.cs.ucl.ac.uk:/cs/research/medim/projects0/green/projects/cvsroot | ||
export CVS_RSH=ssh | ||
|
||
Go into the directory where you want to install the toast sources, e.g.: | ||
|
||
cd $HOME | ||
|
||
Check out the toast sources: | ||
|
||
cvs checkout toast | ||
|
||
This will create the 'toast' directory containing the toast source tree. | ||
|
||
You also need the sources for the external numerics libraries which are not part of the | ||
toast cvs repository: | ||
|
||
cd toast | ||
sftp sonic.cs.ucl.ac.uk | ||
cd /cs/research/medim/projects0/green/projects/common/toast/toastlib | ||
get numerics.tar.gz | ||
quit | ||
tar xzvf numerics.tar.gz | ||
|
||
|
||
1.2 Toast sources from a tarball | ||
-------------------------------- | ||
|
||
If you have obtained a tarball containing the toast sources (e.g. toast-src.tar.gz), | ||
go to the directory where you want to install the toast source tree and unpack the | ||
tarball: | ||
|
||
cd $HOME | ||
tar xzvf toast-src.tar.gz | ||
|
||
This will create the 'toast' directory containing the toast source tree. | ||
|
||
You then have to unpack the numerics libraries: | ||
|
||
cd toast | ||
tar xzvf numerics.tar.gz | ||
|
||
|
||
|
||
2. Compiling the sources | ||
------------------------ | ||
|
||
2.1 Linux | ||
--------- | ||
|
||
2.1.1 Preliminaries: | ||
-------------------- | ||
|
||
You need the GNU g++ and g77 compilers (version 3.2 or later). | ||
|
||
Make sure that you have the following packages installed in your Linux | ||
distribution and that the corresponding libraries and header files are in | ||
common locations, where they can be found by the compiler: | ||
|
||
Tcl | ||
Tcl-devel | ||
Tk | ||
Tk-devel | ||
Tix | ||
Tix-devel | ||
BLT | ||
BLT-devel | ||
|
||
These libraries are required for compiling the toast GUI applications. If | ||
necessary, you may have to create symbolic links for the libraries and headers, | ||
or copy them into the toast directories (toast/include and toast/lib). | ||
|
||
As a last resort, the toast source tarball contains the source distributions | ||
for these libraries (toast-gui.tar.gz) which you can unpack and compile if | ||
your system does not have the required packages. These sources are however | ||
not up to date and may not compile or run on newer Linuxes. | ||
|
||
|
||
2.1.2 Configuration and compilation: | ||
------------------------------------ | ||
|
||
Configure the makefiles: | ||
|
||
./configure | ||
|
||
(for additional configuration options, type: ./configure --help) | ||
|
||
Set the toast environment: | ||
|
||
source toast.env | ||
|
||
(note that toast.env is set up for csh. You may have to edit the script to | ||
run in other shells). | ||
|
||
Make the numerics libraries: | ||
|
||
make numerics | ||
|
||
Make the toast libararies and applications: | ||
|
||
make | ||
|
||
The run-time libraries are installed in $TOASTDIR/lib. Make sure that your | ||
LD_LIBRARY_PATH variable points to this directory (this is done automatically | ||
by the toast.env script). | ||
The toast applications are installed in $TOASTDIR/bin. You may want to set | ||
your path variable to include that directory. | ||
|
||
|
||
|
||
Troubleshooting FAQ | ||
------------------- | ||
|
||
1. BLT libraries not found | ||
|
||
The BLT package (Tcl/Tk addon) is used for drawing 2D graphs in Tk windows. | ||
Unfortunately the BLT package appears to install itself in nonstandard | ||
locations, such as /usr/lib/blt2.4, which is not searched by the compiler | ||
by default. | ||
|
||
To fix missing BLT library errors, add symbolic links to the libraries | ||
from the toast lib directory: | ||
|
||
cd $TOASTDIR/lib | ||
ln -s /usr/lib/blt2.4/libBLT24.so libBLT24.so | ||
ln -s libBLT24.so libBLT.so | ||
|
||
(for missing BLT header files, see next question) | ||
|
||
|
||
2. BLT-devel package doesn't exist, or 'blt.h not found' compiler errors | ||
|
||
The BLT-devel package (containing the BLT header files) appears not to be | ||
widely available. If you can't locate it for your system, you may have to | ||
download the BLT source package to obtain the header files from there. | ||
Alternatively, toast comes with an older BLT package (2.4u) in the | ||
toast-gui.tar.gz archive, and the header files in there still seem to | ||
work. Either way, copy the header files (blt*.h) from the BLT src | ||
directory into your $TOASTDIR/include directory. | ||
|
||
|
||
3. FORTRAN compiler problems | ||
|
||
Where available, use gfortran instead of g77 to compile the Fortran | ||
libraries (BLAS, LaPACK, etc.). If configure insists on g77, you can | ||
change the preferences by setting environment variable F77 to gfortran. | ||
g77 appears to cause problems on 64-bit architectures. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
SHELL = /bin/sh | ||
|
||
# ======================================================================= | ||
# TOAST directory Tree | ||
|
||
ifndef TOASTDIR | ||
TOASTDIR = $(PWD) | ||
endif | ||
TOASTVER = $(TOASTDIR)/gcc4.1.1_shared | ||
ARCHDIR = linux32 | ||
|
||
TSRC = $(TOASTDIR)/src | ||
TINC = $(TOASTDIR)/include | ||
TDOC = $(TOASTDIR)/doc | ||
|
||
TOASTOBJ = $(TOASTVER)/obj | ||
TBIN = $(TOASTVER)/bin | ||
TLIB = $(TOASTVER)/lib | ||
|
||
# ======================================================================= | ||
# Compilers and binutils | ||
|
||
CC = gcc | ||
CXX = g++ | ||
CCFLAGS = -g -O2 -DNEED_EXPLICIT_INSTANTIATION -fno-implicit-templates -Wno-deprecated | ||
CCLIBS = -L/usr/X11R6/lib -lm | ||
SHLIB_CFLAGS = -fPIC | ||
|
||
F77 = gfortran | ||
FFLAGS = -g -O2 | ||
FLIBS = -L/usr/lib/gcc/i386-redhat-linux/4.1.1 -L/usr/lib/gcc/i386-redhat-linux/4.1.1/../../.. -lgfortranbegin -lgfortran -lm -lgcc_s | ||
|
||
LD = $(CXX) # may need to be queried from configure | ||
LDFLAGS = -L/home/ucacmas/toast2/lib -s | ||
|
||
MAKE = make | ||
RM = rm -f | ||
RANLIB = : | ||
|
||
LIB_SUFFIX = .so | ||
MAKE_LIB = g++ -shared -o ${LIB} ${OBJS} ${LIBS} | ||
|
||
MEX = mex -v | ||
|
||
# ======================================================================= | ||
# BLAS and LAPACK libraries (determined by configure) | ||
|
||
BLASLIB = -lblas | ||
SPBLASLIB = -lfsbtk | ||
LAPACKLIB = -llapack | ||
ILUPACKDIR = | ||
ifdef ILUPACKDIR | ||
ILUPACKINC = -I$(ILUPACKDIR)/include | ||
ILUPACKLIBDIR = $(ILUPACKDIR)/lib/linux | ||
ILUPACKLIB = -L$(ILUPACKLIBDIR) -lpardiso_GNU_IA32 | ||
ILUFLAGS = -DHAVE_ILU | ||
endif | ||
|
||
# ======================================================================= | ||
# Libraries | ||
|
||
#LIBS = -ldl -lieee | ||
LIBS = -ldl -lm | ||
TLIBS = -lfe -lmath $(ILUPACKLIB) -lsuperlu -lblzpack \ | ||
-larpack $(LAPACKLIB) $(BLASLIB) $(SPBLASLIB) $(FLIBS) | ||
FELIB = -L$(TLIB) $(TLIBS) | ||
TOASTLIB = -L$(TLIB) -ltoast $(TLIBS) | ||
TOASTCLIB = -L$(TLIB) -lctoast -ltoast $(TLIBS) | ||
STOASTLIB = -L$(TLIB) -lstoast $(TLIBS) | ||
|
||
#XINC = | ||
#XLIB = -lX11 -lnsl -ldl | ||
#XVIEWINC = $(XINC) -I/usr/openwin/include | ||
#XVIEWLIB = $(XLIB) -L/usr/openwin/lib -lxview -lolgx | ||
|
||
GUIFLAGS = -I$(TSRC)/libtcl | ||
GUILIBS = -ltoasttcl -lBLT -ltix -ltk -ltcl -lX11 -lSM -lICE | ||
|
||
GLLIB = -L/usr/lib -L/usr/X11R6/lib -lglut -lGLU -lGL -lXmu -lXext -lX11 \ | ||
-lXi -ltogl | ||
|
||
# ======================================================================= | ||
FEINC = -I$(TOASTDIR) -I$(TINC) -I$(TSRC)/libtask -I$(TSRC)/libmath \ | ||
-I$(TSRC)/libfe -I$(TSRC)/libdiffreg $(ILUPACKINC) | ||
TOASTINC = $(FEINC) -I$(TSRC)/libtoast | ||
TOASTCINC = $(TOASTINC) -I$(TSRC)/libctoast | ||
STOASTINC = $(FEINC) -I$(TSRC)/libstoast | ||
INCLUDE = $(TOASTCINC) | ||
# ======================================================================= | ||
|
||
# ======================================================================= | ||
FEFLAGS = $(CCFLAGS) $(ILUFLAGS) $(FEINC) | ||
STOASTFLAGS = $(CCFLAGS) $(ILUFLAGS) $(STOASTINC) | ||
FLAGS = $(CCFLAGS) $(ILUFLAGS) $(INCLUDE) | ||
# ======================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
SHELL = /bin/sh | ||
|
||
# ======================================================================= | ||
# TOAST directory Tree | ||
|
||
ifndef TOASTDIR | ||
TOASTDIR = $(PWD) | ||
endif | ||
TOASTVER = $(TOASTDIR)/@OBJDIR@ | ||
ARCHDIR = @ARCHDIR@ | ||
|
||
TSRC = $(TOASTDIR)/src | ||
TINC = $(TOASTDIR)/include | ||
TDOC = $(TOASTDIR)/doc | ||
|
||
TOASTOBJ = $(TOASTVER)/obj | ||
TBIN = $(TOASTVER)/bin | ||
TLIB = $(TOASTVER)/lib | ||
|
||
# ======================================================================= | ||
# Compilers and binutils | ||
|
||
CC = @CC@ | ||
CFLAGS = @CFLAGS@ | ||
CXX = @CXX@ | ||
CCFLAGS = @CXXFLAGS@ | ||
CCLIBS = -L/usr/X11R6/lib -lm | ||
SHLIB_CFLAGS = @SHLIB_CFLAGS@ | ||
|
||
F77 = @F77@ | ||
FFLAGS = @FFLAGS@ | ||
FLIBS = @FLIBS@ | ||
|
||
LD = $(CXX) # may need to be queried from configure | ||
LDFLAGS = @LDFLAGS@ | ||
|
||
MAKE = make | ||
RM = rm -f | ||
RANLIB = @RANLIB@ | ||
|
||
LIB_SUFFIX = @LIB_SUFFIX@ | ||
MAKE_LIB = @MAKE_LIB@ | ||
|
||
MEX = mex @MEXFLAGS@ | ||
MEXEXT = @MEXEXT@ | ||
|
||
# ======================================================================= | ||
# BLAS and LAPACK libraries (determined by configure) | ||
|
||
BLASLIB = @BLASLIB@ | ||
SPBLASLIB = -lfsbtk | ||
LAPACKLIB = @LAPACKLIB@ | ||
ILUPACKDIR = @ILUPACKDIR@ | ||
ifdef ILUPACKDIR | ||
ILUPACKINC = -I$(ILUPACKDIR)/include | ||
ILUPACKLIBDIR = $(ILUPACKDIR)/lib/linux | ||
ILUPACKLIB = -L$(ILUPACKLIBDIR) -lpardiso_GNU_IA32 | ||
ILUFLAGS = -DHAVE_ILU | ||
endif | ||
|
||
# ======================================================================= | ||
# MPI flags | ||
|
||
MAKE_MPI = @MAKE_MPI@ | ||
|
||
# ======================================================================= | ||
# Libraries | ||
|
||
#LIBS = @DL_LIBS@ @LIBS@ @MATH_LIBS@ | ||
LIBS = @DL_LIBS@ @LIBS@ -lm | ||
TLIBS = -lfe -lmath $(ILUPACKLIB) @SUPERLULIB@ -lblzpack \ | ||
-larpack $(LAPACKLIB) $(BLASLIB) $(SPBLASLIB) @TASKLIB@ $(FLIBS) | ||
FELIB = -L$(TLIB) $(TLIBS) | ||
TOASTLIB = -L$(TLIB) -ltoast $(TLIBS) | ||
TOASTCLIB = -L$(TLIB) -lctoast -ltoast $(TLIBS) | ||
STOASTLIB = -L$(TLIB) -lstoast $(TLIBS) | ||
|
||
#XINC = @X_CFLAGS@ | ||
#XLIB = @X_LIBS@ -lX11 -lnsl -ldl | ||
#XVIEWINC = $(XINC) @XVIEWINC@ | ||
#XVIEWLIB = $(XLIB) -L/usr/openwin/lib -lxview -lolgx | ||
|
||
GUIFLAGS = -I$(TSRC)/libtcl @GUIFLAGS@ | ||
GUILIBS = -ltoasttcl @GUILIBS@ | ||
|
||
GLLIB = -L/usr/lib -L/usr/X11R6/lib -lglut -lGLU -lGL -lXmu -lXext -lX11 \ | ||
-lXi -ltogl | ||
|
||
# ======================================================================= | ||
FEINC = -I$(TOASTDIR) -I$(TINC) -I$(TSRC)/libtask -I$(TSRC)/libmath \ | ||
-I$(TSRC)/libfe -I$(TSRC)/libdiffreg $(ILUPACKINC) | ||
TOASTINC = $(FEINC) -I$(TSRC)/libtoast | ||
TOASTCINC = $(TOASTINC) -I$(TSRC)/libctoast | ||
STOASTINC = $(FEINC) -I$(TSRC)/libstoast | ||
INCLUDE = $(TOASTCINC) | ||
# ======================================================================= | ||
|
||
# ======================================================================= | ||
FEFLAGS = $(CCFLAGS) $(ILUFLAGS) $(FEINC) | ||
STOASTFLAGS = $(CCFLAGS) $(ILUFLAGS) $(STOASTINC) | ||
FLAGS = $(CCFLAGS) $(ILUFLAGS) $(INCLUDE) | ||
# ======================================================================= |
Oops, something went wrong.