SCIRun Developer Guide
Linear Algebra in SCIRun 4
General Build Information
Build on Windows
Build on Mac OS X
Build on Linux
Linear Algebra in SCIRun 4
Declared in SCIRun/src/Core/Algorithms/Math/ParallelAlgebra/ParallelLinearAlgebra.h. Implemented in SCIRun/src/Core/Algorithms/Math/LinearSystem/SolveLinearSystem.cc.
- Jacobi (currently the only option available)
Implemented in SCIRun/src/Packages/BioPSE/Dataflow/Modules/Inverse modules.
DenseMatrix member functions
Declared in SCIRun/src/Core/Datatypes/DenseMatrix.h. Implemented in SCIRun/src/Core/Datatypes/DenseMatrix.cc.
- calls SCIRun::lapacksvd
- DenseMatrix::eigenvalues, eigenvectors
- calls SCIRun::lapackeigen
- calls SCIRun::lapackinvert
Lapack wrapper functions
- calls dgesvd_
- calls dgeev_
- SolveMinNormLeastSqSystem module
- DenseMatrix::solve is our own implementation of Gauss-Jordan elimination.
- DenseMatrix::mult will call cblas_dgemm if CBLAS is available and built with WITH_CBLAS, otherwise will use our own implementation.
How To Build SCIRun 4 From Source
SCIRun 4 sources can be be obtained from the dowload link or from the Subversion repository.
SCIRun 5 sources can be downloaded from the GitHub repository. The build process for SCIRun 5 is different for SCIRun 4. Documentation is available on the GitHub site.
GCC 3.xSCIRun 4.2 and later will not compile with GCC 3.x compilers.
Download this SCIRun 4.3 source archive or apply this patch to build from source with a GCC 3.x compiler. Please note that we are no longer testing with GCC 3.x compilers, so we cannot guarantee backward compatibility in future releases.
If working from Subversion, change to SCIRun directory, and apply the patch.
patch -p 0 -i SCIRun_4.x_gcc3.x-patch-20100303.patch
SCIRun 4 is hosted on the SCI GForge portal.
The SCIRun 4 Subversion repository can be found on the GForge project site (the repository can be browsed from the project site).
Use CMake 2.8 or greater.
To build LaTeX documentation, turn on the CMake variable BUILD_DOCUMENTATION.
To build with Tetgen support enabled, turn on the CMake variable WITH_TETGEN (should be on by default in SCIRun 4.4 and greater).
To test with CTest, turn on the CMake variable BUILD_TESTING.
Build Script for *nix Platforms (includes Mac OS X)
A build.sh command line script is supplied with SCIRun sources to simplify the SCIRun 4 build process, and is recommended for users who do not need to use CMake to customize their SCIRun 4 installation beyond the options offered in the script.
Usage information is available using the --help flag.
The build.sh script will configure a GNU make build using CMake.
Typical build steps if, for example, building from a source download:
tar xzvf SCIRun_4.6_20120809_linux.tgz
Building from Subversion sources is similar. Go to the SCIRun directory in the Subversion local copy and run the build script as shown.
The following commands show how to checkout the SCIRun Subversion repository and build using the build script:
svn checkout --username anonymous https://gforge.sci.utah.edu/svn/cibc/cibc/trunk SCIRun_trunk
Developers with SCI or SCI collaborator accounts should use their SCI login names instead of anonymous if commit permissions are needed.
CMake can be used to further customize the build if needed.
SCIRun 4 is built using Microsoft Visual Studio project files generated by CMake. We recommend using the CMake GUI; the configuration variables listed under the General Build Information tab and others can be changed through the GUI interface. See the SCIRun Developer Guide for more detailed instructions.
To build SCIRun 4 from Subversion, install a Windows Subversion client, for example TortoiseSVN.
Visual Studio 9 2008We are currently building 32 bit and 64 bit versions of SCIRun for Windows using Visual Studio 2008. We recommend installing Visual Studio Professional Edition or better for 64 bit builds. Visual Studio 2008 Express works fine for 32 bit builds.
For building SCIRun 32-bit and 64-bit Releases, use the CMake GUI to configure separate Visual Studio projects: a 32-bit project using the Visual Studio 2008 generator and a 64-bit project using the Visual Studio 2008 Win64 generator.
Visual Studio 2010SCIRun 4 does not build with Visual Studio 2010.
LaTeX DocumentationRequires MiKTeX for building PDF documents from LaTeX sources.
LAPACKTo build with LAPACK support enabled if a compatible LAPACK library is not already installed, turn on the CMake variable BUILD_NETLIB (should be on by default in SCIRun 4.6 and greater), which will build the default Netlib LAPACK library shipped with SCIRun.
Mac OS X
CMake ProjectsCMake Xcode projects are not supported by the SCIRun 4 OS X build, due to issues with the Tcl/Tk libraries.
Use the build.sh script is recommended, or configure a GNU make project using CMake.
Xcode 4.xXcode installers from 4.3 onward do not install command line tools by default, but they can be installed after the main Xcode package has been installed. See New Features in Xcode 4.3 for more details and instructions.
Possible CMake Issues on OS X 10.7 (Lion)The following warning may be seen while trying to configure a CMake project on OS X Lion:
xcode-select: Error: No Xcode folder is set. Run xcode-select -switch to set the path to the Xcode folder.
To fix the error, the following should work:
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/
Xcode 4.5.xIf running into build problems with C code with recent versions of XCode (4.5.x), use gcc as the C compiler instead of cc (clang C compiler) by setting the CC environment variable, for example in bash:
LaTeX DocumentationRequires a LaTeX to PDF compiler for building PDF documents from LaTeX sources; we recommend MacTex.
LAPACKLAPACK support is enabled by default and the build is configured to use the libraries supplied by Apple.
To customize the build, use ccmake or the CMake GUI to configure the build in the SCIRun/bin directory and change CMake variables as needed.
Linux software prerequisites can be found under the Specifications tab, organized by distribution.
Using the build.sh command line script supplied with SCIRun sources is recommended, or configure a GNU make project using CMake.