tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Partitioned heat conduction (G+Smo participant)

Open Crazy-Rich-Meghan opened this issue 1 year ago • 5 comments

Summary: Partitioned heat conduction G+Smo (IsoGeometric Analysis) participant NOTE: G+Smo adapter is a submodule of the G+Smo library, to run the tutorial you need to configure G+Smo main library.

  • [x] Updated README.md file, which contains instructions on how to configure G+Smo library with preCICE adapter.
  • [x] Added gismo-executable folder to contain the symbolic link for the G+Smo executable.

This PR is marked as a draft because the documentation for the G+Smo adapter requires updates.

Crazy-Rich-Meghan avatar Dec 04 '24 15:12 Crazy-Rich-Meghan

Let's first iterate on #603 and then here, OK?

uekerman avatar Dec 10 '24 17:12 uekerman

@Crazy-Rich-Meghan do you plan to continue this development? It seems to currently be in draft state. We are happy to help get it in a good state!

MakisH avatar Jul 17 '25 14:07 MakisH

Hi everyone,

Sorry for the delay! I have updated the partitioned heat conduction example from our side, this version supports the direct mesh access feature. To run the benchmark you need to do the following: 1. Clone G+Smo 2. cmake .. -DCMAKE_BUILD_TYPE=Release -DGISMO_OPTIONAL="gsPreCICE" 3. cmake --build build --target partitioned-heat-conduction -j 8 4. Install this example systemwide make install partitioned-heat-conduction 5. Go to the neumann-gismo folder run the Neumann participant with the run script. 6. Go to the dirichlet-gismo folder run the Dirichlet participant with the run script.

Let me know if you get stuck somewhere!

Crazy-Rich-Meghan avatar Sep 10 '25 22:09 Crazy-Rich-Meghan

Hi @Crazy-Rich-Meghan,

thanks for the updates! I am now trying to build on my system, based on the stable branch (Commit ef4c754785cf4949d3a89b916eed807b74b97a9b, October 2).

I do get a building error, though (g++ (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0):

[ 97%] Building CXX object optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/partitioned-heat-conduction.cpp.o
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp: In function ‘int main(int, char**)’:
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:110:17: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  110 |     for (; domIt->good(); domIt->next(), k++ )
      |                 ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:110:32: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  110 |     for (; domIt->good(); domIt->next(), k++ )
      |                                ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:15: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )
      |               ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:31: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )
      |                               ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:46: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )
      |                                              ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:124:29: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  124 |         QuRule->mapTo( domIt->lowerCorner(), domIt->upperCorner(),
      |                             ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:124:51: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  124 |         QuRule->mapTo( domIt->lowerCorner(), domIt->upperCorner(),
      |                                                   ^~
gmake[3]: *** [optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/build.make:76: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/partitioned-heat-conduction.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:1940: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1947: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/rule] Error 2
gmake: *** [Makefile:907: partitioned-heat-conduction] Error 2

By the way, I edited your instructions above to add a number next to the -j flag. Without a number, it will use as many threads as parallelizable build targets, which might fill the memory completely and make a system crash.

MakisH avatar Oct 07 '25 15:10 MakisH

Hi @Crazy-Rich-Meghan,

thanks for the updates! I am now trying to build on my system, based on the stable branch (Commit ef4c754785cf4949d3a89b916eed807b74b97a9b, October 2).

I do get a building error, though (g++ (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0):


[ 97%] Building CXX object optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/partitioned-heat-conduction.cpp.o

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp: In function ‘int main(int, char**)’:

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:110:17: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}

  110 |     for (; domIt->good(); domIt->next(), k++ )

      |                 ^~

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:110:32: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}

  110 |     for (; domIt->good(); domIt->next(), k++ )

      |                                ^~

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:15: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}

  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )

      |               ^~

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:31: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}

  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )

      |                               ^~

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:46: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}

  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )

      |                                              ^~

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:124:29: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}

  124 |         QuRule->mapTo( domIt->lowerCorner(), domIt->upperCorner(),

      |                             ^~

/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:124:51: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}

  124 |         QuRule->mapTo( domIt->lowerCorner(), domIt->upperCorner(),

      |                                                   ^~

gmake[3]: *** [optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/build.make:76: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/partitioned-heat-conduction.cpp.o] Error 1

gmake[2]: *** [CMakeFiles/Makefile2:1940: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/all] Error 2

gmake[1]: *** [CMakeFiles/Makefile2:1947: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/rule] Error 2

gmake: *** [Makefile:907: partitioned-heat-conduction] Error 2

By the way, I edited your instructions above to add a number next to the -j flag. Without a number, it will use as many threads as parallelizable build targets, which might fill the memory completely and make a system crash.

Hi @Makis, have you pulled the main Gismo? We couldn't replicate the issue (on both MacOS and Ubuntu).

Crazy-Rich-Meghan avatar Oct 17 '25 09:10 Crazy-Rich-Meghan