CMB 3D modeling

Can you post the directory contents after running cmake? that is, run

> ls -al

I would also be interested in confirming the output from the cmake command.

Hi @johnt, after running the command, I get this:

total 8
drwxr-xr-x 2 tomas tomas 4096 Apr 11 12:57 .
drwxr-xr-x 4 tomas tomas 4096 Apr  4 14:36 ..

And the output from the cmake command is:

CMake Warning at superbuild/CMakeLists.txt:72 (message):
  Forcing CMAKE_POSITION_INDEPENDENT_CODE to be ON as required by
  BUILD_SHARED_LIBS.


-- found package: ace3p
-- found package: aeva
-- found package: cmb2d
-- found package: mb-docker
-- found package: modelbuilder
-- found package: truchas
-- found package: windtunnel
-- Default package: <none>
-- Determined source version for cmb: 23.01.100
-- Determined source version for smtk: 24.01.101
-- Determined source version for paraview: 5.11.0
-- Determined source version for vtk: 9.0.0
-- Enabling cxx11 for: eigen, nlohmannjson, pegtl, pybind11, smtk, smtkresourcemanagerstate
-- Enabling boost for: cmb, paraview, smtk, smtkresourcemanagerstate
-- Enabling eigen for: moab, smtk
-- Enabling zlib for: freetype, hdf5, libarchive, netcdf, paraview, png, python3
-- Enabling szip for: hdf5
-- Enabling hdf5 for: moab, netcdf, smtk
-- Enabling netcdf for: moab, paraview, smtk
-- Enabling moab for: cmb, smtk
-- Enabling nlohmannjson for: cmb, smtk
-- Enabling bzip2 for: libarchive, python3
-- Enabling png for: freetype, paraview, python3
-- Enabling ffi for: python3
-- Enabling sqlite for: python3
-- Enabling python3 for: cmb, pybind11, pythonsetuptools
-- Enabling freetype for: paraview
-- Enabling qt5 as requested.
-- Enabling paraview for: cmb, smtkresourcemanagerstate
-- Enabling pythonsetuptools for: pybind11
-- Enabling pybind11 for: cmb
-- Enabling libxml2 for: libarchive
-- Enabling libarchive for: smtk, smtkresourcemanagerstate
-- Enabling pegtl for: smtk
-- Enabling smtk as requested.
-- Enabling smtkresourcemanagerstate as requested.
-- Enabling cmb as requested.
-- Building projects: cxx11, boost, eigen, zlib, szip, hdf5, netcdf, moab, nlohmannjson, bzip2, png, ffi, sqlite, python3, freetype, qt5, paraview, pythonsetuptools, pybind11, libxml2, libarchive, pegtl, smtk, smtkresourcemanagerstate, cmb
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tomas/test-cmb/cmb-superbuild

So cmake says it is writing files:

but when you go to that directory it’s empty? Maybe there is something about WSL, but this is very strange.

Maybe we need to do some sanity checks to confirm that cmake generates files on WSL. Let me look at the cmake docs and see if we can run a simple experiment.

Hi @johnt,

I’m working with @Tomas_Ribeiro. Many thanks for trying to help. FYI we’ve tried on several machines (and on both ubuntu and gentoo).

git clone https://gitlab.kitware.com/cmb/cmb-superbuild.git                                                                                                                                                                          
cd cmb-superbuild/                                                                                                                                                                                                                   
git checkout v23.01.0                                                                                                                                                                                                                
git submodule update --init                                                                                                                                                                                                          
                                                                                                                                                                                                                                     
cd ..                                                                                                                                                                                                                                
mkdir build                                                                                                                                                                                                                          
cd build                                                                                                                                                                                                                             
                                                                                                                                                                                                                                     
cmake -GNinja -Wno-dev \                                                                                                                                                                                                             
    -DBUILD_TESTING=0 \                                                                                                                                                                                                              
    -DDEVELOPER_MODE_cmb=1 \                                                                                                                                                                                                         
    -DDEVELOPER_MODE_smtk=1 \                                                                                                                                                                                                        
    -DENABLE_DOCUMENTATION=0 \                                                                                                                                                                                                       
    -DUSE_SYSTEM_boost=1 \                                                                                                                                                                                                           
    -DUSE_SYSTEM_bzip2=1 \                                                                                                                                                                                                           
    -DUSE_SYSTEM_freetype=1 \                                                                                                                                                                                                        
    -DUSE_SYSTEM_hdf5=0 \                                                                                                                                                                                                            
    -DUSE_SYSTEM_libxml2=1 \                                                                                                                                                                                                         
    -DUSE_SYSTEM_netcdf=0 \                                                                                                                                                                                                          
    -DUSE_SYSTEM_pkgconf=1 \                                                                                                                                                                                                         
    -DUSE_SYSTEM_png=1 \                                                                                                                                                                                                             
    -DUSE_SYSTEM_python3=0 \                                                                                                                                                                                                         
    -DUSE_SYSTEM_qt5=1 \                                                                                                                                                                                                             
    -DENABLE_qt5=0 \                                                                                                                                                                                                                 
    -DUSE_SYSTEM_sqlite=0 \                                                                                                                                                                                                          
    -DUSE_SYSTEM_zlib=1 \                                                                                                                                                                                                            
    -DENABLE_pythonsetuptoolsscm=1 \                                                                                                                                                                                                 
    -DCMAKE_INSTALL_PREFIX=/home/pete/local \                                                                                                                                                                                        
    -DENABLE_vtk=1 \                                                                                                                                                                                                                 
    ../cmb-superbuild/                                                                                                                                                                                                               

This attempt to build fails on vtk:

FAILED: VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkSEPReader.cxx.o 
/usr/bin/c++ -DIOImage_EXPORT -Dkiss_fft_scalar=double -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/IO/Image -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Common/Core -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Core -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Common/ExecutionModel -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/ExecutionModel -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Common/DataModel -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/DataModel -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Common/Math -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Math -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/kissfft/vtkkissfft -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/kissfft/vtkkissfft -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Common/Transforms -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Transforms -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Imaging/Core -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Imaging/Core -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Common/Misc -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Misc -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Common/System -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/System -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Utilities/DICOMParser -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Utilities/DICOMParser -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/jpeg/vtkjpeg -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/jpeg/vtkjpeg -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Utilities/MetaIO/vtkmetaio -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Utilities/MetaIO/vtkmetaio -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/pugixml/vtkpugixml -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/pugixml/vtkpugixml -I/home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/tiff/vtktiff/libtiff -I/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/tiff/vtktiff/libtiff -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Utilities/KWIML -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Utilities/KWIML -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Utilities/KWSys -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Utilities/KWSys -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/kissfft -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/kissfft -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/jpeg -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/jpeg -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/Utilities/MetaIO -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Utilities/MetaIO -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/png -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/png -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/pugixml -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/pugixml -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/tiff -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/tiff -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/build/VTK/ThirdParty/zlib -isystem /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/ThirdParty/zlib -march=core2 -mno-avx512f  -fPIC          -std=c++11  -O3 -DNDEBUG -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkSEPReader.cxx.o -MF VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkSEPReader.cxx.o.d -o VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkSEPReader.cxx.o -c /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.cxx
In file included from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.cxx:16:
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h:34:6: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword
   34 | enum class EndiannessType : std::uint8_t
      | ~~~~ ^~~~~
      |      -----
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h:34:12: error: use of enum ‘EndiannessType’ without previous declaration
   34 | enum class EndiannessType : std::uint8_t
      |            ^~~~~~~~~~~~~~
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h:34:27: error: expected unqualified-id before ‘:’ token
   34 | enum class EndiannessType : std::uint8_t
      |                           ^
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h:106:19: error: ‘int32_t’ is not a member of ‘std’; did you mean ‘int32_t’?
  106 |   std::array<std::int32_t, 6> ComputeExtent() const;
      |                   ^~~~~~~
In file included from /usr/include/sys/types.h:155,
                 from /usr/include/stdlib.h:514,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/cstdlib:79,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/ext/string_conversions.h:43,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:4109,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/string:54,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/locale_classes.h:40,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/ios_base.h:41,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/ios:44,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/istream:40,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/fstream:40,
                 from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Core/vtkIOStream.h:29,
                 from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Core/vtkSystemIncludes.h:39,
                 from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Core/vtkIndent.h:28,
                 from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Core/vtkObjectBase.h:53,
                 from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/Core/vtkObject.h:45,
                 from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/Common/ExecutionModel/vtkExtentTranslator.h:29,
                 from /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h:24:
/usr/include/bits/stdint-intn.h:26:19: note: ‘int32_t’ declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h:106:19: error: ‘int32_t’ is not a member of ‘std’; did you mean ‘int32_t’?
  106 |   std::array<std::int32_t, 6> ComputeExtent() const;
      |                   ^~~~~~~
/usr/include/bits/stdint-intn.h:26:19: note: ‘int32_t’ declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h:106:29: error: template argument 1 is invalid


SNIPPED

      |                    ^~~~~~~~~~
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.cxx:536:34: error: ‘DataFormatType’ has not been declared
  536 |     else if (this->DataFormat == DataFormatType::XDR_DOUBLE)
      |                                  ^~~~~~~~~~~~~~
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.cxx: In member function ‘void vtkSEPReader::ReadDataPiece(FILE*, char*&, vtkIdType, vtkIdType)’:
/home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.cxx:556:76: error: ‘class vtkSEPReader’ has no member named ‘DataFormat’
  556 |   std::size_t len = details::DataFormatSize[static_cast<std::size_t>(this->DataFormat)];
      |                                                                            ^~~~~~~~~~
[2713/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkNIFTIImageReader.cxx.o
[2714/20955] Generating the wrap hierarchy for VTK::IOImage
[2715/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkPNGWriter.cxx.o
[2716/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkVolumeReader.cxx.o
[2717/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkSLCReader.cxx.o
[2718/20955] Building C object VTK/ThirdParty/jpeg/vtkjpeg/CMakeFiles/jpeg.dir/jchuff.c.o
[2719/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkMedicalImageProperties.cxx.o
[2720/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkTGAReader.cxx.o
[2721/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkTIFFWriter.cxx.o
[2722/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkVolume16Reader.cxx.o
[2723/20955] Building CXX object VTK/Imaging/Hybrid/CMakeFiles/ImagingHybrid.dir/vtkBooleanTexture.cxx.o
[2724/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkOMETIFFReader.cxx.o
[2725/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkPNGReader.cxx.o
[2726/20955] Building CXX object VTK/Imaging/Hybrid/CMakeFiles/ImagingHybrid.dir/vtkCheckerboardSplatter.cxx.o
[2727/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkNrrdReader.cxx.o
[2728/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkTIFFReader.cxx.o
[2729/20955] Building CXX object VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkImageReader.cxx.o
ninja: build stopped: subcommand failed.
CMake Error at /home/pete/software/kitware-stuff/build/superbuild/sb-paraview-build.cmake:47 (message):
  Failed with exit code 1


ninja: build stopped: subcommand failed.

It seems a problem with vtk (maybe and gcc13?) rather than CMB. Any thoughts on that? I’ve truncated the error due to character limits. I can send more it its useful.

Many thanks,
Pete

Thanks for the report Pete. We haven’t seen this error before. It might be related to gcc13. I talked to our VTK folks and they would like see if you can generate the preprocessor output. To do that, we are asking you to:

1. cd to <build-directory>/superbuild/paraview/build

2. Rerun that very long compile command (that begins /usr/bin/c++ ) with one substitution:

  • Near the end of the command, remove the part that sets the output: -o VTK/IO/Image/CMakeFiles/IOImage-objects.dir/vtkSEPReader.cxx.o
  • Replace that text with -o preproc.txt -E

3. That should generate a preproc.txt in the build directory. Please post the file here.

I hope my instructions are clear.

@gustafson I believe I have seen this error before. Try adding

#include <cstddef>

to the top of /home/pete/software/kitware-stuff/build/superbuild/paraview/src/VTK/IO/Image/vtkSEPReader.h with the other includes. If that fixes things, it has already been fixed in a newer version of VTK and ParaView than CMB uses by default. gcc13 is indeed more strict about defining things only in one system header and not unnecessarily including others.

Hi David,

Thanks for this tip. I feel like we’ve made progress. I was able to get vtk to build, but it took some work. I had to explore several tagged versions before I found one that seemed buildable based on the error messages I found. (This was tag v9.2.5). Based on that tag, I applied the following patch:

diff --git a/IO/Image/vtkSEPReader.h b/IO/Image/vtkSEPReader.h
index a7d8aad151..73f8200969 100644
--- a/IO/Image/vtkSEPReader.h
+++ b/IO/Image/vtkSEPReader.h
@@ -27,6 +27,8 @@
 
 #include <array>  // for std::array
 #include <string> // for std::string
+#include <cstddef> // Added by Pete
+#include <cstdint> // Added by Pete
 
 namespace details
 {
diff --git a/IO/PIO/PIOData.h b/IO/PIO/PIOData.h
index 8eddfb5b92..c6ccdd8e8b 100644
--- a/IO/PIO/PIOData.h
+++ b/IO/PIO/PIOData.h
@@ -12,6 +12,8 @@
 #include <string.h>
 #include <string>
 #include <valarray>
+#include <cstddef> // Added by Pete
+#include <cstdint> // Added by Pete
 
 VTK_ABI_NAMESPACE_BEGIN
 struct Cstring_less
diff --git a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
index cbccd727dd..c227336c3f 100644
--- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
+++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
@@ -50,6 +50,8 @@
 #include "vtkRenderingMatplotlibModule.h" // For export macro
 
 #include <vector> // for std::vector
+#include <cstddef> // Added by Pete
+#include <cstdint> // Added by Pete
 
 struct _object;
 typedef struct _object PyObject;
diff --git a/ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp b/ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp
index 6267684218..ae1f391f5f 100644
--- a/ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp
+++ b/ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp
@@ -33,6 +33,8 @@
 
 #include <vector>
 #include <string>
+#include <cstddef> // Added by Pete
+#include <cstdint> // Added by Pete
 
 #define CPL_DLL
 
diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m b/ThirdParty/vtkm/vtkvtkm/vtk-m
index 618c40a91b..cfd6d3fbe5 160000
--- a/ThirdParty/vtkm/vtkvtkm/vtk-m
+++ b/ThirdParty/vtkm/vtkvtkm/vtk-m
@@ -1 +1 @@
-Subproject commit 618c40a91b9085e279e0103e97c8dfd1114665b3
+Subproject commit cfd6d3fbe534343d217c2dce47a46763692db0ec

After that, vtk built to the end, and the superbuild claimed to be finished.

Unfortunately, CMB modelbuilder itself is not built. Here is a log, with ‘Up-to-date’ messages suppressed.

pete@pilot ~/software/kitware-stuff/build $ grep -v 'Up-to-date' log.txt 
[1/16] Performing update step (git update) for 'paraview'
[2/16] Skipping patch step (no custom command) for 'paraview'
[3/16] Performing update step (git update) for 'cmbworkflows'
HEAD is now at 69561d6 Merge branch 'migrate-ace3p-truchas' into 'master'
[4/16] Skipping patch step (no custom command) for 'cmbworkflows'
[5/16] No configure step for 'cmbworkflows'
[6/16] No build step for 'cmbworkflows'
[7/16] Performing install step for 'cmbworkflows'
[8/16] Completed 'cmbworkflows'
[9/16] Performing configure step for 'paraview'
Not searching for unused variables given on the command line.
-- Using 'QtHelp' without 'QtWebEngine' will ignore embedded javascript and *.js files for documentation
-- VTK version: 9.2.5-1970-g6fc11578d8
CMake Warning (dev) at /usr/share/cmake/Modules/CMakeDependentOption.cmake:89 (message):
  Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
  Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  VTK/Common/Core/CMakeLists.txt:47 (cmake_dependent_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Unable to determine HDF5 C flags from HDF5 wrapper.
-- Unable to determine HDF5 C version_var from HDF5 wrapper.
CMake Deprecation Warning at ThirdParty/QtTesting/vtkqttesting/CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Enabled modules: VTK(162), ParaView(49 + 8)
-- Configuring done (4.7s)
-- Generating done (2.7s)
-- Build files have been written to: /home/pete/software/kitware-stuff/build/superbuild/paraview/build
[10/16] Performing build step for 'paraview'
[1/6] Generating Fortran dyndep file Clients/Catalyst/CMakeFiles/Catalyst-objects.dir/Fortran.dd
[2/6] Generating Fortran dyndep file Clients/PythonCatalyst/CMakeFiles/PythonCatalyst-objects.dir/Fortran.dd
[3/6] Automatic MOC and UIC for target paraview
[4/5] Building CXX object Clients/ParaView/CMakeFiles/paraview.dir/ParaViewMainWindow.cxx.o
[5/5] Linking CXX executable bin/paraview
[11/16] Performing install step for 'paraview'
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/vtk/VTK-vtk-module-properties.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/vtk/vtk-prefix.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/vtk/VTK-vtk-module-find-packages.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/ParaView-vtk-module-properties.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/ParaViewClients-vtk-module-properties.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/SLACTools-vtk-module-properties.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/SLACTools-vtk-module-find-packages.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/ParaViewPlugins-paraview-plugin-properties.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/vtk/vtkmodules-vtk-python-module-properties.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/paraview.modules-vtk-python-module-properties.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/bin/paraview
-- Set non-toolchain portion of runtime path of "/home/pete/software/kitware-stuff/build/install/bin/paraview" to "$ORIGIN/../lib"
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/paraview-prefix.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/ParaView-vtk-module-find-packages.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/ParaView-client-xml.cmake
[12/16] Completed 'paraview'
[13/16] No configure step for 'vtk'
[14/16] No build step for 'vtk'
[15/16] No install step for 'vtk'
[16/16] Completed 'vtk'

Suspecting I might not have configured correctly, I found that indeed CMB should be enabled:

pete@pilot ~/software/kitware-stuff/build $ grep -i enable CMakeCache.txt |grep -i cmb
ENABLE_cmb:BOOL=ON
ENABLE_cmbusersguide:BOOL=OFF
ENABLE_cmbworkflows:BOOL=1

FWIW Enabling ENABLE_cmbusersguide didn’t make a difference.

Subsequently, thinking HDF5 might be the issue, I made sure to enable everything with HDF5 (including removing and recloning, after cmake couldn’t resolve the changes). This again reported the superbuild completing, but didn’t go any further than vtk. Here are the related build flags for cmake.

pete@pilot ~/software/kitware-stuff/build $ grep -i enable CMakeCache.txt |grep -i -e cmb -e hdf
ENABLE_cmb:BOOL=ON
ENABLE_cmbusersguide:BOOL=OFF
ENABLE_cmbworkflows:BOOL=1
ENABLE_hdf5:BOOL=ON
ENABLE_hdf5cpp:BOOL=ON
//MODIFIED property for variable: ENABLE_hdf5cpp
ENABLE_hdf5cpp-MODIFIED:INTERNAL=ON

Am I missing something that would cause modelbuilder to be built? Again, I appreciate your looking at this. We’re anxious to use cmb within Tomas’s thesis. :slight_smile:

Pete

I agree with David that these build problems are likely stemming from the newer, more strict, gcc version. We can start working these issue out, but for expediency, I would suggest building with an Ubuntu 22.04 LTS or Centos7 machine. We build paraview and the other dependencies reliably on those machines.

I should have also pointed you to the list of packages that are needed on the build machine. This link has info for Ubuntu 22.04, Ubuntu 18.04, Centos 7, and ArchLinux: https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md?ref_type=heads#dependencies

Hi,

I spooled up a fresh virtual machine with Ubuntu 22.04.4 LTS which is using gcc11. I was able to build through vtk.

This got to the same point that I’m at now with Ubuntu 23.10 and up-to-date gentoo. None are actually building modelbuilder.

-- Installing: /home/pete/software/kitware-stuff/build/install/lib/cmake/paraview-5.11/ParaView-client-xml.cmake
-- Installing: /home/pete/software/kitware-stuff/build/install/share/licenses/ParaView/Copyright.txt
-- Installing: /home/pete/software/kitware-stuff/build/install/share/licenses/ParaView/License_v1.2.txt
[16/16] Completed 'vtk'
pete@ubuntu2204pilot:~/software/kitware-stuff/build$ ls install/bin/
2to3         idle3            pvdataserver     python3.9                     vtkWrapClientServer-pv5.11
2to3-3.9     idle3.9          pvpython         python3.9-config              vtkWrapHierarchy-pv5.11
bsdcat       nc-config        pvrenderserver   python3-config                vtkWrapJava-pv5.11
bsdcpio      paraview         pvserver         smTestDriver-pv5.11           vtkWrapPythonInit-pv5.11
bsdtar       paraview.conf    pybind11-config  sqlite3                       vtkWrapPython-pv5.11
h5cc         paraview-config  pydoc3           vtkParseJava-pv5.11
h5hlcc       pip3             pydoc3.9         vtkProbeOpenGLVersion-pv5.11
h5minfo      pip3.9           python           vtkProcessXML-pv5.11
h5mvalidate  pvbatch          python3          vtkprotoc-pv5.11

Could you peak at my cmake config command above to see if there is something I have left out wrt modelbuilder itself?

FWIW I’m documenting my build, so I’ll be able to make a comprehensive post on building in these environments if/when we get through this.

Thanks again,
Pete

That’s great, Pete. We’ve got some VTK work to do here regarding 23.10, but as to building modelbuilder:

I suspect the reason modelbuilder didn’t build is because you set developer mode on for both smtk and cmb. If that was some directions I gave previously, I apologize. You should instead turn both of those off, rerun cmake and rerun ninja.

I’ve done that, and smtk build is now erroring out on not finding the “units” package.

cd /home/pete/software/kitware-stuff/build/superbuild/smtk/build && /usr/bin/cmake -P /home/pete/software/kitware-stuff/build/superbuild/sb-smtk-configure.cmake && /usr/bin/cmake -E touch /home/pete/software/kitware-stuff/build/superbuild/smtk/stamp/smtk-configure
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:357 (find_package):
  By not providing "Findunits.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "units", but
  CMake did not find one.

  Could not find a package configuration file provided by "units" with any of
  the following names:

    unitsConfig.cmake
    units-config.cmake

  Add the installation prefix of "units" to CMAKE_PREFIX_PATH or set
  "units_DIR" to a directory containing one of the above files.  If "units"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/home/pete/software/kitware-stuff/build/superbuild/smtk/build/CMakeFiles/CMakeOutput.log".
CMake Error at /home/pete/software/kitware-stuff/build/superbuild/sb-smtk-configure.cmake:47 (message):
  Failed with exit code 1


[23/35] Completed 'vtk'
ninja: build stopped: subcommand failed.

Can you confirm that this is the correct source library? The superbuild hasn’t pulled anything.

Also, is there an ubuntu package for this? I can’t seem to find it if there is. Thanks,

I don’t know what went wrong here.

1. No, units is not the github project you indicated. It’s one of the packages that is built by cmb-superbuild. (fyi its repository is at https://gitlab.kitware.com/units/units)

2. When you reran cmake, “units” should have been in the list of packages written to the terminal. On my machine, that list is

-- Building projects: cxx11, boost, eigen, zlib, szip, bzip2, png, ffi, sqlite, xz, python3, hdf5, netcdf, moab, nlohmannjson, freetype, qt5, paraview, pythonsetuptools, pybind11, libxml2, libarchive, pegtl, units, fmt, smtk, cmb

(units is fourth from the last) Would you rerun cmake and compare with this list?

3. If the units project was configured by cmake, you will find a folder at <build-directory>/superbuild/units. And if the build completed, the “missing” unitsConfig.cmake file will be at <build-directory>/install/lib/cmake/units-23.05.0/unitsConfig.cmake.

Hmm… no I’m not getting units as a package.

-- Building projects: cxx11, boost, eigen, zlib, szip, hdf5, netcdf, moab, nlohmannjson, bzip2, png, ffi, sqlite, python3, freetype, qt5, paraview, pythonsetuptools, pybind11, libxml2, libarchive, pegtl, pythonsetuptoolsscm, smtk, cmbworkflows, smtkresourcemanagerstate, cmb, vtk

There appears to be some version inconsistency in the superbuild. A challenge I’m sure, with so many dependencies. When I checkout master instead of the v23.01.0, cmake does pickup the units package. I’m trying to build from master now, though I’m hesitant to use that bleeding edge. :slight_smile:

Note your current release branch points to something from 2020 (a version 6). Perhaps that should point to something more recent?

For now, it is building on master branch. I’ll report back.

Yes, our versioning has not kept up with the development pace.

  • So yes, definitely use the cmb-superbuild:master (commit d4d8c364).
  • You will also need to run git submodule update.
  • And be sure to delete the full build tree before rerunning cmake and ninja. Otherwise older project builds will pollute/corrupt things.

Good news. Success! Here is what is working on all the ubuntus we use. (22.04.4 LTS, 23.10 Desktop, 23.10 WSL)

sudo apt install cmake cmake-curses-gui libboost-all-dev libfreetype-dev qtbase5-dev libqt5svg5-dev libqt5x11extras5-dev libqt5help5 qttools5-dev libclang-dev libxkbcommon-x11-dev qtxmlpatterns5-dev-tools libqt5webkit5-dev libxcursor-dev libbz2-dev ninja-build build-essential libxml2-dev libglvnd-dev gcc-12 g++-12

Followed by:

git clone https://gitlab.kitware.com/cmb/cmb-superbuild.git
cd cmb-superbuild/
git checkout master
git submodule update --init
cd ..

Which was then configured with:

mkdir build
cd build

CC=/usr/bin/gcc-12 \
CXX=/usr/bin/g++-12 \
cmake -GNinja -Wno-dev \
	-DBUILD_TESTING=0 \
	-DDEVELOPER_MODE_cmb=0 \
	-DDEVELOPER_MODE_smtk=0 \
	-DENABLE_cmbworkflows=1 \
	-DENABLE_DOCUMENTATION=0 \
	-DUSE_SYSTEM_boost=0 \
	-DUSE_SYSTEM_bzip2=1 \
	-DUSE_SYSTEM_freetype=1 \
	-DUSE_SYSTEM_hdf5=0 \
	-DUSE_SYSTEM_libxml2=1 \
	-DUSE_SYSTEM_netcdf=0 \
	-DUSE_SYSTEM_pkgconf=1 \
	-DUSE_SYSTEM_png=1 \
	-DUSE_SYSTEM_python3=0 \
	-DUSE_SYSTEM_qt5=1 \
	-DENABLE_qt5=0 \
	-DUSE_SYSTEM_sqlite=0 \
	-DUSE_SYSTEM_zlib=1 \
	-DENABLE_pythonsetuptoolsscm=1 \
	-DCMAKE_INSTALL_PREFIX=/home/pete/local \
	-DENABLE_vtk=1 \
	../cmb-superbuild/

ninja -j8

This worked also for Gentoo, although the libraries were already installed via emerge and I thus don’t have a concise minimum list of packages in that setting.

Subsequently I have been able to launch modelbuilder! Now we learn to incorporate this tool into our workflow.

Many thanks for your support, I am continually impressed by Kitware.
Pete

Thanks for reporting back the good news, Pete!

We especially appreciate you listing the packages and build incantations, so that we won’t have to go through the long discovery process with others or when upgrading OS ourselves.

We would also be interested in knowing more about your workflow. If you can share any info on your application and use cases, please tell us more! either here or by DM.

Thanks again,
john

Hello @johnt, thank you so much once again for the help provided, and I´m sorry it took so long to reply. After finally being able to get the CMB superbuild to run, my next goal would be to be able to do something similar to the CMB2d example, but for general 3d models. The 2d example uses:

  • Aquaveo XMS Mesher

  • MinimalFEM

Which I assume would have to be changed in order to work with 3d models. Is there any example that I could base my work on? Any tips are appreciated as I´m trying to work out the intricacies of the software.

Best regards,
Tomas

Good to hear from you, Tomas.

Your approach for 3D depends in part on the modeling, meshing and solver software you intend to use. For CAD applications, the modeling is typically done outside CMB and imported into modelbuilder. Meshers and solvers are typically external executables launched from modelbuilder as separate processes.

You can see an example is the CMB Wind Tunnel application, which uses OpenFOAM for both mesher and solver. The docs for this version of modelbuilder are at https://cmb-wind-tunnel.readthedocs.io/ and the plugin that implements the CMB-OpenFOAM interface is at https://gitlab.kitware.com/cmb/plugins/openfoam-windtunnel .

For CAD modeling, we can import a number of formats including vtk and Exodus. We also have an OpenCascade plugin at https://gitlab.kitware.com/cmb/plugins/opencascade-session

Let me know if you are thinking of using the Gmsh mesh generator. I should be able to get you some code for interfacing that with CMB/modelbuilder.

And if you are curious about the XMS mesher, the plugin that interfaces it to CMB is at https://gitlab.kitware.com/cmb/plugins/xmsmeshoperation.

Hello @johnt. My initial idea, as a solver, would be to integrate Calculix, and as a mesher, Gmsh. However, I am open to suggestions about which CAD modeler, mesher and solver would be better to implement, as I am new to this and have little idea about how challenging it is to implement all of them.

Best regards,
Tomas

Hi @Tomas_Ribeiro

I should forewarn you that extending CMB/modelbuilder is a significant undertaking. Generally, CMB developers from outside Kitware are doing so for commercial organizations that contract with Kitware for training and consulting services (thousands of dollars). I am presuming you are either in academia or learning about CMB for personal/hobbyist reasons, and wouldn’t be in a position to make an investment like that.

So to explore CMB development on your own, I recommend first taking the time to read through the SMTK documentation at https://smtk.readthedocs.io/ . SMTK is the internal library that does most of the preprocessing functionality you see in modelbuilder. Read the SMTK User’s Guide first and then go through the five Tutorial examples and see if you can implement them.

If you want to develop a CMB application and aren’t set on a specific solver, I would take a look at OpenRadioss (https://openradioss.org/) which is an FEM solver mainly used for dynamic modeling. It would be a big job for an individual to learn CMB/SMTK and develop an application like this, but if you can produce a system with reasonable quality, I think they would welcome it.