SIGMA

Scalable Interfaces for Geometry and Mesh based Applications

Visualization with MOAB

Posted by in MOAB

Notes about VisIt 2.3.0

VisIt is a free interactive parallel visualization and graphical analysis tool for viewing scientific data on Unix and PC platforms. It is widely used in various DOE labs and for other large simulations. VisIt has developed an ITAPS_MOAB reader that can be used to view .h5m (HDF5) and .cub(CUBIT) files.
Follow these steps to build VisIt with ITAPS option:
1. Goto: http://portal.nersc.gov/svn/visit/trunk/releases/2.3.0/build_visit2_3_0 (This version has been tested and installed, you can try the latest one)
2. Copy the shell script in a file and save it as build_visit.sh in an empty folder. Make it an executable with chmod +x build_visit.sh.

If you have configured PyTAPS, you may have used the home scheme, in which the local ~/.pydistutils.cfg was edited to define the “home” installation folder for python bindings on your local machine. (Installing PyTAPS). You need to disable that file while you are building VisIt (for example, rename it)

3. Invoke the script ‘build_visit.sh’.
4. Choose ‘Advanced’ on the installation window, select ITAPS, NETCDF and HDF5 options. You may choose other options like Silo, Exodus.
5. It will take a while, it will build and install several packages it needs and finally will build VisIt.
6. You can also launch the build script with a command like

 ./build_visit.sh  --itaps --python --console --hdf5 --netcdf --exodus --szip --silo

7. All done, now cd into the visit2.3.0/src/bin directory and launch visit – ‘./visit’. You can add <visit2.3.0/src/bin> to your PATH variable, or you can follow the installation instructions to install it in a different folder.
Note: gcc-4.4.3 and g++-4.4.3 were used to build this version.
When opening an .h5m file make sure to use ‘Open file as type’ as ‘ITAPS_MOAB’, otherwise you will get an error message.

Notes about building VisIt version 2.6.2

As before, download the build script from http://portal.nersc.gov/svn/visit/trunk/releases/2.6.2/build_visit2_6_2
Save the script in a build folder, give it a name (like b262.sh) and make it executable with chmod +x b262.sh . You can launch the build with command line options, like

b262.sh --netcdf --itaps --console --hdf5 --szip --silo --python

It will download many packages. ITAPS_MOAB will fail to configure, there is an error in the script, netcdf should be built before MOAB.
Workaround is to modify the script. It is better to just build it first without itaps option, with something like

b262.sh --netcdf --console --hdf5 --szip --silo --python

Note (09/30/2013), if build failed with visit2.6.2/src/third_party_builtin/slivr/slivr/VideoCardInfo.c:45:35: fatal error: X11/extensions/XInput.h: No such file or directory, you can try installing libxi-dev package
After you notice that netcdf is built, you can stop the script and launch it again with the full options: b262.sh –netcdf –itaps –console –hdf5 –szip –silo –python
GRUMPP package failed to compile for me. Workaround: assume you are in the build folder:
cd GRUMMP-0.6.3/include
edit GR_Classes.h, add definition for NULL in line 3, so it will look like this:

#ifndef GR_Classes
#define GR_Classes 1
#ifndef NULL
#define NULL 0
#endif

edit GR_EntContainer.h, modify in line 453 and 456 to add std:: before ptrdiff_t, so it will look like this:

    if (pTCurr == pTLast()
	||
	(pTCurr - m_data[iList] == std::ptrdiff_t(m_listSize[iList] - 1)
	 && iList == m_nLists - 1) )
      return 0;
    else if (pTCurr - m_data[iList] == std::ptrdiff_t(m_listSize[iList] - 1))
      return m_data[iList+1];
    else
      return pTCurr+1;

Linking to shared libGR_base.so will fail to generate scat2d under GRUMMP-0.6.3/bin/linux-gnu
Workaround: hide soft link libGR_base.so to let g++ link to static libGR_base.a instead, assume you are in the build folder:
cd GRUMMP-0.6.3/lib/libO/linux-gnu
mv libGR_base.so libGR_base.hide.so
The process is long, it takes a few hours. Any time you can relaunch it, if the connection is bad and it could not download the packages
Additional notes: MOAB version is old and it has a bug that will not permit to visualize h5m files with sense tags. Workaround: assume you are in the build folder:
cd moab-4.0.1/itaps/imesh
edit iMesh_MOAB.cpp, add around line 246 this:
tags.resize(w);
such that the function remove_var_len_tags looks like this:

static void remove_var_len_tags( Interface* mb, std::vector<Tag>& tags )
{
  int size;
  size_t r, w = 0;
  for (r = 0; r < tags.size(); ++r)
    if (MB_SUCCESS == mb->tag_get_size( tags[r], size ))
      tags[w++] = tags[r];
  tags.resize(w);
}

then cd to build folder of moab (moab-4.0.1)
do a make and install
also, in order to make the .h5m files readable by default by ITAPS_MOAB, change this: cd to folder visit2.6.2/src/databases/ITAPS_MOAB, edit ITAPS_MOABPluginInfo.C and add this around line 175,

defaultPatterns.push_back(“*.h5m”);

so it will look like this:

std::vector<std::string>
ITAPS_MOABGeneralPluginInfo::GetDefaultFilePatterns() const
{
    std::vector<std::string> defaultPatterns;
    defaultPatterns.push_back("*.cub");
    defaultPatterns.push_back("*.h5m");
    return defaultPatterns;
}

then cd to /visit2.6.2/src folder, and type make.
check that indeed the ITAPS_MOAB plugin gets recompiled. You are done! Happy Visualizations!


Copyright © 2014--2023 SIGMA. All Rights Reserved.