banner about
For our more advanced users, we have provided information on how to develop your own modules and access more detailed information on current modules.

 SCIRun Developer Guidepdf button

Linear Algebra in SCIRun
General Build Information
Build on Windows
Build on Mac OS X
Build on Linux




Linear Algebra in SCIRun

Solvers

Parallelized Algorithms


Declared in SCIRun/src/Core/Algorithms/Math/ParallelAlgebra/ParallelLinearAlgebra.h. Implemented in SCIRun/src/Core/Algorithms/Math/LinearSystem/SolveLinearSystem.cc.

Iterative Solvers

  • CG
  • BICG
  • MINRES
  • Jacobi

Preconditioners

  • Jacobi (currently the only option available)

Regularization


Implemented in SCIRun/src/Packages/BioPSE/Dataflow/Modules/Inverse modules.

Lapack Wrappers


DenseMatrix member functions


Declared in SCIRun/src/Core/Datatypes/DenseMatrix.h. Implemented in SCIRun/src/Core/Datatypes/DenseMatrix.cc.

  • DenseMatrix::svd
    • calls SCIRun::lapacksvd
  • DenseMatrix::eigenvalues, eigenvectors
    • calls SCIRun::lapackeigen
  • DenseMatrix::invert
    • calls SCIRun::lapackinvert

Lapack wrapper functions

Other


CBLAS calls


  • 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 From Source


SCIRun 4 sources can be be obtained from the dowload link or from the Subversion repository.

Patches


GCC 3.x

SCIRun 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 

Subversion Sources


SCIRun is hosted on the SCI GForge portal.

The SCIRun Subversion repository can be found on the GForge project site (the repository can be browsed from the project site).


CMake


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)


build.sh command line script is supplied with SCIRun sources to simplify the SCIRun build process, and is recommended for users who do not need to use CMake to customize their SCIRun 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
./build.sh --release
cd bin
./scirun


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.






Windows



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 from Subversion, install a Windows Subversion client, for example TortoiseSVN.

Visual Studio 9 2008

We 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 2010

SCIRun 4 does not build with Visual Studio 2010.


LaTeX Documentation

Requires MiKTeX for building PDF documents from LaTeX sources.

LAPACK

To 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 Projects

CMake 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

Xcode 4.x

Xcode 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.x

If 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:

export CC=/usr/bin/gcc

LaTeX Documentation

Requires a LaTeX to PDF compiler for building PDF documents from LaTeX sources; we recommend MacTex.

LAPACK

LAPACK 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


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.

LaTeX Documentation

Requires a LaTeX to PDF compiler pdflatex for building PDF documents from LaTeX sources.

LAPACK

To 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.