Container with both petsc and tespy

I am looking for a way to run my coupled ogs-tespy project where we have a system of interconnected boreholes with a parallel solver to speed up the calculations. The official containers does not seem to support the need callback functionality required to interface between tespy and ogs, We have tried to compile from source also but stumble into problems, seems like we need the OGS_BUILD_WHEEL option but then we get the error:
Missing in Pythons binaries_list: [‘binaryToPVTU’]
CMake Error at CMakeLists.txt:248 (message):
Binary list comparison failed. Please update binaries_list in
provide_ogs_cli_tools_via_wheel.py!

Anyone have a proven method to have:

  • petsc
  • python callback ( import ogs.callback)
  • tespy

Dear Einsor,

really nice that you use the feature of coupling ogs with tespy. In the current version of ogs, the Heat-Transport-BHE process did not support the parallelization with petsc. During the last year, we have implemented some settings to speed up the calculation of the BHE process. First of all, you can use the option use_algebraic_bc OGS: [tag] use_algebraic_bc

Please check carefully, if your equation system is linear - if so, the linear option is valid and allows a faster calculation: OGS: [tag] linear

If you activate the use_algebraic_bc, I recommend to use solver_type the LeastSquareCG and the precon_type LeastSquareDIAGONAL. With the environment variable OMP_NUM_THREADS you can control, how many cores are used from the linear solver - be careful, from my experience only large models show a speed up in calculation with more cores.

Please let me know, if it helps or if you problems to use this advanced options.

Best regards,
Max

PETSc is not supported when building wheels. But regular PETSc builds (either from source or by downloading and using a pre-built container) can use the Python interfaces.