-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS ARM build is broken #309
Comments
Thank you, I'll follow the resolution problem |
Going back to v9.4.0-r2 fixes the issue:
It is not because of the update to 13.2, but related to explicit instantiations, I think. |
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). deal.II 9.3 or newer configured with: 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 |
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.
You just need "p4est trilinos deal.II" from candi as described here: https://github.com/geodynamics/aspect/wiki/Installation-on-ARM-OSX |
The error you are seeing is due to hdf5. Try installing without hdf5 for now. |
Trilinos 12.4 and 13.2 are broken with explicit instantiations enabled on ARM. hdf5 causes a problem when compiling deal.II. |
hi @tjhei I am facing exactly the same problem with my new M1 Pro mac (I starting to regret my choice..) Anyway, if you have a solution for this problem let us know. kind regards |
@nikkighw git clone https://github.com/dealii/candi I installed hdf5 in other ways. |
@NikkiGwh : Can you set |
@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.) |
Maybe I explained it wrong. I installed version 9.4, which is enough to use the program of my interest. |
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: 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. |
What version of MacOS do you have? If you upgraded to MacOS Ventura you may face problems, because it doesn't full support Fortran |
Indeed, I updated to Ventura 13.1. |
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 |
CMakeError.log |
Agi: Are you running in a native terminal? What does Also, what does |
I think so:
(base) kiraly@Agness-MacBook-Pro candi % git diff Option {ON|OFF}: Enable building of dealii examples?-BUILD_EXAMPLES=ON 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. |
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.
|
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. |
Hi @KiralyAgi Ok, a few ideas:
|
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.
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: mpicc -v mpicxx -v 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 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: 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 |
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:
From what you've written, the |
This solved it for me, and now I have a working Deal II and an ASPECT which prints out:
…-----------------------------------------------------------------------------
-- This is ASPECT, the Advanced Solver for Problems in Earth's ConvecTion.
-- . version 2.5.0-pre (main, 2b14e1b8e)
-- . 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 1 MPI process
——————————————————————————————————————
For future reference, the instructions about how to use homebrew need to be corrected. By default
brew install openmpi
installs mpicc = gcc and mpicxx = gcc. To keep the native clang compiler you must do
brew CC=clang install openmpi
This causes brew to recompile openmpi using the clang compiler.
Also, candi.sh prints out misleading instructions about exporting compiler environment variables:
export CC=mpicc; export CXX=mpicxx, FC=mpifort, FF=mpifort \
export OMPI_CC=gcc-11, export OMPI_CXX=g++-11, export OMPI_FC=gfortran+11
DO NOT export the OMPI_ environment variables unless you intend to build with the GNU C compiler!
And finally, a nit. When testing Deal II with the step-32 test, I had to do
export LC_ALL=C
to get the test to run.
Thanks!
Ellen McGowen
On Feb 5, 2023, at 4:35 AM, Bob Myhill ***@***.***> wrote:
Hi @emcgowen <https://github.com/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.
—
Reply to this email directly, view it on GitHub <#309 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABTDMVLULMJYZMHQSLEXQC3WV6NAZANCNFSM6AAAAAARPBZ2ZA>.
You are receiving this because you were mentioned.
|
Thank you, I updated the instructions at https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX |
Glad it worked! Thank you for the additional information, that's very useful. And thanks again @tjhei for all your work on this problem. |
Finally I made it!
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 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. |
Hallelujah :) Removing brew sounds a bit excessive, presumably removing the offending package would be enough. Any ideas where |
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? |
I also have |
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. |
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. |
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. |
Hello, i still have the problem. ./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 |
@Francyrad you didn't follow the instructions in my message: (1) As @emcgowen suggests,
Instead: (2)
So, not 9.4.2. Let's try to fix one problem at a time. (3)
You can see this in the first error message you posted; the other dependencies don't actually use the brew version of hdf5. (4)
So that means report to us the command line output from the following commands: |
Another thought. When you tried to install 9.4.2 you changed your candi branch (according to errorrr.txt). Instead of doing this, use |
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 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? |
Great, glad to hear that editing the line in
Ah, sorry. I assumed you had installed HDF5 because you wanted it for ASPECT.
True. If you don't want ASPECT to output hdf5 files, there's no problem.
No, that should be fine. The brew installation wasn't interfering with the compilation, but it also wasn't being used. |
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 |
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:
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):
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 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 I also take the opportunity to ask what does this configuration will do to my ASPECT simulations if it's ON:
Thank you in advance for the help. |
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. |
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 |
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:
This is what the config says: |
@Francyrad: It's Here's the full variable that was used in my installation: In #367 I only mentioned the new flags that I needed to get deal.II to compile. Maybe you need all of these. |
I used this:
And now i get a different error:
This is the config file, i hope it can helps |
config.log says: So the first question you should ask is where clang is. After you have checked your exports, delete all the previous builds from candi (probably the directory |
i had to deactivate native optimization because clang doesn't support that. this make me sad honestly... Anyway, with this configuration:
Trilinos 13.2.0 doesn't install |
If you read the error message you should be able to work out what you need to do:
Have a think, try to fix the problem, and if you're still stuck let us know what you've tried. |
@bobmyhill i was missing bzip2 library which I installed, but the situation didn't change at all. regarding 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 that's the only relevant error that, in my opinion, i found:
There are also these warnings which i have no idea how to handle:
I really have no idea what to do, i only hope i'm missing libraries |
Hi @Francyrad, Brill, thanks for trying some things out.
Your first inference is correct (your installation However, your second inference (
which should return the directory where 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 |
With your suggestion I installed trilinos successfully I solved with But i can't compile dealii:
This should be the main reason of the error
|
Good, I'm glad we're getting somewhere. There is one glaring thing in your most recent message:
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:
Your exports should be pointing to the recent version of Clang which should be installed on your machine already. The command 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 |
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:
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? |
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. |
In my most recent update of deal.II, I also had to symlink the dynamic libraries for gfortran into the trilinos lib directory: |
Would you mind checking #350 ? |
I need to investigate why the arm build on MacOS currently fails when installing Trilinos. This might be due to #297 ...
The error message is
ld: symbol(s) not found for architecture arm64 collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered: