First time here? Checkout the FAQ!
x
0 votes
by (220 points)

Hi,

I'm trying to install openCARP from sources on an HPC, following the guidelines to build from the sources. 

I first loaded all the modules required:

module load tools/dev
module load PETSc/3.17.4-foss-2022a
module load sundials/2.7.0
module load Python/3.10.4-GCCcore-11.3.0

Then, I compiled gengetopt; then I configured with cmake:

cmake -S. -B_build -DDLOPEN=ON -DCMAKE_BUILD_TYPE=Release

when I tried to build openCARP (cmake --build _build ), I experienced the
following error (I'm reporting the 1st line only):

     |                                                           ^~~~~~~
/rds/general/user/ccorrad1/home/Codes/openCARP/_build/physics/limpet/cmdline.cc: In function ‘char* get_multiple_arg_token(const char*)’:
/rds/general/user/ccorrad1/home/Codes/openCARP/_build/physics/limpet/cmdline.cc:1175:16: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
 1175 |   tok = strchr (arg, ',');
      |         ~~~~~~~^~~~~~~~~~
      |                |
      |                const char*



What is generating this error? What should I to to sort this out?

Thanks,
Cesare

1 Answer

0 votes
by (17.5k points)

Hi Cesare,

Your question fell into the middle of vacation period, sorry for the long wait.

It seems to be a compiler compatibility issue. Which compiler are you using?

I had to add the module to load for the compiler to $HOME/.spack/linux/compilers.yaml to make it work for me. (GCC 10.2.0) For details, see here: https://opencarp.org/download/installation#install-the-opencarp-spack-package

As a side note: I see you load CMake and PETSc as modules. spack will install all dependencies (CMake, PETSc etc.) if you don't tell it to use external packages provided by the system or loaded as a module. Details are described here: https://opencarp.org/download/installation#using-external-packages-with-spack

by (220 points)
Hi Axel,
On the HPC, I was using gcc 11.3.0 as the compiler and following the procedure to build from sources (https://opencarp.org/download/installation#building-from-source).

Today I tried spack, however, this generated a high load and degraded the service, so my installation had been killed by the IT staff.


Is there a way to either make spack installation lighter or compile the code from sources?

Regards,

Cesare
by (17.5k points)
There should be multiple options:

- Submit a job with the spack command rather than running it on the login node. With a single process, compiling everything took a few hours on my machine. On a full small node, it should be done quite quickly.
- Instruct spack where to find external packages (e.g. PETSc loaded as a module, CMake etc.) so the installation isn't that heavy https://spack.readthedocs.io/en/stable/build_settings.html#external-packages
- When compiling manually from sources, using a compatible compiler such as GCC 10.2
- Fixing the problem in the code. It seems to be about const correctness. You can open an issue for this: https://git.opencarp.org/openCARP/openCARP/-/issues You can propose a fix yourself or we can have a look at it but it might take a bit
by (17.5k points)
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...