Code Monkey home page Code Monkey logo

Comments (65)

bobmyhill avatar bobmyhill commented on July 29, 2024 1

Hi @KiralyAgi,

I've just successfully installed deal.II and ASPECT on the Apple M1 Pro, Ventura 13.1 (22C65)

Result:


-- This is ASPECT, the Advanced Solver for Problems in Earth's ConvecTion.
-- . version 2.5.0-pre (field_types_for_elasticity_2, 9234dde4e)
-- . using deal.II 9.4.0
-- . with 32 bit indices and vectorization level 0 (64 bits)
-- . using Trilinos 12.18.1
-- . using p4est 2.3.2
-- . running in DEBUG mode
-- . running with 8 MPI processes

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024 1

Hi @KiralyAgi

Ok, a few ideas:

  • Did you delete the trilinos-x and tmp directories inside the dealii-candi directory before retrying your installation?
  • For me, mpicc, mpicxx and mpifort are linked from /opt/homebrew/bin/. I think your files in usr/local/bin are probably symlinks though (maybe worth checking).
  • For what it's worth, my bashrc exports are:

    export CC=mpicc
    export CXX=mpicxx
    export FC=mpifort
    export FF=mpifort
    export OMPI_CC=gcc
    export OMPI_CXX=g++
    export OMPI_FC=gfortran

  • Maybe worth also checking which compilers you're using (see below for mine).
  • If you haven't updated Command Line Tools recently, it might be worth doing that (tedious though it is): https://stackoverflow.com/a/47725718/6272561

$ mpicc -v
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ mpicxx -v
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ mpifort -v
Using built-in specs.
COLLECT_GCC=/opt/homebrew/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/12.2.0/bin/../libexec/gcc/aarch64-apple-darwin21/12/lto-wrapper
Target: aarch64-apple-darwin21
Configured with: ../configure --prefix=/opt/homebrew/opt/gcc --libdir=/opt/homebrew/opt/gcc/lib/gcc/current --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-12 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion='Homebrew GCC 12.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --with-system-zlib --build=aarch64-apple-darwin21 --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Homebrew GCC 12.2.0)

from candi.

Francyrad avatar Francyrad commented on July 29, 2024 1

I finally did it! I had a lot of problems with the libraries, some things were running on clang 11, some other thongs on 15. So i just had to reinstall few things and the game is done.

For the next time:

export CC="/opt/homebrew/bin/mpicc"
export CXX="/opt/homebrew/bin/mpicxx"
export FC="/opt/homebrew/bin/mpifort"
export FF="/opt/homebrew/bin/mpifort"
export OMPI_CC="/usr/bin/clang"
export OMPI_CXX="/usr/bin/clang++"
export OMPI_FC="/opt/homebrew/bin/gfortran-12"
export LDFLAGS="-L/System/Volumes/Data/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/13 -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/bzip2/lib -L/opt/homebrew/lib -Wl,-ld_classic"

Be sure to have installed all the libraries like zlib and bzip 2

Be sure that all the exports (clang, mpicc etc.) are running on the latest version of CLANG (the 15 when i'm writing). So be sure that the exports are linked to the version of 15 of clang, because some of them may be linked to older version.

I had no problems on installing OpenBlas, Lapack and native optimization.

I ask also, what does 64 bit computation does?

from candi.

tjhei avatar tjhei commented on July 29, 2024 1

Would you mind checking #350 ?

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

Thank you, I'll follow the resolution problem

from candi.

tjhei avatar tjhei commented on July 29, 2024

Going back to v9.4.0-r2 fixes the issue:

git checkout v9.4.0-r2

It is not because of the update to 13.2, but related to explicit instantiations, I think.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

Dear tkhei

This solution doesn't work. I installed trilinos positively. However, i cannot install dealii now! This is not the only problem, i cannot install many packages that i need to run the program that i want to install (Aspect).
The aspect's developers recommend:

deal.II 9.3 or newer configured with:
MPI, Trilinos, p4est (required)
BLAS/LAPACK, zlib (strongly recommended)
HDF5 (optional)
optional: PerpleX, LIBDAP, NETCDF

I could not install blas, lapack and dealii with 9.4

Do you have any solution for this? For example, installing trilinos with 9.4 and other packages with newer versions, i don't even know if this is possible...

Thank you for your work, I’m waiting for new news

from candi.

tjhei avatar tjhei commented on July 29, 2024

This solution doesn't work. I installed trilinos positively. However, i cannot install dealii now!

I can confirm that deal.II and ASPECT work for me with my suggestion. Please try removing everything from the output directory and run again. If it still fails, send the precise error message.

i cannot install many packages that i need to run the program that i want to install

You just need "p4est trilinos deal.II" from candi as described here: https://github.com/geodynamics/aspect/wiki/Installation-on-ARM-OSX

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

It cannot build dealii now, i attach you the error...

Schermata 2022-10-31 alle 16 41 58

[dealii_9.4_error.txt](https://github.com/dealii/candi/files/9902606/dealii_9.4_error.txt)

I apologize for the inconvenience. I deleted everything the installer tried to install previously...
I hope you can solve

from candi.

tjhei avatar tjhei commented on July 29, 2024

The error you are seeing is due to hdf5. Try installing without hdf5 for now.

from candi.

tjhei avatar tjhei commented on July 29, 2024

Trilinos 12.4 and 13.2 are broken with explicit instantiations enabled on ARM.

hdf5 causes a problem when compiling deal.II.

from candi.

NikkiGwh avatar NikkiGwh commented on July 29, 2024

hi @tjhei I am facing exactly the same problem with my new M1 Pro mac (I starting to regret my choice..)
After following your instructions to switch to branch "v9.4.0-r2" and invoking the installation script with:
sudo ./candi.sh -j 8 --packages="p4est trilinos dealii" (without hdf5) I still get following errors:
It seems like there are some issues with "boost"..

image

Anyway, if you have a solution for this problem let us know.

kind regards
Niklas

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

@nikkighw
I solved in this way months ago (with 9.4):

git clone https://github.com/dealii/candi
cd candi
./candi.sh -j 8 --packages="p4est trilinos dealii"

I installed hdf5 in other ways.

from candi.

tjhei avatar tjhei commented on July 29, 2024

@NikkiGwh : Can you set BUILD_EXAMPLES=OFF in candi.cfg?

from candi.

NikkiGwh avatar NikkiGwh commented on July 29, 2024

@tjhei thank you for your quick response !

the build finished successfully with turning BUILD_EXAMPLES=OFF. I used branch [v9.4.0-r2] (to avoid the trilions 13.2 error) and I didn't install hdf5. Since the example were not able to build.. do you know which features I can't use with my current installation?

@Francyrad So you were able to build it from the normal main branch without switching to [v9.4.0-r2] ? How did you fix the trillions 13.2 error then?

And could you tell me how you installed hdf5 separately (using brew or build manually etc.) and what kind of configuration you had to do so that candi was able to find this installation (cmake configuration or adding stuff to path variable etc.)

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

Maybe I explained it wrong. I installed version 9.4, which is enough to use the program of my interest.
As for hdf5, I installed it with "brew install hdf5".
I don’t remember doing other things in particular, since I solved the problem as Thjei suggested.

from candi.

KiralyAgi avatar KiralyAgi commented on July 29, 2024

Hi Timo (@tjhei)!

As I mentioned in issue #316, I am now facing problems with the trilinos installation too. I looked over the suggestions here, but none of the problems seems the same as mine (see below) and none of the solution helps.

Here is the error:
ld: warning: ignoring file /opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12/libgcc.a,
building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"_VerifyFortran", referenced from:
_main in main.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [VerifyFortranC] Error 1
make[2]: *** [CMakeFiles/VerifyFortranC.dir/all] Error 2
make[1]: *** [CMakeFiles/VerifyFortranC.dir/rule] Error 2
make: *** [VerifyFortranC] Error 2

Is there a way to get around this? I use the mpicc, mpicxx and mpifort from my /usr/local/bin folder (i.e. not the homebrew installations), because that was working for the hdf5 and p4est installation.
Update: I get the same error also with the homebrew link to mpi.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

What version of MacOS do you have? If you upgraded to MacOS Ventura you may face problems, because it doesn't full support Fortran

from candi.

KiralyAgi avatar KiralyAgi commented on July 29, 2024

Indeed, I updated to Ventura 13.1.
Is there a way to get around this problem?

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

The problem may be MacOS Ventura, but I'm not sure. Can you please do a make clean, make again any then post there the full error with a .txt?

If the problem is Ventura, you should downgrade in a non easy process. The best would be to use Time Machine if you did a backup

from candi.

KiralyAgi avatar KiralyAgi commented on July 29, 2024

CMakeError.log
Here is the error file. I wasn't sure how(&where) to do make clean, but after clearing the tmp folder, I tried again to install trilinos via candi, with the same error.

from candi.

tjhei avatar tjhei commented on July 29, 2024

Agi: Are you running in a native terminal? What does machine return when you run it in the terminal?

Also, what does git show -q and git diff show?

from candi.

KiralyAgi avatar KiralyAgi commented on July 29, 2024

I think so:
(base) kiraly@Agness-MacBook-Pro ~ % machine
arm64e
(base) kiraly@Agness-MacBook-Pro ~ % git show -q
fatal: not a git repository (or any of the parent directories): .git
(base) kiraly@Agness-MacBook-Pro ~ % cd /Applications/candi
(base) kiraly@Agness-MacBook-Pro candi % machine
arm64e
(base) kiraly@Agness-MacBook-Pro candi % git show -q
commit 438b4a1 (HEAD, tag: v9.4.0-r2)
Author: Timo Heister [email protected]
Date: Sat Jul 2 13:08:58 2022 -0400

version 9.4.0-r2

(base) kiraly@Agness-MacBook-Pro candi % git diff
diff --git a/candi.cfg b/candi.cfg
index 2638bcd..487ad5b 100644
--- a/candi.cfg
+++ b/candi.cfg
@@ -37,7 +37,7 @@ NATIVE_OPTIMIZATIONS=OFF
USE_64_BIT_INDICES=OFF

Option {ON|OFF}: Enable building of dealii examples?

-BUILD_EXAMPLES=ON
+BUILD_EXAMPLES=OFF

Option {ON|OFF}: Unset CXX and set the compiler as MPI_CXX_COMPILER when configuring deal.II

//NOTE: I also tried the installation on the dealii-9.4 branch with the same results.

from candi.

KiralyAgi avatar KiralyAgi commented on July 29, 2024

Hi Bob!

I tried many times and the hdf5 and p4est installation goes through if I export mpicc, mpicxx, FC and FF from my usr/local/bin. But whatever I do I always get problem with trilinos, which seems to try building for architecture x86_64 instead of arm64e.

from candi.

emcgowen avatar emcgowen commented on July 29, 2024

Hi @bobmyhill

This method with branch "v9.4.0-r2" works for me to build deal.II but not ASPECT. I used the compiler exports requested by the messages when you start candi.sh.

I've just successfully installed deal.II and ASPECT on the Apple M1 Pro, Ventura 13.1 (22C65)

Using this method I have been able to build Deal.II on an M1 Mac running Ventura 13.2, but step-32 does not run successfully (it aborts with a timeout).

Also Aspect fails to build with the same compiler exports as I used to run candi.sh:
CC=mpicc
CXX=mpicxx
FC=mpifort
FF=mpifort
OMPI_CXX=g++-11
OMPI_FC=gfortran-11

mpicc -v
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

mpicxx -v
Using built-in specs.
COLLECT_GCC=/opt/homebrew/bin/g++-11
COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/aarch64-apple-darwin22/11/lto-wrapper
Target: aarch64-apple-darwin22
Configured with: ../configure --prefix=/opt/homebrew/opt/gcc@11 --libdir=/opt/homebrew/opt/gcc@11/lib/gcc/11 --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-11 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion='Homebrew GCC 11.3.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --build=aarch64-apple-darwin22 --with-system-zlib --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Homebrew GCC 11.3.0)

After compiling the WorldBuilder files, the Unity files give compiler errors that gcc-11 does not recognize the flag -Xarch-arm64:

[58%] Building CXX object CMakeFiles/aspect.dir/contrib/world_builder/source/wrapper_c.cc.o
[ 64%] Building CXX object CMakeFiles/aspect.dir/contrib/world_builder/source/wrapper_cpp.cc.o
[ 64%] Building CXX object CMakeFiles/aspect.dir/contrib/world_builder/source/parameters.cc.o
[ 64%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_39_cxx.cxx.o
[ 64%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_38_cxx.cxx.o
[ 64%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_36_cxx.cxx.o
[ 64%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_42_cxx.cxx.o
[ 64%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_35_cxx.cxx.o
[ 70%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_37_cxx.cxx.o
[ 70%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_41_cxx.cxx.o
[ 70%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_40_cxx.cxx.o
g++-11: error: unrecognized command-line option '-Xarch_arm64'
g++-11: error: unrecognized command-line option '-Xarch_arm64'
g++-11: error: unrecognized command-line option '-Xarch_arm64'
g++-11: error: unrecognized command-line option '-Xarch_arm64'
g++-11: error: unrecognized command-line option '-Xarch_arm64'
make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_40_cxx.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_41_cxx.cxx.o] Error 1

Perhaps the wrong compiler is being invoked for these files? The mpicxx compiler is g++-11, and I've tried passing the Apple Clang compiler for mpicxx, but then I get syntax errors from the worldbuilder files.

Also, the ASPECT source was checked out with:
git clone https://github.com/geodynamics/aspect.git
Is this a stable version or a development version?

In case this was a problem only with top-of-trunk, I tried building ASPECT with the aspect-2.4.0.tar release and got the exact same compiler errors as before.

Thanks

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Hi @emcgowen

Just to check my instructions still work, I updated my M1 Macbook to Ventura 13.2, deleted and reinstalled xcode CLT (https://stackoverflow.com/a/47804075/6272561) and then deleted and reinstalled deal.II and ASPECT as per the instructions in my original post. Everything still works fine.

Some output before I reinstalled deal.II:

$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 14.2.0.0.1.1668646533

$mpicxx -v
Apple clang version 14.0.0 (clang-1400.0.29.202)

From what you've written, the mpicxx alias does not point to clang, as recommended in the instructions linked to in my original post (https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX). You should make sure that mpicxx points to the right compiler, then delete your deal.II installation (probably ~/dealii-candi/ if you didn't change the destination in candi.cfg), and try again.

from candi.

emcgowen avatar emcgowen commented on July 29, 2024

from candi.

tjhei avatar tjhei commented on July 29, 2024

brew --cc=clang install openmpi

Thank you, I updated the instructions at https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Glad it worked! Thank you for the additional information, that's very useful. And thanks again @tjhei for all your work on this problem.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

Hello. I needed to reinstall Dealii to make aspect workwith Ventura 13.1. So i downloaded the version you said above. Then
./candi.sh -j 8 --packages="p4est trilinos dealii"
It install p4est and trillnos, but not dealii. This is the error. How can i solve? Thank you for your support

Screenshot 2023-02-06 alle 01 48 09

from candi.

tjhei avatar tjhei commented on July 29, 2024

You are not showing the error message, can you post errors higher up?

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

candierror2.txt
Sure!

from candi.

tjhei avatar tjhei commented on July 29, 2024
/Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.4.0/source/lac/sparse_direct.cc:104:14: error: non-const lvalue reference to type 'vector<long, allocator<long>>' cannot bind to a value of unrelated type 'vector<types::suitesparse_index, allocator<long long>>'

This error is fixed in dealii/dealii#14721 but is not in the latest deal.II version 9.4.1 yet. You could set
DEAL_II_VERSION=dealii-9.4 in your candi.cfg to get the fix (or switch to master or wait for 9.4.2)

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

I was already using the 9.4 error. i tried to install the master of the version 9.4. i cannot install trilinos now. What can i do?
trilinos.error.txt

from candi.

tjhei avatar tjhei commented on July 29, 2024

I was already using the 9.4 error. i tried to install the master of the version 9.4.

I don't understand what you are saying.

We just released 9.4.2, so you should be able to do DEAL_II_VERSION=v9.4.2 now.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

I downloaded the new version 9.4.2 and i still get errors :(
errorrr.txt

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

If you have a Mac with an M1 chip (maybe also M2, I haven't tested this) running Ventura 13.1, our instructions should work. It is possible that you have some independently installed dependencies that are interfering with the installation, or that you're using some incompatible version of clang / command line tools.

If you are happy using deal.ii 9.4.0, I recommend that you use candi v9.4.0-r2 unmodified, and with our instructions, just because it's then easier for us to troubleshoot your problems. (@tjhei's suggestion was good, but it didn't fix your problem, so I'd rather you go back to something we know works on our machines).

I also recommend that you remove your brew-installed version of hdf5, as it doesn't have MPI support. candi v9.4.0-r2 installs hdf5 just fine on my machine. If it still doesn't install correctly on yours following these instructions - https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX - let us know, along with the verbose information on your compilers and version of command line tools. I'd rather get your machine to a state close to ours rather than find an independent set of workarounds and hacks.

from candi.

KiralyAgi avatar KiralyAgi commented on July 29, 2024

Finally I made it!
Thanks for all the suggestions. Afterall a slightly different method has worked for me.

  1. Remove and re-install X-code
  2. Remove and re-install brew (might not be important)
    Now here before I went to brew install openmpi and others I checked, that I already have all of these.
    $ mpicxx -v
    Apple clang version 14.0.0 (clang-1400.0.29.202)
    Target: x86_64-apple-darwin22.3.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin

So, I tried to install the released 9.4.0 package without the brew install and it worked like a charm.

_Here is what I think happens: If I install openmpi and gcc11 with brew (even with cc=clang, that brew developers obviously don't like) then I have everything in 2 places
$ where mpicxx
/usr/local/bin/mpicxx
/opt/homebrew/bin/brew/mpicxx

And this somehow creates problems even if I export all the locations._

Anyway, after this I managed to install ASPECT and run all the tests succesfully.

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Hallelujah :)
Thanks for the info @KiralyAgi. Your hunch sounds plausible to me.

Removing brew sounds a bit excessive, presumably removing the offending package would be enough. Any ideas where /opt/homebrew/bin/brew/mpicxx came from? Did you maybe have mpich on your system and not unlink it before installing open-mpi? (Blind guess; I don't really want to test this). /opt/homebrew/bin/brew is a bash script on my machine, not a directory.

from candi.

tjhei avatar tjhei commented on July 29, 2024

So, I tried to install the released 9.4.0 package without the brew install

You must have gotten an MPI installation at /usr/local/bin/mpicxx from somewhere, though. I wonder how you installed it if not through homebrew?

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

I also have/usr/local/bin/mpicxx, which (on my machine) is a symlink to /opt/homebrew/bin/opal_wrapper, which then calls /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/mpicxx.

from candi.

tjhei avatar tjhei commented on July 29, 2024

Fascinating, they are shipping MPI? I don't have access to my M1 for another week or two and I will look into all of these problems then.

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

I don't think Macs are shipping with MPI - the creation date for the symlink is around when I first installed deal.II. But as for where it came from ... . It hasn't been touched since.

from candi.

KiralyAgi avatar KiralyAgi commented on July 29, 2024

Hallelujah :) Thanks for the info @KiralyAgi. Your hunch sounds plausible to me.

Removing brew sounds a bit excessive, presumably removing the offending package would be enough. Any ideas where /opt/homebrew/bin/brew/mpicxx came from? Did you maybe have mpich on your system and not unlink it before installing open-mpi? (Blind guess; I don't really want to test this). /opt/homebrew/bin/brew is a bash script on my machine, not a directory.

After removing and reinstalling brew I didn't have mpi in homebrew just in my usr/local/bin. And having it only in one location was (I think) the key for me to get everything installed.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

Hello, i still have the problem.
I'm using a macbookPro with M1PRO. I did everything that you said. I followed the guide (that is the same as always) I used the version 6.4 r2. I installed Ventura 13.2, I removed and reinstalled the latest command line. Then:

./candi.sh -j 8 --packages="p4est trilinos dealii"

I didn't install hdf5 because i already it in other ways. With Big Sur that worked. and i installed candi and aspect successfully.

I still cannot install DEALII. With the 9.4.2 I cannot install Trillinos.

This is the error message, i have no idea how to solve the problem. t.t

error_dealii.txt

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

@Francyrad you didn't follow the instructions in my message:

(1) As @emcgowen suggests,

DO NOT export the OMPI_ environment variables unless you intend to build with the GNU C compiler!

Instead:
export CC=mpicc; export CXX=mpicxx, FC=mpifort, FF=mpifort
export OMPI_CC=gcc, export OMPI_CXX=g++, export OMPI_FC=gfortran
where gcc, g++ should also point to clang, as you can confirm via the following command:
gcc -v; g++ -v

(2)

If you are happy using deal.ii 9.4.0, I recommend that you use candi v9.4.0-r2 unmodified

So, not 9.4.2. Let's try to fix one problem at a time.

(3)

I also recommend that you remove your brew-installed version of hdf5, as it doesn't have MPI support.

You can see this in the first error message you posted; the other dependencies don't actually use the brew version of hdf5.
So, remove the brew version and try ./candi.sh -j 8 --packages="hdf5 p4est trilinos dealii"

(4)

If it still doesn't install correctly on your [machine] following these instructions ... let us know, along with the verbose information on your compilers and version of command line tools.

So that means report to us the command line output from the following commands:
mpicxx -v, mpicc -v mpifort -v pkgutil --pkg-info=com.apple.pkg.CLTools_Executables

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Another thought. When you tried to install 9.4.2 you changed your candi branch (according to errorrr.txt). Instead of doing this, use v9.4.0-r2 but just change line 97 in candi.cfg from
DEAL_II_VERSION=v9.4.0
to
DEAL_II_VERSION=v9.4.2
and see whether that fixes your deal.II issue.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

I finally installed it, so thank you for your help!. Now i'll try to install aspect, the point is that i have a lot of doubts:

The only thing that i did is to remove the hdf5 homebrew installation and i used the 9.4.0 -r2 with changing the config to 9.4.2.

Then i did
./candi.sh -j 8 --packages="p4est trilinos dealii"
As i wrote i didn't reinstall HDF5 for a mistake, but i think it did something with hdf5. I release there the installation:

installation.txt

My point is. i can try to reinstall everything with HDF5. But is there another solution? i use the homebrew HDF5 for many programs and i need it. Aspect doesn't need hdf5 to run simulations. May i encounter problems if i reinstall hdf5 with homebrew?
I didn’t really understand the involvement of hdf5 when installing dealii if I didn’t require the installation of the same hdf5. With the old operating system I was able to run the various aspect tests and to have hdf5 installed with homebrew.
Thank you for your support

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Great, glad to hear that editing the line in candi.cfg fixed your problem.

i use the homebrew HDF5 for many programs and i need it

Ah, sorry. I assumed you had installed HDF5 because you wanted it for ASPECT.

Aspect doesn't need hdf5 to run simulations.

True. If you don't want ASPECT to output hdf5 files, there's no problem.

May i encounter problems if i reinstall hdf5 with homebrew?

No, that should be fine. The brew installation wasn't interfering with the compilation, but it also wasn't being used.
(You could also use the version of hdf5 installed by candi, or install hdf5-mpi with homebrew, to use in your other projects and with deal.II / ASPECT).

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

oK. i have been able to install aspect and pass all the tests. I also installed hdf5 via homebrew and i could run my programs. So thank you!

For the future:

Downlaod dealii 9.4.0 -r2
change the config to 9.4.2
run: ./candi.sh -j 8 --packages="p4est trilinos dealii"

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

Dear developers

I'm not able to install candii in MacOS Sonoma 14.1.1

It was the same for MacOS Ventura, the latest version.

First of all, to compile "far" i'm using the following environmental variables:

export CC="/opt/homebrew/bin/mpicc"
export CXX="/opt/homebrew/bin/mpicxx"
export FC="/opt/homebrew/bin/mpifort"
export FF="/opt/homebrew/bin/mpifort"
export OMPI_CC="/opt/homebrew/bin/gcc-12"
export OMPI_CXX="/opt/homebrew/bin/g++-12"
export OMPI_FC="/opt/homebrew/bin/gfortran-12"

I also TRIED to use gcc11, 13 and clang: the installation won't even start. So i can't use this setup anymore because clang libraries have been updated (the old successfull configuration):

#  deal.II configuration:
#        CMAKE_BUILD_TYPE:       DebugRelease
#        BUILD_SHARED_LIBS:      ON
#        CMAKE_INSTALL_PREFIX:   /Users/francyrad/dealii-candi/deal.II-v9.4.2
#        CMAKE_SOURCE_DIR:       /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.4.2
#                                (version 9.4.2, shortrev 53a7623c7c)
#        CMAKE_BINARY_DIR:       /Users/francyrad/dealii-candi/tmp/build/deal.II-v9.4.2
#        CMAKE_CXX_COMPILER:     Clang 11.1.0 on platform Darwin arm64
#                                /opt/homebrew/bin/mpicxx
#        C++ language standard:  C++14
#

The version is 9.4.0-r2

in the .cfg i settled native configuration = ON and my path for OpenBlas and Lapack. I also changed the version to 9.4.2 as suggested above.
I also tried to install other versions of candii (9.5.1 etc.) Without any success.

I attach here the error. I need a reinstallation of ASPECT because i wanted to install some new additional libraries and I have also to write a cookbook

error_candi.txt

I also take the opportunity to ask what does this configuration will do to my ASPECT simulations if it's ON:

USE_64_BIT_INDICES=OFF

Thank you in advance for the help.

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

You should be able to update to the newest version of candi.

That probably won't fix your problem, which seems to be that you are missing some linker flags to boost (the missing symbols error). I had a similar problem in #367, but with different missing symbols. I'm afraid I don't know which flags will fix your problem, you might have to hunt around for the right directories.

Alternatively you could not use optional packages causing problems.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

For additional packages you mean OpenBlas and Lapack? For what i saw they compile fine. Also the native configuration is not the root of the problem, it fails both of the time if it's ON and OFF.

Also, how should i hunt for the correct LDFLAG to export?

EDIT: I tried to install 9.5.1 and it failed also. It fails both with Lapack or OpenBlas are included or not...

I have no idea what should i do t.t @bobmyhill

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

I also get this error when i try to install using clang, it was the same of your, but your LSFLAG export didn't work:

*******************************************************************************
candi tries now to download, configure, build and install:

Project:  deal.II-toolchain
Platform: deal.II-toolchain/platforms/supported/macos.platform

Fetching p4est 2.3.2
Verifying p4est-2.3.2.tar.gz
p4est-2.3.2.tar.gz: OK(sha256)
p4est-2.3.2.tar.gz already downloaded and verified.
Unpacking p4est-2.3.2.tar.gz
Building p4est 2.3.2
CFLAGS_FAST: -O2 -march=native
CFLAGS_DEBUG: -O0 -g

This script tries configure and build the p4est library.
Build FAST: /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/FAST
Build DEBUG: /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/DEBUG
Install FAST: /Users/francyrad/dealii-candi/p4est-2.3.2/FAST
Install DEBUG: /Users/francyrad/dealii-candi/p4est-2.3.2/DEBUG
Checking environment: CFLAGS P4EST_CFLAGS_FAST P4EST_CFLAGS_DEBUG
See output in files .../config.output and .../make.output

Build FAST version in /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/FAST
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected
configure: error: in `/Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/FAST':
configure: error: Fortran 77 compiler cannot create executables
See `config.log' for more details
Error: Error in configure

This is what the config says:
config.log

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

@Francyrad: It's LDFLAGS, not LDFLAG or LSFLAG. Your config log includes the line:
LDFLAGS='-L/opt/homebrew/opt/zlib/lib'
which suggests that whatever you exported, you didn't export to LDFLAGS as suggested in #367.

Here's the full variable that was used in my installation:
LDFLAGS="-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/bzip2/lib -L/opt/homebrew/lib -L/usr/local/gfortran/lib -Wl,-ld_classic"

In #367 I only mentioned the new flags that I needed to get deal.II to compile. Maybe you need all of these.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

I used this:

export CC="/opt/homebrew/bin/mpicc"
export CXX="/opt/homebrew/bin/mpicxx"
export FC="/opt/homebrew/bin/mpifort"
export FF="/opt/homebrew/bin/mpifort"
export OMPI_CC="/opt/homebrew/bin/clang"
export OMPI_CXX="/opt/homebrew/bin/clang++"
export OMPI_FC="/opt/homebrew/bin/gfortran"
LDFLAGS="-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/bzip2/lib -L/opt/homebrew/lib -L/usr/local/gfortran/lib -Wl,-ld_classic"

And now i get a different error:

CFLAGS_FAST: -O2 -march=native
CFLAGS_DEBUG: -O0 -g

This script tries configure and build the p4est library.
Build FAST: /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/FAST
Build DEBUG: /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/DEBUG
Install FAST: /Users/francyrad/dealii-candi/p4est-2.3.2/FAST
Install DEBUG: /Users/francyrad/dealii-candi/p4est-2.3.2/DEBUG
Checking environment: CFLAGS P4EST_CFLAGS_FAST P4EST_CFLAGS_DEBUG
See output in files .../config.output and .../make.output

Build FAST version in /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/FAST
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected
configure: error: in `/Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/FAST':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details
Error: Error in configure

This is the config file, i hope it can helps
config.log

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

config.log says:
The Open MPI wrapper compiler was unable to find the specified compiler /opt/homebrew/bin/clang in your PATH.

So the first question you should ask is where clang is.
On my machine, which clang returns /usr/bin/clang, and which gfortran returns /usr/local/bin/gfortran.

After you have checked your exports, delete all the previous builds from candi (probably the directory ~/dealii-candi/ if you didn't change the default) and try again.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

i had to deactivate native optimization because clang doesn't support that. this make me sad honestly...

Anyway, with this configuration:

export CC="/opt/homebrew/bin/mpicc"
export CXX="/opt/homebrew/bin/mpicxx"
export FC="/opt/homebrew/bin/mpifort"
export FF="/opt/homebrew/bin/mpifort"
export OMPI_CC="/opt/homebrew/opt/llvm@11/bin/clang"
export OMPI_CXX="/opt/homebrew/opt/llvm@11/bin/clang++"
export OMPI_FC="/opt/homebrew/bin/gfortran"
LDFLAGS="-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/bzip2/lib -L/opt/homebrew/lib -L/usr/local/gfortran/lib -Wl,-ld_classic"

Trilinos 13.2.0 doesn't install
trilinos_error.txt

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

If you read the error message you should be able to work out what you need to do:

ld: warning: directory not found for option '-L/opt/homebrew/opt/bzip2/lib' ld: warning: directory not found for option '-L/usr/local/gfortran/lib'

Have a think, try to fix the problem, and if you're still stuck let us know what you've tried.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

@bobmyhill i was missing bzip2 library which I installed, but the situation didn't change at all.

regarding ld: warning: directory not found for option '-L/usr/local/gfortran/lib', this happens only because i specified that folder on LDFLAG, but i don't have that folder on my system (because my installation is different?), so i don't think i really need that, or i just didn't install something?

I still cannot install trilinos. I could only bypass that problem using gfortran-12, but then the installation will fail with dealii. The point is that i really have no idea what to do.

I have XCODE 15 like yours, but i don't have /usr/local/gfortran/lib in my system

trilinosss.txt

that's the only relevant error that, in my opinion, i found:


-- Verifying Fortran/CXX Compiler Compatibility - Failed

 `CMake Error at /opt/homebrew/Cellar/cmake/3.27.7/share/cmake/Modules/FortranCInterface.cmake:398 (message):
  The Fortran compiler:

    /opt/homebrew/bin/mpifort

  and the CXX compiler:

    /opt/homebrew/bin/mpicxx

  failed to compile a simple test project using both languages.

There are also these warnings which i have no idea how to handle:

Build FAST version in /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/FAST
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected
configure: WARNING: Static source code checker splint not found
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/sc/configure: line 4015: test: argument expected
configure: WARNING: Static source code checker splint not found
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/sc/src/sc_sort.c:424:66: warning: 
      incompatible pointer types passing 'sc_psort_t *'
      (aka 'struct sc_psort *') to parameter of type 'int (* _Nonnull)(void *,
      const void *, const void *)' [-Wincompatible-pointer-types]
               n, pst->size, dir ? sc_compare_r : sc_icompare_r, pst);
                                                                 ^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/stdlib.h:345:22: note: 
      passing argument to parameter '__compar' here
            int (* _Nonnull __compar)(void *, const void *, const void *));
                            ^
1 warning generated.
ld: warning: -undefined suppress is deprecated
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/src/p4est_mesh.c:348:30: warning: 
      equality comparison with extraneous parentheses [-Wparentheses-equality]
        if ((side1->faces[j] == side2->faces[k])
             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/src/p4est_mesh.c:348:30: note: 
      remove extraneous parentheses around the comparison to silence this
      warning
        if ((side1->faces[j] == side2->faces[k])
            ~                ^                 ~
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/src/p4est_mesh.c:348:30: note: 
      use '=' to turn this equality comparison into an assignment
        if ((side1->faces[j] == side2->faces[k])
                             ^~
                             =
1 warning generated.
ld: warning: -undefined suppress is deprecated
FAST version installed in /Users/francyrad/dealii-candi/p4est-2.3.2/FAST

Build DEBUG version in /Users/francyrad/dealii-candi/tmp/build/p4est-2.3.2/DEBUG
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected
configure: WARNING: Static source code checker splint not found
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/sc/configure: line 4015: test: argument expected
configure: WARNING: Static source code checker splint not found
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/sc/src/sc_sort.c:424:66: warning: 
      incompatible pointer types passing 'sc_psort_t *'
      (aka 'struct sc_psort *') to parameter of type 'int (* _Nonnull)(void *,
      const void *, const void *)' [-Wincompatible-pointer-types]
               n, pst->size, dir ? sc_compare_r : sc_icompare_r, pst);
                                                                 ^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/stdlib.h:345:22: note: 
      passing argument to parameter '__compar' here
            int (* _Nonnull __compar)(void *, const void *, const void *));
                            ^
1 warning generated.
ld: warning: -undefined suppress is deprecated
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/src/p4est_mesh.c:348:30: warning: 
      equality comparison with extraneous parentheses [-Wparentheses-equality]
        if ((side1->faces[j] == side2->faces[k])
             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/src/p4est_mesh.c:348:30: note: 
      remove extraneous parentheses around the comparison to silence this
      warning
        if ((side1->faces[j] == side2->faces[k])
            ~                ^                 ~
/Users/francyrad/dealii-candi/tmp/unpack/p4est-2.3.2/src/p4est_mesh.c:348:30: note: 
      use '=' to turn this equality comparison into an assignment
        if ((side1->faces[j] == side2->faces[k])
                             ^~
                             =
1 warning generated.
ld: warning: -undefined suppress is deprecated
DEBUG version installed in /Users/francyrad/dealii-candi/p4est-2.3.2/DEBUG

Fetching trilinos 13-2-0

I really have no idea what to do, i only hope i'm missing libraries

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Hi @Francyrad,

Brill, thanks for trying some things out.

regarding ld: warning: directory not found for option '-L/usr/local/gfortran/lib', this happens only because i specified that folder on LDFLAG, but i don't have that folder on my system (because my installation is different?), so i don't think i really need that, or i just didn't install something?

Your first inference is correct (your installation is different). My copy of gfortran was installed from here: https://github.com/fxcoudert/gfortran-for-macOS/releases, whereas yours was presumably installed via homebrew. That shouldn't be a problem.

However, your second inference (i don't think i really need that) is almost certainly incorrect. The reason that I opened #367 was because installation of p4est and trilinos required new linker flags. This included a linker to the gfortran library, which on my machine is /usr/local/gfortran/lib. You will need to link to the equivalent directory on your machine. I do not know where that directory is. You could try:

echo $(dirname `gfortran --print-file-name libgfortran.dylib`)

which should return the directory where libgfortran.dylib is hiding.

I do not know whether adding the correct link will allow you to install trilinos. I suspect that it will.

For what it's worth, a lot of problems like this can be solved through careful reading of error messages followed by a well-phrased google search. For this problem, a useful search is gfortran libraries location homebrew, which provided the useful echo formula above.

from candi.

Francyrad avatar Francyrad commented on July 29, 2024

With your suggestion I installed trilinos successfully

I solved with export LDFLAGS="-L/System/Volumes/Data/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/13 -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/bzip2/lib -L/opt/homebrew/lib -Wl,-ld_classic"

But i can't compile dealii:

Fetching dealii v9.5.1
HEAD si trova ora a 9e847302b2 update VERSION for release
Building dealii v9.5.1
-- This is CMake 3.27.7
-- 
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/setup_external_macros.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_add_flags.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_check_compiler_setup.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_check_cxx_compiler_bug.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_check_mpi_interface.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_clear_cmake_required.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_clear_feature.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_configure_feature.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_copy_target_properties.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_add_definitions.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_add_test.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_find_file.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_find_library.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_find_path.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_find_program.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_pickup_tests.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_query_git_information.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_deal_ii_setup_target.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_decorate_with_stars.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_define_interface_target.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_define_object_target.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_enable_if_links.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_enable_if_supported.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_enable_language_optional.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_evaluate_expression.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_expand_instantiations.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_filter_system_libraries.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_find_system_library.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_insource_setup_target.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_item_matches.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_populate_target_properties.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_print_target_properties.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_process_feature.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_purge_feature.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_remove_duplicates.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_replace_flag.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_reset_cmake_required.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_set_if_empty.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_setup_source_list.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_setup_unity_target.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_shell_escape_option_groups.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_strip_flag.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_strip_known_generator_expressions.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_target_compile_flags.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_target_link_flags.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_to_string.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_to_string_and_add_prefix.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_unset_if_changed.cmake
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/macros/macro_verbose_include.cmake
-- 
-- Include /Users/francyrad/dealii-candi/tmp/unpack/deal.II-v9.5.1/cmake/setup_cached_variables.cmake
-- The CXX compiler identification is Clang 11.1.0
-- The C compiler identification is Clang 11.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /opt/homebrew/bin/mpicxx
-- Check for working CXX compiler: /opt/homebrew/bin/mpicxx - broken
CMake Error at /opt/homebrew/Cellar/cmake/3.27.7/share/cmake/Modules/CMakeTestCXXCompiler.cmake:60 (message):
  The C++ compiler

    "/opt/homebrew/bin/mpicxx"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/Users/francyrad/dealii-candi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeScratch/TryCompile-IsnTte'
    
    Run Build Command(s): /opt/homebrew/Cellar/cmake/3.27.7/bin/cmake -E env VERBOSE=1 /opt/homebrew/bin/gmake -f Makefile cmTC_7573b/fast
    /opt/homebrew/bin/gmake  -f CMakeFiles/cmTC_7573b.dir/build.make CMakeFiles/cmTC_7573b.dir/build
    gmake[1]: Entering directory '/Users/francyrad/dealii-candi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeScratch/TryCompile-IsnTte'
    Building CXX object CMakeFiles/cmTC_7573b.dir/testCXXCompiler.cxx.o
    /opt/homebrew/bin/mpicxx   -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -MD -MT CMakeFiles/cmTC_7573b.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_7573b.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_7573b.dir/testCXXCompiler.cxx.o -c /Users/francyrad/dealii-candi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeScratch/TryCompile-IsnTte/testCXXCompiler.cxx
    Linking CXX executable cmTC_7573b
    /opt/homebrew/Cellar/cmake/3.27.7/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7573b.dir/link.txt --verbose=1
    /opt/homebrew/bin/mpicxx  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_7573b.dir/testCXXCompiler.cxx.o -o cmTC_7573b 
    dyld[26172]: Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
      Referenced from: <611B08D9-8ED8-341E-B8C7-3D646A6D4BC1> /opt/homebrew/Cellar/llvm@11/11.1.0_4/lib/libLLVM.dylib
      Expected in:     <C84AC400-FE17-31D8-BE42-AF5C773A86D8> /opt/homebrew/Cellar/llvm@11/11.1.0_4/lib/libc++.1.0.dylib
    clang-11: error: unable to execute command: Abort trap: 6
    clang-11: error: linker command failed due to signal (use -v to see invocation)
    gmake[1]: *** [CMakeFiles/cmTC_7573b.dir/build.make:100: cmTC_7573b] Error 254
    gmake[1]: Leaving directory '/Users/francyrad/dealii-candi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeScratch/TryCompile-IsnTte'
    gmake: *** [Makefile:127: cmTC_7573b/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:91 (project)


-- Configuring incomplete, errors occurred!
Failure with exit status: 1
Exit message: There was a problem configuring dealii v9.5.1.

This should be the main reason of the error Referenced from: <611B08D9-8ED8-341E-B8C7-3D646A6D4BC1> /opt/homebrew/Cellar/llvm@11/11.1.0_4/lib/libLLVM.dylib Expected in: <C84AC400-FE17-31D8-BE42-AF5C773A86D8> /opt/homebrew/Cellar/llvm@11/11.1.0_4/lib/libc++.1.0.dylib clang-11: error: unable to execute command: Abort trap: 6 clang-11: error: linker command failed due to signal (use -v to see invocation) gmake[1]: *** [CMakeFiles/cmTC_7573b.dir/build.make:100: cmTC_7573b] Error 254 gmake[1]: Leaving directory '/Users/francyrad/dealii-candi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeScratch/TryCompile-IsnTte' gmake: *** [Makefile:127: cmTC_7573b/fast] Error 2

I tried to reinstall llvm@11, but nothing

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Good, I'm glad we're getting somewhere.

There is one glaring thing in your most recent message:

-- The CXX compiler identification is Clang 11.1.0
-- The C compiler identification is Clang 11.1.0

You're using a version of Clang from 2.5 years ago. That was the version packaged with llvm@11 (https://releases.llvm.org/ ... sorry, I did think your export path was weird when you posted it originally, but I had assumed it was pointing to an up-to-date compiler). Here are your dodgy exports:

export OMPI_CC="/opt/homebrew/opt/llvm@11/bin/clang"
export OMPI_CXX="/opt/homebrew/opt/llvm@11/bin/clang++"

Your exports should be pointing to the recent version of Clang which should be installed on your machine already.
For me, the paths are /opt/homebrew/bin/mpicc and /opt/homebrew/bin/mpicxx. These tools appear when you install Xcode Command Line Tools (triggered by typing clang, as explained here: https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX).

The command /opt/homebrew/bin/mpicxx -v should return Apple clang version 15.0.0 (clang-1500.0.40.1) at the moment.

So, check that these tools exist in these locations (given the other output you reported, it looks like they do), install them if they don't, update your exports, and try again.

P.S. The paths above are symlinks to /opt/homebrew/Cellar/open-mpi/4.1.6/bin/mpicc and /opt/homebrew/Cellar/open-mpi/4.1.6/bin/mpicxx, so those paths should also work. But they will be less robust to version updates than using the symlinks.

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

Excellent, glad to hear you've installed successfully.

Using 64-bit indices (rather than 32-bit) allows you to use larger datasets (data structures or files > 4 GB), store larger numbers, and store floating point numbers with higher precision.

from candi.

bobmyhill avatar bobmyhill commented on July 29, 2024

In my most recent update of deal.II, I also had to symlink the dynamic libraries for gfortran into the trilinos lib directory:
cp -s /usr/local/gfortran/lib/*.dylib ~/dealii-candi/trilinos-release-13-2-0/lib/

from candi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.