-
Notifications
You must be signed in to change notification settings - Fork 4
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
Installation on mac m1 #193
Comments
Hi Antoine, This problem is originating with ninja, I am encountering a similar problem trying to compile with intel compilers on JED... it has trouble linking another file.
Is this the full output? (i.e. have you removed the It will probably still error, but there will be more useful output to look at if you could give me the output ( Working on it, and I let you know when I find a solution on my end! @mbkumar, you are our ninja-expert (or 'ninja'-ninja!) Do you know where these errors can stem from? |
Here is the full output! |
It looks like a mismatch between the linked supplied conda and the linker
in Mac OS. If you are using conda tool chain (compilers from Conda) go with
brew or macports.
Bharat Medasani
…On Tue, Oct 10, 2023 at 11:48 AM abaillod ***@***.***> wrote:
Here is the full output!
compile.log
<https://github.com/PrincetonUniversity/SPEC/files/12859151/compile.log>
—
Reply to this email directly, view it on GitHub
<#193 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA62VEDTCBOYSN444QO4ZLLX6VU3LAVCNFSM6AAAAAA5ZK7HE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVG4ZDMMBXG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Antoine, I have been struggling with the similar error on my side, but from your log it seems that your CMAKE finds both BLAS and LAPACK from your system:
and
Make sure you install them using Conda (conda install openBLAS (?) ), and set the If it still is not working after this change, send the compile output and your cmake_config.json file |
@mbkumar, let me also jump on this thread by asking you what is happening on my system (intel compilers on EPFL cluster). the root CMakelists finds my hdf5:
but as you can read from the first line, the variables [In Antoine's code these variables were populated with:
This then causes an error in linking, as this is passed directly to the f2py command when the wrapper is installed, giving the error
as it is not a list of library files that it is given. Do you know of a way to force cmake find_hdf5 to populate these variables with a list of files, and not the library names? Or to make |
I need to dig a bit deeper to solve this. Give me a week to get to the
bottom of this.
Bharat Medasani
…On Wed, Oct 11, 2023 at 11:05 AM Chris Smiet ***@***.***> wrote:
@mbkumar <https://github.com/mbkumar>, let me also jump on this thread by
asking you what is happening on my system (intel compilers on EPFL cluster).
the root CMakelists finds my hdf5:
-- Found HDF5: hdf5-shared;hdf5_fortran-shared (found version "1.12.2") found components: C Fortran HL
-- HDF5 libraries found: TRUE
-- HDF5 C include directors : /ssoft/spack/syrah/v1/opt/spack/linux-rhel8-icelake/intel-2021.6.0/hdf5-1.12.2-zzzj5gufyadodktq6xdrcvkgb2eazrfj/include
-- HDF5 Fortran include directors : /ssoft/spack/syrah/v1/opt/spack/linux-rhel8-icelake/intel-2021.6.0/hdf5-1.12.2-zzzj5gufyadodktq6xdrcvkgb2eazrfj/include
but as you can read from the first line, the variables
HDF5_Fortran_LIBRARIES and HDF5_C_LIBRARIES are not populated with a list
of library files, but only the names of the libraries.
[In Antoine's code these variables were populated with:
-- Found HDF5: /opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libhdf5.dylib;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libcrypto.dylib;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libcurl.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libsz.dylib;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libhdf5_fortran.dylib;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libhdf5.dylib;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libcrypto.dylib;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libcurl.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libsz.dylib;/opt/homebrew/Caskroom/miniconda/base/envs/simsopt/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd (found version "1.14.0") found components: C Fortran HL
This then causes an error in linking, as this is passed directly to the
f2py command when the wrapper is installed, giving the error
error: unknown file type '' (from 'hdf5_fortran-shared')
as it is not a list of library files that it is given.
Do you know of a way to force cmake find_hdf5 to populate these variables
with a list of files, and not the library names? Or to make
target_link_libraries in the python_wrapper cmake actually expand the
names into files, instead of plopping them straight in the list and
confusing f2py?
—
Reply to this email directly, view it on GitHub
<#193 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA62VEB5TIDCU5PMJMITNCDX62YSXANCNFSM6AAAAAA5ZK7HE4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, just an update as I made some progress on this and was able to install on my system: Passing the setting Antoine, can you add that to your cmake_config.yml file? I doubt that it will help, but it might cause cmake not to include the The issue seems to be a numpy/F2PY issue where the allowable extensions for libraries are hard-coded in a list, and do not include |
Hi @abaillod, just touching base to see if the issue still persists? With the fixes to py_spec and the simsopt docker, can you run on your mac now? Still leaving it open as we do need to make a change to the build to make it run on newer versions of macOS which require linking against .tbd and not .dylib (and f2py refusing to link against the newer .tbd library format) |
The docker does not work on my system: docker run -it --rm -v $PWD:/my_mount hiddensymmetries/simsopt
root@5a0390184d65:/# python
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from simsopt.mhd import Spec
s =Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/venv/lib/python3.10/site-packages/simsopt/__init__.py", line 13, in <module>
from ._core import make_optimizable, load, save
File "/venv/lib/python3.10/site-packages/simsopt/_core/__init__.py", line 3, in <module>
from .optimizable import *
File "/venv/lib/python3.10/site-packages/simsopt/_core/optimizable.py", line 31, in <module>
from .json import GSONable, SIMSON, GSONDecoder, GSONEncoder
File "/venv/lib/python3.10/site-packages/simsopt/_core/json.py", line 25, in <module>
import jax
File "/venv/lib/python3.10/site-packages/jax/__init__.py", line 39, in <module>
from jax import config as _config_module
File "/venv/lib/python3.10/site-packages/jax/config.py", line 17, in <module>
from jax._src.config import config # noqa: F401
File "/venv/lib/python3.10/site-packages/jax/_src/config.py", line 27, in <module>
from jax._src import lib
File "/venv/lib/python3.10/site-packages/jax/_src/lib/__init__.py", line 83, in <module>
cpu_feature_guard.check_cpu_features()
RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source. Trying to installing the python wrappers with anaconda I get a bunch of errors. First I get the
Downgrading |
@abailod,
can you run `cat /proc/cpuinfo` and let me know the status?
Bharat Medasani
…On Fri, Oct 27, 2023 at 9:54 AM abaillod ***@***.***> wrote:
The docker does not work on my system:
docker run -it --rm -v $PWD:/my_mount hiddensymmetries/simsopt
***@***.***:/# python
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from simsopt.mhd import Spec
s =Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/venv/lib/python3.10/site-packages/simsopt/__init__.py", line 13, in <module>
from ._core import make_optimizable, load, save
File "/venv/lib/python3.10/site-packages/simsopt/_core/__init__.py", line 3, in <module>
from .optimizable import *
File "/venv/lib/python3.10/site-packages/simsopt/_core/optimizable.py", line 31, in <module>
from .json import GSONable, SIMSON, GSONDecoder, GSONEncoder
File "/venv/lib/python3.10/site-packages/simsopt/_core/json.py", line 25, in <module>
import jax
File "/venv/lib/python3.10/site-packages/jax/__init__.py", line 39, in <module>
from jax import config as _config_module
File "/venv/lib/python3.10/site-packages/jax/config.py", line 17, in <module>
from jax._src.config import config # noqa: F401
File "/venv/lib/python3.10/site-packages/jax/_src/config.py", line 27, in <module>
from jax._src import lib
File "/venv/lib/python3.10/site-packages/jax/_src/lib/__init__.py", line 83, in <module>
cpu_feature_guard.check_cpu_features()
RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source.
Trying to installing the python wrappers with anaconda I get a bunch of
errors. First I get the numpy.distutils error when installing f90wrap:
❯ pip install -U git+https://github.com/zhucaoxiang/f90wrap
Collecting git+https://github.com/zhucaoxiang/f90wrap
Cloning https://github.com/zhucaoxiang/f90wrap to /private/var/folders/2t/kl_73rbx6v5g_wjy89yslg7r0000gn/T/pip-req-build-iemx08nw
Running command git clone --filter=blob:none --quiet https://github.com/zhucaoxiang/f90wrap /private/var/folders/2t/kl_73rbx6v5g_wjy89yslg7r0000gn/T/pip-req-build-iemx08nw
Resolved https://github.com/zhucaoxiang/f90wrap to commit 27f5f31ff8f5c1761403c6d77f5bab7d2aa21b0e
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/envs/spec_env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/homebrew/Caskroom/miniconda/base/envs/spec_env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/spec_env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/2t/kl_73rbx6v5g_wjy89yslg7r0000gn/T/pip-build-env-1fcug50a/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/2t/kl_73rbx6v5g_wjy89yslg7r0000gn/T/pip-build-env-1fcug50a/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/private/var/folders/2t/kl_73rbx6v5g_wjy89yslg7r0000gn/T/pip-build-env-1fcug50a/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 38, in <module>
ModuleNotFoundError: No module named 'numpy.distutils'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Downgrading numpy to an earlier version (1.21.5) and using python 3.8, I
can get f90wrap installed but then I get the same issue with the .tbd
files related to the HDF5 library, despite including the
-DHDF5_NO_FIND_PACKAGE_CONFIG_FILE=TRUE option in cmake_config.yml.
—
Reply to this email directly, view it on GitHub
<#193 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA62VECLX76HN5OLKGF4UTDYBO4INAVCNFSM6AAAAAA5ZK7HE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSHE3DAMJUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Bharat. This is the output:
|
Docker wont work with m1/m2 mac.
Bharat Medasani
…On Fri, Oct 27, 2023 at 12:00 PM abaillod ***@***.***> wrote:
Hi Bharat. This is the output:
❯ docker run -it --rm -v $PWD:/my_mount hiddensymmetries/simsopt
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
***@***.***:/# cat /proc/cpuinfo
processor : 0
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 1
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 2
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 3
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 4
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 5
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 6
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 7
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
processor : 8
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
—
Reply to this email directly, view it on GitHub
<#193 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA62VEDHFRWTOVLCNF5CHKTYBPLA5AVCNFSM6AAAAAA5ZK7HE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGE2TKOBZGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, Did we find a solution to this issue? I still can't install SPEC python wrappers on my Mac.
|
Recap: issue is Mac's 'new' .tbd library format, won't compile because of that To directly install, I think there are two things to try: Add to config.json DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 To try to force cmake to link the old way and skip tbds for Dylibs, see: https://discourse.cmake.org/t/newer-versions-of-macos-require-linking-against-tbd-files-and-not-old-system-paths-to-dylib/6871/4 Or install an older Mac SDK, and force Conda to use it (though it might not work with your new processor) Probably need to completely recreate Conda env See second comment from https://developer.apple.com/forums/thread/713368 As noted there, the intersection of Mac Monterey users and F2PY users is probably small, and the issue is with how F2PY doesn't support mac's 'new' library format. If it doesn't work, Best hope is to open an issue with Numpy... Don't think we can fix this |
Yeah, due to this @mbkumar Back in 2020, there was a similar |
If I remember correctly, I figured out how to get rid of |
Hi!
Has anyone successfully installed SPEC python wrappers on a mac M1 using anaconda? I get the following error message when running
python setup.py bdist_wheel
...The text was updated successfully, but these errors were encountered: