ASPECT on intel MacOS Ventura 13.5.1 with dealii .dmg file/application

Hello, I’m a new-ish ASPECT user as of this year. In February I had success installing version 2.4 of ASPECT on my computer and on the NERSC Perlmutter system using Candi but since I am headed to the hackathon next week I wanted to have the latest version of deal.ii and aspect working on my laptop (Mac, intel processor, Ventura 13.5.1). I was running into trouble with Candi but I thought I’d try the deal.ii application from the .dmg file (ie Installing and running ASPECT on Mac OS X · geodynamics/aspect Wiki · GitHub) and I was able to open the application, however some things are unfamiliar to me. I have attached some of my environment variables, the output of my configuration attempt which failed.

Any help would be greatly appreciated, as well as any suggestions or tips about getting Candi to work ( Im getting ld: Undefined symbols errors in my deal.ii build after “[ 57%] Linking CXX shared library …/lib/libdeal_II.g.dylib”. Im following the instructions from the 2.6 aspect documentation and what Candi asks for in terms of brew installations and setting variables CC, CXX, FF to look at mpicc, mpicxx, mpifort etc)

Back to the deal.ii application terminal:
TERMINAL OUTPUT + ERROR MESSAGES INSIDE THE DEAL.II TERMINAL:

bash-3.2$ ls
AUTHORS.md		CONTRIBUTING.md		README.md		contrib			include
CITATION		Jenkinsfile		VERSION			cookbooks		source
CMakeLists.txt		Jenkinsfile.osx		benchmarks		data			tests
CODE_OF_CONDUCT.md	LICENSE			cmake			doc			unit_tests
bash-3.2$ mkdir build
bash-3.2$ cd build
bash-3.2$ cmake ..
-- ====================================================
-- ============ Configuring ASPECT ====================
-- ====================================================
-- Setting up ASPECT for DebugRelease mode.
-- Found deal.II version 9.5.0 at '/Applications/deal.II.app/Contents/Resources/Libraries/lib/cmake/deal.II'
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++
-- Check for working CXX compiler: /Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++ - broken
CMake Error at /Applications/deal.II.app/Contents/Resources/spack/opt/cmake-3.26.3-aw3s/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:60 (message):
  The C++ compiler

    "/Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/mkerr/ASPECT_hackathon/code/aspect/build/CMakeFiles/CMakeScratch/TryCompile-v9SVEM
    
    Run Build Command(s):/Applications/deal.II.app/Contents/Resources/spack/opt/cmake-3.26.3-aw3s/bin/cmake -E env VERBOSE=1 /opt/local/bin/gmake -f Makefile cmTC_9179a/fast && /opt/local/bin/gmake  -f CMakeFiles/cmTC_9179a.dir/build.make CMakeFiles/cmTC_9179a.dir/build
    gmake[1]: Entering directory '/Users/mkerr/ASPECT_hackathon/code/aspect/build/CMakeFiles/CMakeScratch/TryCompile-v9SVEM'
    Building CXX object CMakeFiles/cmTC_9179a.dir/testCXXCompiler.cxx.o
    /Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -mmacosx-version-min=13.5 -MD -MT CMakeFiles/cmTC_9179a.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_9179a.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_9179a.dir/testCXXCompiler.cxx.o -c /Users/mkerr/ASPECT_hackathon/code/aspect/build/CMakeFiles/CMakeScratch/TryCompile-v9SVEM/testCXXCompiler.cxx
    Linking CXX executable cmTC_9179a
    /Applications/deal.II.app/Contents/Resources/spack/opt/cmake-3.26.3-aw3s/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9179a.dir/link.txt --verbose=1
    /Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -mmacosx-version-min=13.5 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_9179a.dir/testCXXCompiler.cxx.o -o cmTC_9179a 
    ld: unknown options: -commons 
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [CMakeFiles/cmTC_9179a.dir/build.make:100: cmTC_9179a] Error 1
    gmake[1]: Leaving directory '/Users/mkerr/ASPECT_hackathon/code/aspect/build/CMakeFiles/CMakeScratch/TryCompile-v9SVEM'
    gmake: *** [Makefile:127: cmTC_9179a/fast] Error 2
    

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


-- Configuring incomplete, errors occurred!

Environment in the dealii terminal opened from the app:

env
DEAL_II_BUNDLE=/Applications/deal.II.app
SPACK_ROOT=/Applications/deal.II.app/Contents/Resources/spack
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/zsh
TMPDIR=/var/folders/py/h1ls7vw539b6m54802bh8ly80000gq/T/
TERM_PROGRAM_VERSION=447
OLDPWD=/Users/mkerr/ASPECT_hackathon
DEAL_II_RESOURCES=/Applications/deal.II.app/Contents/Resources
TERM_SESSION_ID=976C67C5-8A60-46EC-A5CA-4A984B2DE5DF
USER=mkerr
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.kxCRYW2q3x/Listeners
BASH_SILENCE_DEPRECATION_WARNING=1
PATH=/Applications/deal.II.app/Contents/Resources/Libraries/bin:/usr/local/Cellar:/usr/local/bin:/opt/igpp/sbin:/opt/igpp/bin:/opt/local/sbin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/sw/bin:/sw/sbin:/Applications/MATLAB_R2020a.app/bin:/usr/X11/bin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
__CFBundleIdentifier=com.apple.Terminal
PWD=/Users/mkerr/ASPECT_hackathon/code
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
HOME=/Users/mkerr
SHLVL=3
LOGNAME=mkerr
CMAKE_PREFIX_PATH=/Applications/deal.II.app/Contents/Resources/Libraries/
DISPLAY=/private/tmp/com.apple.launchd.kSQM1PgHPT/org.xquartz:0
_=/usr/bin/env

VERSIONS OF CMAKE AND COMPILERS

bash-3.2$ which cmake
/Applications/deal.II.app/Contents/Resources/Libraries/bin/cmake
bash-3.2$ which mpicc
/Applications/deal.II.app/Contents/Resources/Libraries/bin/mpicc
bash-3.2$ which mpifort
/Applications/deal.II.app/Contents/Resources/Libraries/bin/mpifort
bash-3.2$ which mpicxx
/Applications/deal.II.app/Contents/Resources/Libraries/bin/mpicxx
bash-3.2$ which mpic++
/Applications/deal.II.app/Contents/Resources/Libraries/bin/mpic++
bash-3.2$ cmake --version
cmake version 3.26.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
bash-3.2$ mpicc --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
bash-3.2$ mpic++ --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Hi Madeleine,

Welcome to the ASPECT community! And thank you for posting such detailed information, I’m sure this will help solve your problems.

From your post, it looks like deal.II is trying to use two versions of mpic++:

Are there actually two versions, or is one just a symlink to the other? We’ve had similar problems with Mac installations before: MacOS ARM build is broken · Issue #309 · dealii/candi · GitHub

For what it’s worth, candi is also easy to use on Mac, and as you’ve used it before it may be more convenient to delete the deal.II app and go that route (Using candi to compile dependencies — ASPECT 2.6.0-pre) rather than play around inside the app.

Hi Bob,
Thank you so much for taking a look! I saw Issue #309 before, but that specific message was helpful (and sometimes I’m not sure which things apply more to M1 vs intel processor Macs). I didn’t use brew to get the deal.ii package so my deal.ii application terminal window looked different (was using spack instead which I haven’t used before). When I tried to set my cmake cxx compiler to be the mpicxx that my path points to, it did the same thing and said “broken.”
That being said, I agree that Candi is a better way to go. I’ve been messing around for a few days now and I used the Candi set-up before in February. Something’s different now that I’m not quite sure (I updated brew and Xcode and reinstalled the things candi wanted). I am getting stuck at the 1 yard line it seems with an ld: undefined symbols error when building deal.ii with Candi



I was looking around the help pages and saw this comment that you had posted helping someone out (they have an M1 Mac and I have intel, though)


but when I tried to export that to my own computer I couldn’t even begin to configure the first step

-- The C compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/local/bin/mpicc
-- Check for working C compiler: /usr/local/bin/mpicc - broken
CMake Error at /usr/local/Cellar/cmake/3.29.3/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/local/bin/mpicc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/Users/mkerr/aspect_workshop_software/may21_dealii/tmp/build/sundials-5.7.0/CMakeFiles/CMakeScratch/TryCompile-ciJBfW'
    
    Run Build Command(s): /usr/local/Cellar/cmake/3.29.3/bin/cmake -E env VERBOSE=1 /opt/local/bin/gmake -f Makefile cmTC_036ea/fast
    /opt/local/bin/gmake  -f CMakeFiles/cmTC_036ea.dir/build.make CMakeFiles/cmTC_036ea.dir/build
    gmake[1]: Entering directory '/Users/mkerr/aspect_workshop_software/may21_dealii/tmp/build/sundials-5.7.0/CMakeFiles/CMakeScratch/TryCompile-ciJBfW'
    Building C object CMakeFiles/cmTC_036ea.dir/testCCompiler.c.o
    /usr/local/bin/mpicc   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -mmacosx-version-min=13.5 -MD -MT CMakeFiles/cmTC_036ea.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_036ea.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_036ea.dir/testCCompiler.c.o -c /Users/mkerr/aspect_workshop_software/may21_dealii/tmp/build/sundials-5.7.0/CMakeFiles/CMakeScratch/TryCompile-ciJBfW/testCCompiler.c
    Linking C executable cmTC_036ea
    /usr/local/Cellar/cmake/3.29.3/bin/cmake -E cmake_link_script CMakeFiles/cmTC_036ea.dir/link.txt --verbose=1
    /usr/local/bin/mpicc  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -mmacosx-ver

so I removed that variable from my environment and things are working again (will probably fail again at the undefined symbol error in the dealii build). Im not sure what library is missing (or even what the undefined symbols are for that matter), the text of the message is quite long so I’ll put it at the end but Im not sure how helpful it will be. But thank you so much.

[100%] Building CXX object source/non_matching/CMakeFiles/object_non_matching_debug.dir/mesh_classifier.cc.o
[100%] Building CXX object source/sundials/CMakeFiles/object_sundials_debug.dir/kinsol.cc.o
[100%] Building CXX object source/CMakeFiles/dealii_release.dir/dummy.cc.o
[100%] Linking CXX shared library ../lib/libdeal_II.dylib
ld: Undefined symbols:
  NOX::StatusTest::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, NOX::StatusTest::StatusType), referenced from:
      dealii::TrilinosWrappers::internal::NOXWrappers::NOXCheck<dealii::Vector<double>>::print(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int) const in nox.cc.o
      dealii::TrilinosWrappers::internal::NOXWrappers::NOXCheck<dealii::Vector<float>>::print(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int) const in nox.cc.o
      dealii::TrilinosWrappers::internal::NOXWrappers::NOXCheck<dealii::BlockVector<double>>::print(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int) const in nox.cc.o
      dealii::TrilinosWrappers::internal::NOXWrappers::NOXCheck<dealii::BlockVector<float>>::print(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int) const in nox.cc.o
      dealii::TrilinosWrappers::internal::NOXWrappers::NOXCheck<dealii::LinearAlgebra::Vector<double>>::print(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int) const in nox.cc.o
      dealii::TrilinosWrappers::internal::NOXWrappers::NOXCheck<dealii::LinearAlgebra::Vector<float>>::print(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int) const in nox.cc.o
      dealii::TrilinosWrappers::internal::NOXWrappers::NOXCheck<dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::Host>>::print(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int) const in nox.cc.o
      ...
  Ifpack::Create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, Epetra_RowMatrix*, int, bool), referenced from:
      dealii::TrilinosWrappers::PreconditionJacobi::initialize(dealii::TrilinosWrappers::SparseMatrix const&, dealii::TrilinosWrappers::PreconditionJacobi::AdditionalData const&) in trilinos_precondition.cc.o
      dealii::TrilinosWrappers::PreconditionSSOR::initialize(dealii::TrilinosWrappers::SparseMatrix

etc.

Hi @mkerr,

I’m also getting ready for the hackathon and trying to sort out the same issue on my intel mac :slight_smile:

I just updated to the most recent mac os (sonoma) and reinstalled xcode. Before updating, I ran into the same issue you posted above (ld: Undefined symbols) at the final steps of the deal.II installation. After going back through the candi instructions, one thing I missed the first time around is that the recommend using GNU compilers for intel macs over clang, and when I checked openmpi via homebrew was linked the clang compilers. Is this the same on your end?

I rebuild openmpi with the GNU compilers, and am now part way through the candi build process. I’ll update when it finishes (either with success or failure).

edits:

  1. I see from your post above your homebrew openmpi installation is also picking up clang.
  2. I’m hopeful that given the error you reported is is mpi-related, using the GNU compilers may help.

Cheers,
John

@mkerr - Sorry to report no good news, I still ended up with the same undefined symbol error when ensuring openmpi was using the gnu compilers (rather than clang).

@tjhei - Any suggestions for how to resolve the errors posted above?

@mkerr - As an alternative to a native installation, another option is to use docker and connect virtual studio to the running aspect container.

Cheers,
John

Wow, thanks so much for the help; happy to know I’m not alone at this stage. I did notice that my mpicc version was clang but my mpic++ and mpifort were gnu and that mismatch bothered me but I couldn’t quite figure out the next step. I am uninstalling openmpi with brew and then reinstalling with something like. "brew install --cc=gcc-11 openmpi ". Ah, I JUST got your notification that it didn’t solve the problem. I haven’t used docker before so perhaps this is a good time to learn that. But yes, I’ll stay posted with this and try other things and let you know if I have any success.

edit: I did get openmpi to install with the homebrew gnu compilers. I will confirm that I still get stuck at the same step later.
edit2: yeah, I did get stuck again… I’m not sure if there is some flag so that is gives a warning instead or if thats even a good idea.

I read this from this forum page
Problem solved; using X Code 15 requires additional fortran linker flags for p4est and trilinos:
export LDFLAGS=“$LDFLAGS -L/usr/local/gfortran/lib -Wl,-ld_classic,-lgfortran”. It’s not the same error as ours but I thought it perhaps could be worth noting since we have the latest Xcode I believe (but this is for an ARM-M1 Mac not an intel one…). I haven’t had success yet; I’m trying to find my equivalent "-L/usr/local/gfortran/lib "

edit: I also noticed my home-brew gnu version of my gfortran compiler is gcc 14 instead of gcc 11 (which all the mpicc, mpifort, mpicxx compilers use). Could that be a problem?

mkerr@igpp20grad7 Cellar % gfortran --version
GNU Fortran (Homebrew GCC 14.1.0) 14.1.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkerr@igpp20grad7 Cellar % gcc --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
mkerr@igpp20grad7 Cellar % g++ --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
mkerr@igpp20grad7 Cellar % mpicc --version
gcc-11 (Homebrew GCC 11.4.0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkerr@igpp20grad7 Cellar % mpicxx --version
g++-11 (Homebrew GCC 11.4.0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkerr@igpp20grad7 Cellar % mpic++ --version
g++-11 (Homebrew GCC 11.4.0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkerr@igpp20grad7 Cellar % mpifort --version
GNU Fortran (Homebrew GCC 11.4.0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

eidt2: @jbnaliboff Nevermind, my env vars are CC=mpicc CXX=mpicxx FC=mpifort FF=mpifort OMPI_CXX=g++-11 OMPI_FC=gfortran-11

Dear Madeleine,

I think your candi build fails because it cannot find the NOX symbols that should have been provided by the trilinos package. One thought is that you might already have another version of trilinos installed, perhaps via homebrew. A similar problem was reported here: https://groups.google.com/g/xyce-users/c/PoZ0yUrNGm8

Can you check if there’s another version of Trilinos somewhere on your machine?

In the meantime, I’ve started installing deal.II on my old Mac desktop so that I can try to reproduce your error.

Bob

@bobmyhill Indeed! I do have another trilinos from a prior Aspect 2.4 version installation; I didn’t know it would cause problems because I’m pretty sure it was not on my path, but I will get rid of that and try again. Let me know if you need any more information from me to try to reproduce my error

Hi Madeleine,

Ok, hopefully that’s the cause of the problem. I had no problems installing deal.II or ASPECT on my Mac just now.

If you haven’t started another attempt, make sure you delete the dealii-candi directory from the failed installation first.

Best wishes,
Bob

1 Like

@bobmyhill @jbnaliboff
Rats, it didn’t work. I have the same error message too so I dont think it was having another version of Trilinos on my machine (and I checked in my home-brew Cellar and didn’t see one there either…). John, have you made any progress past the error? Some warnings did come up that I didn’t recognize in my building of p4est and trilinos. I attached my entire Candi build output as a .txt file if there are any glaring errors in the trilinos configuration that would make it not install NOX correctly. In the configuration of dealii it says it “Found NOX”.

John did suggest I try using Docker if this doesn’t work, so I may shift to that tactic. Thank you once again for your patience and help, and sorry this is so challenging for me at the moment.

mkerr@igpp20grad7 candi % mpicc --version
gcc-11 (Homebrew GCC 11.4.0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkerr@igpp20grad7 candi % mpicxx --version
g++-11 (Homebrew GCC 11.4.0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkerr@igpp20grad7 candi % mpifort --version
GNU Fortran (Homebrew GCC 11.4.0) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkerr@igpp20grad7 candi % env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/py/h1ls7vw539b6m54802bh8ly80000gq/T/
XPC_FLAGS=0x0
TERM=xterm-256color
DISPLAY=/private/tmp/com.apple.launchd.kSQM1PgHPT/org.xquartz:0
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.kxCRYW2q3x/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=447
TERM_SESSION_ID=620C153E-924D-4705-BA74-62034A621EB0
SHELL=/bin/zsh
HOME=/Users/mkerr
LOGNAME=mkerr
USER=mkerr
PATH=/usr/local/Cellar:/usr/local/bin:/opt/igpp/sbin:/opt/igpp/bin:/opt/local/sbin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/sw/bin:/sw/sbin:/Applications/MATLAB_R2020a.app/bin:/usr/X11/bin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
SHLVL=1
PWD=/Users/mkerr/aspect_workshop_software/candi
OLDPWD=/Users/mkerr/aspect_workshop_software/may21_dealii
CC=mpicc
CXX=mpicxx
FC=mpifort
FF=mpifort
OMPI_CXX=g++-11
OMPI_FC=gfortran-11
LDFLAGS=
LANG=en_US.UTF-8
_=/usr/bin/env
mkerr@igpp20grad7 candi % echo $PATH
/usr/local/Cellar:/usr/local/bin:/opt/igpp/sbin:/opt/igpp/bin:/opt/local/sbin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/sw/bin:/sw/sbin:/Applications/MATLAB_R2020a.app/bin:/usr/X11/bin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
mkerr@igpp20grad7 candi % 

dealii_build_error.txt (1.4 MB)

@mkerr @bobmyhill - Thanks for the continued discussion and a short update on my end in between travels today. Unfortunately, no luck yet but some potential leads.

After going back through the details of my installation, I noticed the following:

  1. Despite using the gnu compilers built through homebrew, deal.II was still using the clang compilers for CMAKE:

CMAKE_CXX_COMPILER: AppleClang 15.0.0.15000309 on platform Darwin x86_64
CMAKE_C_COMPILER: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
CMAKE_Fortran_COMPILER: /usr/local/bin/mpif90

That was resolved by specifying DEAL_II_CONFOPTS="-DDEAL_II_WITH_COMPLEX_VALUES=OFF -DCMAKE_CXX_COMPILER=/usr/local/bin/mpicxx -DCMAKE_C_COMPILER=/usr/local/bin/mpicc", but unclear if this was the underlying issue.

I also just noticed Trilinos is linked to lapack and blas in xcode (end of Trilinos link libraries posted below):
MacOSX14.5.sdk/usr/lib/liblapack.tbd;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libblas.tbd;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libdl.tbd

I’m currently rebuilding deal.II, but I wonder if that is part of the issue.

@bobmyhill - Could you post the steps you used to successfully build deal.II via candi on your mac, what libraries (clang vs GNU on homebrew, etc) you used, and the contents of your candi.cfg file? Thanks!

John

Hi John,

I did nothing special, but maybe that was the problem. My Mac Pro is old enough that I’m still on OSX 12.7.4 (no longer updateable) and XCode 14.2.0.0.1.1668646533.

I’m trying to update XCode so that I can at least get closer to your machines, but it’s not easy on the command line (and because I now don’t have working compilers I can’t check what I used, sorry!).

I’m going to leave it for tonight and give it another try in the morning.

No joy I’m afraid, XCode 14.2.0 is as modern as my machine will go.

I had the same thing come up in my build of dealii specifically. I searched for “clang” in my whole output and only showed up in the

-- Include /Users/mkerr/aspect_workshop_software/may21_dealii/tmp/unpack/deal.II-v9.5.1/cmake/setup_cached_variables.cmake
-- Prepending ${CMAKE_CXX_FLAGS} to ${DEAL_II_CXX_FLAGS}
-- Prepending ${CMAKE_CXX_FLAGS_RELEASE} to ${DEAL_II_CXX_FLAGS_RELEASE}
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- The C compiler identification is AppleClang 15.0.0.15000100

and then again, the same as John:

###
#
#  deal.II configuration:
#        CMAKE_BUILD_TYPE:       DebugRelease
#        BUILD_SHARED_LIBS:      ON
#        CMAKE_INSTALL_PREFIX:   /Users/mkerr/aspect_workshop_software/may21_dealii/deal.II-v9.5.1
#        CMAKE_SOURCE_DIR:       /Users/mkerr/aspect_workshop_software/may21_dealii/tmp/unpack/deal.II-v9.5.1
#                                (version 9.5.1, shortrev 9e847302b2)
#        CMAKE_BINARY_DIR:       /Users/mkerr/aspect_workshop_software/may21_dealii/tmp/build/deal.II-v9.5.1
#        CMAKE_CXX_COMPILER:     AppleClang 15.0.0.15000100 on platform Darwin x86_64
#                                /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
#        C++ language standard:  C++14
#        Vectorization level:    512 bit (sse2 avx2 avx512*)

I will also check if setting those flags will fix my issue

@jbnaliboff @bobmyhill Success! The trick with clang being my cc and cxx compiler in dealii was the problem. Here is my output from the successful build and if you need any info from me re: env var or configuration file, let me know!
dealii_success.txt (2.7 MB)

Great, thank you for letting us know!

@mkerr - indeed, great news! Was the trick to just specify the CMAKE_CXX_COMPILER variable (point to homebrew compilers), or did you have specify other variables in the candi cfg file?

I restarted my build at home earlier today, so if that was the trick it will have hopefully worked on my system as well.

I’m moving forward on Aspect configuration, but I would just like to point out that I think ASPECT wants Sundials but in the documentation, sundials is optional. I will re-build deal.ii again with sundials, but if either of you know any more about other packages that might be necessary for the hackathon but aren’t in the documentation, that would be helpful to know! Thank you again for all your help!

mkerr@igpp20grad7 build % cmake ..
-- ====================================================
-- ============ Configuring ASPECT ====================
-- ====================================================
-- Setting up ASPECT for DebugRelease mode.
-- Found deal.II version 9.5.1 at '/Users/mkerr/aspect_workshop_software/may21_dealii/deal.II-v9.5.1/lib/cmake/deal.II'
CMake Error at CMakeLists.txt:134 (MESSAGE):
  

  -- deal.II was built without support for SUNDIALS!



CMake Error at CMakeLists.txt:141 (MESSAGE):
  

  ASPECT requires a deal.II installation built with certain features enabled
  that seem to be missing (see above)!

Thanks for pointing that out. Sundials is a required dependency now. The documentation will be fixed once mark sundials as required in documentation by tjhei · Pull Request #5644 · geodynamics/aspect · GitHub is merged.

1 Like