Skip to content
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

Possible Issue with Mac M1 Chip #214

Open
haileymoore opened this issue Aug 30, 2022 · 3 comments
Open

Possible Issue with Mac M1 Chip #214

haileymoore opened this issue Aug 30, 2022 · 3 comments

Comments

@haileymoore
Copy link

I am attempting to install MultiNest on my Mac running MacOS Monterey 12.5.1. I am able to run cmake, but I do get a few warnings near the end, notably about missing MPI. I'm planning on running it locally, so I'm not sure if the MPI libraries are necessary or if I can get away with building only non-MPI libraries. At the end of cmake, I get these warnings:

-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS) 
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) 
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_LIB_NAMES MPI_Fortran_F77_HEADER_DIR MPI_Fortran_MODULE_DIR MPI_Fortran_WORKS) 
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND MPI_Fortran_FOUND) 
-- MPI not found, only non-MPI MultiNest libraries will be built.

Given that this runs, I then tried to run make, where I get this error:

ld: warning: ignoring file /Users/Hailey/MultiNest/lib/libmultinest.3.10.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/Hailey/opt/anaconda3/envs/isochrones/lib/libblas.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "___nested_MOD_nestrun", referenced from:
      _run in eggbox.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/Hailey/MultiNest/bin/eggboxC] Error 1
make[1]: *** [src/example_eggbox_C/CMakeFiles/eggboxC.dir/all] Error 2
make: *** [all] Error 2

From what I can tell, this looks like an error due to make looking for an Intel chip rather than the Mac M1 silicon chip. Is there a work around for installation, perhaps anything to add in the building stage to help with this issue?

@JohannesBuchner
Copy link
Owner

MPI is not necessary if you do not want to run parallelized.

@JohannesBuchner
Copy link
Owner

@DavidMoiseNataf
Copy link

DavidMoiseNataf commented Nov 4, 2022

I had the same problems on my M1. I did find a solution to the MPI issue.

For the other issue, I think it's because, as written above, that there are multiple compilers on the system that compete for attention, and they need to be prioritized correctly in the $PATH for Multinest to be installed.

My get around is that I temporarily removed this anaconda-related text from my .bash_profile prior to installing multinest, and then re-inserted after installing multinest:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/davidnataf/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/davidnataf/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/davidnataf/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/davidnataf/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

So if I understand correctly, it's some of the Conda-related software which is interfering with the application of make on multinest. Note that I used the latest version of Anaconda, which is supposed to support M1 architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants