-
Notifications
You must be signed in to change notification settings - Fork 509
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
Tiny updates from experience building on Mac #2894
Conversation
This addition to the quick install guide will hopefully prevent confusion as encountered in: https://openmc.discourse.group/t/openmp-on-mac-fails-success/2070 |
It appears that the OpenMP target linking approach may have screwed with the dlopen source tests, which require cmake 3.3. Now 3.9 is required for anything linking to OpenMC, so I think that'd be the issue with those tests failing. I've bumped them up to match the main CMakeLists.txt version requirement. 3.10 came out in 2017, so it's definitely reasonable to require it everywhere. |
Hm, this is the error I'm hitting in CI. Somehow, the OpenMP linking technique suggested by an old comment in the CMakeLists.txt file implemented in this PR breaks dynamically linked particle source compilation. I'm still not sure how to fix this, at the moment.
I guess we need |
The solution was to find the OpenMP package in the cmake config file. This is now good for review if anyone can get to that, maybe @paulromano, @pshriwise, or @jtramm. |
Thanks @gridley! I'll take a look shortly. |
Thanks for putting these changes together! One thing I'm thinking is that I'm not sure that we should be saying that homebrew is strictly required. Definitely fine to say this is one way of doing it, but it's also pretty straightforward just to download a LLVM compiler binary (e.g., from here) and go from there. Mac ports is also very popular, so don't want people to think they need to change package managers just to install OpenMC if they are already using mac ports. Also wondering if it is a good idea to recommend installing xtensor or other submodules via homebrew, as then the version may be a mismatch between what OpenMC is expecting from its regular git submodule? |
I have never seen a version of xtensor that doesn't work with openmc. We don't use a huge amount of features out of it. For the very small number of arch linux users that build through the AUR, there have not been reported issues taking the same approach. I agree with you on that one John regarding homebrew! I'll add a note that this is just one option. |
Alright, it now says that homebrew is not the only option. I think the point of the quick install guide is just to give a quick and easy way to do stuff, so specifically mentioning the other possibilities doesn't make sense to me. Especially because I've not tested them. As for downloading a compiler binary, that still leaves the user to go and download binaries for the other libraries we depend on, which sounds like a real pain to get it to all work together, potentially. |
Why might this happen in CI?
It was passing and all I did was change a docs file. hm! |
@gridley See my comment here: #2958 (comment) |
Thank you for your prompt response Paul! |
This PR now depends on #2958 going through first. |
Hooray, tests are passed! Thanks Paul! |
Slightly related to this PR as I think I've come across the same issues, I have started adapting the CI so that it does some CI on Mac OS The CI which is based on openmc/develop branch currently gives No CMAKE_Fortran_COMPILER could be found. when trying to build on mac-latest. I look forward to trying the CI again if this PR gets merged as it looks like it solves the error I'm seeing |
As an update, I have heard from one other person that this branch fixed a CMake OpenMP linking failure when building on Mac. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these updates @gridley!
I've updated that branch with the Mac OS CI runner with these latest changes, unrelated to openmc but it looks like NJOY wants fortran.
I shall add fortran to the export path once I figure out where it is installed to https://github.com/shimwell/openmc/actions/runs/8767146139/job/24060073439 |
Co-authored-by: Paul Romano <[email protected]>
Description
This does a few things to tidy up and improve documentation:
Checklist