== How to build !VisIt with support for in-situ visualization [[PageOutline]] Building a parallel version of !VisIt on your system allows you to configure !VisIt that way, that it uses your MPI library and compiler to avoiding incompatibilities. If you do not need any special configuration use the prebuild packages provided here ([https://wci.llnl.gov/simulation/computer-codes/visit/executables link])! In the following we demonstrate how to build !VisIt on the example of !VisIt 2.9.2 (from 10/2015). \\ Please ensure you always use the latest version and replace "X.Y.Z" or "X_Y_Z" by the appropriate numbers. \\ \\ === QUICK HOWTO {{{ #!ShellExample wget http://portal.nersc.gov/svn/visit/trunk/releases/X.Y.Z/build_visitX_Y_Z chmod +x build_visitX_Y_Z }}} {{{ #!ShellExample ./build_visitX_Y_Z \ --console \ --build-mode Release --makeflags '-j 8' \ --parallel --fortran \ --cmake --mesa --python --vtk --qt --szip --zlib --boost \ --hdf5 --silo --netcdf --xdmf \ --prefix }}} {{{ #!ShellExample export PATH=/current/bin/:$PATH export LD_LIBRARY_PATH=/current/linux-x86_64/lib:$LD_LIBRARY_PATH }}} {{{ #!ShellExample visit }}} \\ \\ === DETAILED HOWTO Info: The following procedure is included in the script [raw-attachment:compile_visit.sh compile_visit.sh] attached to this site. If it suites your needs use it: ([attachment:compile_visit.sh view]) ==== 1) download !VisIt build script {{{ #!ShellExample wget http://portal.nersc.gov/svn/visit/trunk/releases/X.Y.Z/build_visitX_Y_Z chmod +x build_visitX_Y_Z }}} ==== 2) build 3rd party libraries We build the 3rd party libraries in a separate step first (with "--no-visit").\\ Check all possible options with "./build_visitX_Y_Z --help". a) with GCC (module load gcc): {{{ #!ShellExample ./build_visitX_Y_Z \ --console --no-visit \ --build-mode Release --makeflags '-j 8' \ --parallel --fortran \ --cmake --mesa --python --vtk --qt --szip --zlib --boost \ --hdf5 --silo --netcdf --xdmf \ --prefix }}} b) with Intel Compiler (module load intel): {{{ #!ShellExample export PAR_COMPILER=mpicc export PAR_INCLUDE=<'mpicc --showme:compile' with path to mpi.h first> ./build_visitX_Y_Z \ \\ --cc icc --cxx icpc \ --cflags "-O2 -axAVX -axSSE4.2 -xSSE2" \ --cxxflags "-O2 -axAVX -axSSE4.2 -xSSE2" \ --console --no-visit \ --build-mode Release --makeflags '-j 8' \ --parallel --fortran \ --cmake --mesa --python --vtk --qt --szip --zlib --boost \ --hdf5 --silo --netcdf --xdmf \ --prefix }}} This will ... * automatic: downloading 3rd-party packages to current directory ... * automatic: configure,build packages in subdirectory "" ... * follow output with "tail -f build_visitX_Y_Z_log" * each of the external packages get compiled and installed into a directory prefix of ./visit//// * the corresponding third-library-cmake-settings are created in ./`hostname`.cmake ==== 3) download !VisIt * download visitx.y.z.tar.gz (eg. http://portal.nersc.gov/svn/visit/trunk/releases/X.Y.Z/visitX.Y.Z.tar.gz) {{{ #!ShellExample wget http://portal.nersc.gov/svn/visit/trunk/releases/X.Y.Z/visitX.Y.Z.tar.gz }}} * extract visitX.Y.Z.tar.gz to previous build directory {{{ #!ShellExample tar -xzf visitX.Y.Z.tar.gz }}} ==== 4) configure !VisIt * copy third-library-cmake-settings to visitX.Y.Z {{{ #!ShellExample cp `hostname`.cmake visitX.Y.Z/src/config-site/ }}} * set default compiler to GCC (module switch …) * change director to visitX.Y.Z/src {{{ #!ShellExample cd visitX.Y.Z/src }}} * run !VisIt's-'ccmake .' and generate Makefiles: {{{ #!ShellExample ../../visit/cmake///bin/ccmake . }}} * press 'c' to configure * check VISIT_PARALLEL=ON, VISIT_FORTRAN=ON * press 'c' until 'g' is available * press 'g' to generate Makefile ==== 5) compile !VisIt * build will happen in visitX.Y.Z/src only \\ (=> remove and re-extract directory visitX.Y.Z is a complete clean) {{{ #!ShellExample make -j 16 }}} ==== 6) install !VisIt * create a tar.gz file {{{ #!ShellExample make package }}} * install !VisIt from that tar.gz package \\ (all symlinks in libraries will be reset to the paths of the machine !!) {{{ #!ShellExample visitx.y.z/src/svn_bin/visit-install }}} * eg. visit2.9.2/src/svn_bin/visit-install 2.9.2 linux-x86_64 /home/vrsw/VisIt/2.9.2/gcc44_ompi18 ==== 7) test !VisIt * add visit path to $PATH {{{ #!ShellExample export PATH=/current/bin/:$PATH }}} * run !VisIt {{{ #!ShellExample visit }}} \\ \\ === IMPORTANT COMMENTS * !VisIt should be compiled with GCC (only try Intel Compiler Suite if you really need it, in general it does not work right out of the box ([http://visitusers.org/index.php?title=Using_build_visit_with_intel_tools more infos]). \\ => make sure 'mpicc' 'mpic++' etc. use GCC before you start the build process * IceT: may fail if "mpicc --showme:compile" does not return the path to mpi.h as first entry. Check if this is the case. \\ If not you might have to set the variables PAR_COMPILER and PAR_INCLUDE before (seems to be fixed in current !VisIt version): * export PAR_COMPILER=mpicc * export PAR_INCLUDE=<'mpicc --showme:compile' with path to mpi.h first> * host profiles are located in src/resources/hosts/. * this should not be required, as visit should set LD_LIBRARY_PATH on its own ... anyway {{{ #!ShellExample export LD_LIBRARY_PATH=/current/linux-x86_64/lib:$LD_LIBRARY_PATH }}} * more details: - http://www.visitusers.org/index.php?title=Build_visit_overview - http://www.visitusers.org/index.php?title=Using_build_visit_with_intel_tools - http://www.visitusers.org/index.php?title=Building_on_Ubuntu_12.04 - http://www.visitusers.org/index.php?title=ParallelPorting#Compiling_VisIt_to_run_in_parallel ---- any feedback welcomed - [mailto:h.zilken@fz.juelich.de], [mailto:j.goebbert@fz-juelich.de]