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

Dear All, 

I get the following error when runing make in openCARP (at the moment without carputils), even though I included petcs in the path.

export PETSC_DIR=/Users/fchegini/install/petsc

export PATH="/Users/fchegini/install/petsc/bin:$PATH"

Do u have any suggestions on how to solve this issue?

what I run:

cmake -S. -B_build -DDLOPEN=ON -DCMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=llvm-gcc -D CMAKE_CXX_COMPILER=llvm-g++

cmake --build _build

cd _build/bin

So I could see in _build/bin all the exec files 

 bench igbapd igbdft igbextract igbhead igbops mesher openCARP

Now when I run make in openCARP, I have  the following error:

I appreciate any help/suggestion.

best,

Fatemeh

....

ld: warning: could not create compact unwind for _zupmtr_: registers 27 and 28 not saved contiguously in frame

  "void SF::init_vector_petsc<int, double>(SF::abstract_vector<int, double>**)", referenced from:

      void SF::init_vector<int, double>(SF::abstract_vector<int, double>**, int, int, int, SF::abstract_vector<int, double>::ltype) in bench.o

      void SF::init_vector<int, double>(SF::abstract_vector<int, double>**, SF::abstract_vector<int, double>*) in bench.o

      void SF::init_vector<int, double>(SF::abstract_vector<int, double>**, SF::abstract_vector<int, double>*) in liblimpet.opt.a(MULTI_ION_IF.o)

  "opencarp::initialize_PETSc(int*, char**, char*, char*)", referenced from:

      _main in bench.o

ld: symbol(s) not found for architecture arm64

clang-15: error: linker command failed with exit code 1 (use -v to see invocation)

make[1]: *** [Makefile:101: bench] Error 1

1 Answer

+1 vote
by (17.4k points)

Hi,

I just double checked on a fresh clone. The commands from the installation instructions work for me on an M1 machine:

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

cmake --build _build

These are environment variables I think are relevant:

PATH=/opt/petsc/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/opt/llvm/bin

HOMEBREW_PREFIX=/opt/homebrew

HOMEBREW_CELLAR=/opt/homebrew/Cellar

HOMEBREW_REPOSITORY=/opt/homebrew

PETSC_DIR=/opt/petsc

PETSC_ARCH=arch-darwin-c-opt

LDFLAGS=-L/opt/homebrew/opt/llvm/lib

HDF5_DIR=/opt/homebrew

by (150 points)
Thank you so much; I will check the setting, and will let you know.
by (150 points)
I am able to run upto here cmake --build _build
but after that, can you run make on opencarp folder?
by (17.4k points)
No need to do that
  cmake --build _build
does all the compilation work. If you also want to install the generated binaries, you can run
  cmake --build _build --target install

If you run make in the openCARP folder, you are not using the CMake-based compilation workflow but the raw makefile ( https://opencarp.org/download/installation#building-using-cmake vs. https://opencarp.org/download/installation#building-using-the-makefile )
by (150 points)
Thank you Axel,

Great! The only thing if we compile with cmake, then how to compile the file in /fem/slimfem/

In Readme located in fem/slimfem says we should run make and make test_integrators, which doesn't work, perhaps we need to have some updates.
by (17.4k points)
Those files are not covered by the CMake build process. They could be added but at first glance it seems that they are not up to date anyway.

If you want to compile these files, you can either use the make-based workflow https://opencarp.org/download/installation#building-using-the-makefile from the beginning or add these files to CMake. My feeling is that also the code needs updates though after the abstraction of the matrix and vector classes.
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
...