jaabell / ShakerMaker

Easily create physically-realistic earthquake ground motions for engineering and seismology!
https://shakermaker.readthedocs.io/
20 stars 9 forks source link

compilation problem on Mac #4

Open karimtarbali opened 1 year ago

karimtarbali commented 1 year ago

Hi José, I was trying to install shakermaker on my Mac (Ventura osx ) with Intel processors, but after many tries, I still get errors as below when I run 'python setup.py install'. I am wondering if you happen to come across this error in the setup stage. This is most likely mac-specific/clang/gcc related issue.

error.docx

karimtarbali commented 1 year ago

I get similar Warnings on Linux, but seems like the sutup ends ok. here is the snapshot of the text from the terminal

a general question, Does ShakerMaker work only with python2 or can work with python3 as well? (FYI- i am using python3.10 on mac and linux)

Screenshot 2023-09-27 at 19 28 36
jaabell commented 1 year ago

It seems to be a problem with the default compiler flags picked up by numpy.distutils. From the command line before running setup try the following:

export CFLAGS="-O3 -Wall"  # Add any flags you need here
export CXXFLAGS="$CFLAGS"
export FFLAGS="-O3"
python setup.py install --user 

This theoretically overrides the flags picked up by numpy. You can then add the flags suggested during the compile process, except the "avx512" ones that were offending. See how it goes.