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

Hi,

I am attempting to install opencarp on my ubuntu machine, but it is leading to an error when I try to run the following line:

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

The above line leads to this error:

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  PETSc could not be found.  Be sure to set PETSC_DIR.  (missing:
  PETSC_FOUND)

I have installed PETSc in /home/silvalab/Desktop/petsc/petsc and have created a PETSC_DIR environmental variable in etc/enviornment by adding the line
PETSC_DIR= "/home/silvalab/Desktop/petsc/petsc"
to the environment file as well as even the .profile file which some internet sources said was a way to add environment variables to ubuntu. I made sure to even restart the computer after modifying either file each time to get the environment variables setup correctly, but I am still receiving the same error. Am I setting PETSC_DIR as an environmental variable in ubuntu improperly?

1 Answer

0 votes
by (3.6k points)
Hi,

Could you please type in the terminal the command env? Please paste the output in here so we can have a more detailed information on how your environment variables are configure.

Cheers,

Jorge
by (260 points)
PETSC_DIR=/home/silvalab/Desktop/petsc/petsc
 
That is the path it is showing me when I type the command env. This result leads to my confusion even more because it seems to be the right env path. Let me know if you have any additional suggestions.
by (3.6k points)
Hi,

You should have 2 environment variables which are related to you PETSC installation. When you finish your PETSC installation these 2 variables PETSC_DIR and PETSC_ARCH are shown with the path relative to your installation.

Cheers,

Jorge
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
MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], config: ["MMLorHTML.js"], jax: ["input/TeX"], processEscapes: true } }); MathJax.Hub.Config({ "HTML-CSS": { linebreaks: { automatic: true } } });
...