Compiling visit

From VisItusers.org

Jump to: navigation, search

This page details how to compile VisIt on Unix/Mac. A separate page exists for compiling on Windows . For a broader perspective, see How VisIt's compilation system works.

Contents

[edit] Before you start

[edit] Use the binaries!

Building VisIt is a long process, especially because it depends on so many third party libraries. If possible, we highly recommend you use the pre-built binaries.

[edit] Motivations for building VisIt

There are three typical reasons to build VisIt from scratch:

  1. None of the pre-built binaries work on your platform.
  2. You want to run in parallel.
    • (Pre-built binaries will almost certainly not run in parallel on any machine except for the one it was originally compiled on, because of differences in MPI version, networking, etc.)
  3. You want to do VisIt development.

[edit] Building the third party libraries

We provide a script to build the third party libraries, build_visit, which is documented here.


[edit] Saving your work

  • Q: I anticipate building VisIt many times. Do I really need to build the third party libraries repeatedly?
  • A: No, you do not need to build the third party libraries repeatedly. build_visit will produce a file name "$(hostname).conf", where $(hostname) is the name of your computer. The compilation of VisIt itself uses this ".conf" file to locate the third party libraries. You can re-use your third-party library builds by simply re-using the .conf file.

[edit] Using unsupported versions of third party libraries

  • Q: Many operating systems come with versions of Qt, Python, etc. Can I use those versions instead of building them?
  • A: VisIt developers prefer that you use known versions of third party libraries. This is primarily because if you use an unsupported version, and if VisIt crashes, then it is unclear where the blame lies (in the unsupported version versus in VisIt). By using only supported versions of third party libraries, we can avoid this problem.
    • You are probably OK using existing versions of Qt, Python, and HDF5. That said, we have made changes to VTK and it is important that you only use the version we support.

[edit] How to tell build_visit to not build Qt/HDF5/Python

  build_visit --no-thirdparty

This option will disable the download and the building of the required 3rd party libraries.

 build_visit --no-thirdparty --mesa --vtk --qt

This would build Mesa, VTK, & Qt, but would not build Python.

[edit] How to tell the build of VisIt itself which third party library to use

As previously mentioned, build_visit generates a ".cmake" config-site file. That file sets up environment variables that VisIt's CMake build system uses. You can direct VisIt's build system to use your version of the third party library by editing the .cmake file to have its environment variables point at your install locations. For more information about VisIt's CMake build system, see VisIt CMake Build System.

[edit] Building VisIt itself

build_visit will attempt to compile the main VisIt program as well. (Unless you specified "build_visit --no-visit".) So this section is for compiling VisIt outside the build_visit script.

[edit] Setting up the .conf file

build_visit generated a <Computer Name>.conf file. That file should be placed in the /src/config-site directory.

[edit] Running cmake

VisIt uses cmake to generate a build system. For more information, see VisIt CMake Build System. A typical cmake command line line is:

cmake -DCMAKE_BUILD_TYPE:STRING=Debug .

or

cmake -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_PARALLEL:BOOL=ON .

Parallel builds are not done by default unless you passed --parallel to build_visit. For more information about building Parallel click here

[edit] Parallel builds

A wiki page for porting in parallel is here .

[edit] Building VisIt

  make -j 4

After you have run configure now you run make to build VisIt and it's libraries using 4 g++ tasks.

Personal tools