How to run a project in linux with OGS6.4.3 with python binding?

hi there,

I would need to use OGS6.4.3 on a linux cluster. Unfortunately with pip3 install ogs I cannot use python boundary conditions. So I decided to download the source code and compile it. Unfortunalely after compiling the code in the bin folder there is no ogs.exe.

(base) cd bin
(base) ls
OpenGeoSysCND.xsd OpenGeoSysGLI.xsd OpenGeoSysNum.xsd OpenGeoSysProject.xsd OpenGeoSysSTN.xsd

Can anyone tell me how to run a project (example.prj) or if I did something wrong in compiling the program?

below are the steps i follow to compile OGS

  1. I set up carefully the prerequisites as stated in (Set Up Prerequisites)
  2. I downloaded the source code following the directions in (Get the source code)
  3. I compiled the code getting the following message that makes me assume I was able to compile it successfully:

(base) cmake /home/dica/amanzoni/ogs/ogs -G Ninja -DCMAKE_BUILD_TYPE=Release
– The C compiler identification is GNU 11.2.0
– The CXX compiler identification is GNU 11.2.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /home/dica/amanzoni/miniconda3/bin/x86_64-conda-linux-gnu-cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /home/dica/amanzoni/miniconda3/bin/x86_64-conda-linux-gnu-c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– CPM: adding package cmake-modules@0 (d98828f54f6974717798e63195cfbf08fe2daad0)
– CPM: adding package findmkl_cmake@0 (ee49c4f973f66bb7bfd644658d14e43459f557fa)
– CPM: adding package json-cmake@0 (9708cb091f6b89b94d71ae98f8b9e68ea04c47dd)
– Found Git: /home/dica/amanzoni/miniconda3/bin/git (found version “2.34.1”)
– OGS VERSION: 6.4.3-414-gd131d9993 (reported by git)
– Found Python: /home/dica/amanzoni/miniconda3/bin/python3.9 (found suitable version “3.9.12”, required range is “3.6…<3.12”) found components: Interpreter Development.Embed Development.Module
– Using GNU gold linker. (GNU gold (Anaconda binutils 2.38) 1.16
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
)
– Number of (logical) cores: 40, Free memory: 175239 MB
– Job pool light_tasks using 40 cores.
– Job pool heavy_tasks using 29 cores.
– Found Doxygen: /usr/bin/doxygen (found version “1.8.5”) found components: doxygen missing components: dot
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found TIFF: /home/dica/amanzoni/miniconda3/lib/libtiff.so (found version “4.4.0”)
– Found GEOTIFF: /home/dica/amanzoni/miniconda3/lib/libgeotiff.so
– Found OpenMP_C: -fopenmp (found version “4.5”)
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”) found components: C CXX
– Looking for sgemm_
– Looking for sgemm_ - not found
– Looking for sgemm_
– Looking for sgemm_ - found
– Found BLAS: /home/dica/amanzoni/miniconda3/lib/libblis.so
– Looking for cheev_
– Looking for cheev_ - not found
– Looking for cheev_
– Looking for cheev_ - not found
– Looking for cheev_
– Looking for cheev_ - found
– Found LAPACK: /home/dica/amanzoni/miniconda3/lib/liblapack.so;/home/dica/amanzoni/miniconda3/lib/libblis.so
– Found ZLIB: /home/dica/amanzoni/miniconda3/lib/libz.so (found version “1.2.13”)
– HDF5 C compiler wrapper is unable to compile a minimal HDF5 program.
– Found HDF5: /home/dica/amanzoni/miniconda3/lib/libhdf5.so (found suitable version “1.12.1”, minimum required is “1.12.1”)
– ┌─ Dependencies.cmake
– │ CPM: adding package googletest@1.11.0 (8d51dc50eb7e7698427fed81b85edad0e032112e)
– │ Found Python: /home/dica/amanzoni/miniconda3/bin/python3.9 (found version “3.9.12”) found components: Interpreter
– │ CPM: adding package autocheck@0 (e388ecbb31c49fc2724c8d0436da313b6edca7fd)
– │ CPM: adding package spdlog@1.10.0 (v1.10.0)
– │ Build spdlog: 1.10.0
– │ Build type: Release
– │ CPM: adding package tclap@1.2.4 (098dd0fe07a31618f3c2a9f8727bb01c8c5d61e2)
– │ CPM: adding package tetgen@0 (603ba181ebfaed38eec88532720e282606009b73)
– │ CPM: adding package pybind11@2.10.0 (v2.10.0)
– │ pybind11 v2.10.0
– │ Performing Test HAS_FLTO
– │ Performing Test HAS_FLTO - Success
– │ CPM: adding package iphreeqc@0 (b1047d3eb03e7ef1b850231be35acb9c6a2cf345)
– │ CPM: adding package Eigen3@0 (9441d94dccccd5db8d64179516fdc5b53994a047)
– │ CPM: adding package Boost@1.69.0 (1.69.0)
– │ CPM: using local package LibXml2@2.9.12
– │ CPM: adding package xmlpatch@0.4.2 (v0.4.2)
– │ Found LibXml2: /home/dica/amanzoni/miniconda3/lib/libxml2.so (found version “2.9.14”)
– │ CPM: adding package nlohmann_json@3.6.1 (3.6.1)
– │ FINDING VTK: IOXML;IOLegacy;FiltersParallel;FiltersGeneral;FiltersSources
– │ Found Eigen3: /home/dica/amanzoni/miniconda3/include/eigen3 (found version “3.4.0”)
– │ Found EXPAT: /home/dica/amanzoni/miniconda3/lib/libexpat.so (found version “2.4.9”)
– │ Found double-conversion: /home/dica/amanzoni/miniconda3/lib/libdouble-conversion.so
– │ Found LZ4: /home/dica/amanzoni/miniconda3/lib/liblz4.so (found version “1.9.3”)
– │ Found LZMA: /home/dica/amanzoni/miniconda3/lib/liblzma.so (found version “5.2.6”)
– │ Found utf8cpp: /home/dica/amanzoni/miniconda3/include
– │ CPM: adding package exprtk@0 (2a5c62b93c9661470e69be572f22d821308b6f61)
– │ CPM: adding package range-v3@0.12.0 (0.12.0)
– │ [range-v3]: C++ std=2a
– │ Performing Test RANGES_HAS_CXXSTD
– │ Performing Test RANGES_HAS_CXXSTD - Success
– │ Performing Test RANGES_HAS_WALL
– │ Performing Test RANGES_HAS_WALL - Success
– │ Performing Test RANGES_HAS_WEXTRA
– │ Performing Test RANGES_HAS_WEXTRA - Success
– │ Performing Test RANGES_HAS_WERROR
– │ Performing Test RANGES_HAS_WERROR - Success
– │ Performing Test RANGES_HAS_FDIAGNOSTIC_SHOW_TEMPLATE_TREE
– │ Performing Test RANGES_HAS_FDIAGNOSTIC_SHOW_TEMPLATE_TREE - Success
– │ Performing Test RANGES_HAS_FTEMPLATE_BACKTRACE_LIMIT
– │ Performing Test RANGES_HAS_FTEMPLATE_BACKTRACE_LIMIT - Success
– │ Performing Test RANGES_HAS_FMACRO_BACKTRACE_LIMIT
– │ Performing Test RANGES_HAS_FMACRO_BACKTRACE_LIMIT - Failed
– │ Performing Test RANGES_HAS_OMIT_FRAME_POINTER
– │ Performing Test RANGES_HAS_OMIT_FRAME_POINTER - Success
– │ Performing Test RANGES_HAS_OFAST
– │ Performing Test RANGES_HAS_OFAST - Success
– │ Performing Test RANGES_HAS_STRICT_ALIASING
– │ Performing Test RANGES_HAS_STRICT_ALIASING - Success
– │ Performing Test RANGES_HAS_STRICT_VTABLE_POINTERS
– │ Performing Test RANGES_HAS_STRICT_VTABLE_POINTERS - Failed
– │ Performing Test RANGES_HAS_FAST_MATH
– │ Performing Test RANGES_HAS_FAST_MATH - Success
– │ Performing Test RANGES_HAS_VECTORIZE
– │ Performing Test RANGES_HAS_VECTORIZE - Failed
– │ Performing Test RANGES_HAS_SIZED_DEALLOCATION
– │ Performing Test RANGES_HAS_SIZED_DEALLOCATION - Success
– │ Performing Test RANGES_HAS_MARCH_NATIVE
– │ Performing Test RANGES_HAS_MARCH_NATIVE - Success
– │ Performing Test RANGES_HAS_MTUNE_NATIVE
– │ Performing Test RANGES_HAS_MTUNE_NATIVE - Success
– │ Performing Test RANGE_V3_ALIGNED_NEW_PROBE
– │ Performing Test RANGE_V3_ALIGNED_NEW_PROBE - Success
– │ Performing Test RANGE_V3_HAS_FCONCEPTS
– │ Performing Test RANGE_V3_HAS_FCONCEPTS - Success
– │ CPM: adding package boost_mp11@1.79.0 (boost-1.79.0)
– │ CPM: adding package vtkdiff@0 (788100291f73e472febf7e5550eea36ec4be518b)
– │ Downloading CPM.cmake to /home/dica/amanzoni/ogs/build/release/cmake/CPM_0.32.1.cmake
– │ CPM: adding package xdmf@3.0.0 (92a851f1acb87ad5367eb62f9b97785bedb700bb)
– │ HDF5 C compiler wrapper is unable to compile a minimal HDF5 program.
– │ Found HDF5: /home/dica/amanzoni/miniconda3/lib/libhdf5.so (found version “1.12.1”)
– │ Performing Test HAVE_BOOST_SHARED_DYNAMIC_CAST
– │ Performing Test HAVE_BOOST_SHARED_DYNAMIC_CAST - Failed
– │ CPM: adding package GroupSourcesByFolder.cmake@1.0 (v1.0)
– │ CPM: adding package metis@5.1.0 (6596bee9cb316455df9ae4192df13d3ee7a73805)
– │ The METIS package is copyrighted by the Regents of the University of Minnesota.Please read the license of the METIS package carefully before you use METIS.
– │ Looking for execinfo.h
– │ Looking for execinfo.h - found
– │ Looking for getline
– │ Looking for getline - found
– │ checking for thread-local storage - found
– │ CPM: adding package CPMLicenses.cmake@0.0.5 (v0.0.5)
– └─ End Dependencies.cmake
– Installing: /home/dica/amanzoni/ogs/build/release/lib64/libpython3.9.so
– Installing: /home/dica/amanzoni/ogs/build/release/lib64/libpython3.9.so.1.0
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
– Performing Test COMPILER_HAS_DEPRECATED_ATTR
– Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
– Warning: Benchmark HydroMechanics_GroundEquilibriumPython requires these Python packages: numpy!
Make sure to have them installed in your current Python environment OR set OGS_USE_PIP=ON!
– Warning: Benchmark HydroMechanics_GroundEquilibriumQuadBCuPython requires these Python packages: numpy!
Make sure to have them installed in your current Python environment OR set OGS_USE_PIP=ON!
– The following packages have been found:

  • Doxygen
  • GEOTIFF
  • OpenMP
  • BLAS
  • LAPACK
  • Python
  • Eigen3
  • Threads
  • TIFF
  • Boost
  • HDF5
  • LibXml2

– The following features have been enabled:

  • OGS, The OGS simulator (OGS_BUILD_CLI)
  • Utilities, Command line tools (OGS_BUILD_UTILS)
  • Python-interface, Python boundary conditions and source terms (OGS_USE_PYTHON)
  • Tests, Unit and benchmarks tests (OGS_BUILD_TESTING)
  • build-unity, Unity build (OGS_USE_UNITY_BUILDS)

– All processes have been enabled.

– Configuring done
– Generating done
– Build files have been written to: /home/dica/amanzoni/ogs/build/release

Thanks for any suggestions!
Cheers,
Andrea

You need to run ninja in the above folder. Running cmake just configures the project, ninja will compile it.

But you could also try to use the latest pip ogs package (which also has the Python boundary conditions):

pip install --extra-index-url https://gitlab.opengeosys.org/api/v4/projects/120/packages/pypi/simple ogs 

The pip package on the official PyPI repository is updated on ogs releases only.

Dear Bilke,
many thanks for your quick response. I was able to compile the code and use OGS on linux with python boundary conditions.
Cheers,
Andrea