Closed drroe closed 8 years ago
I am ok with anything you and Jason do for osx :)).
I initially added openmp as default since you told me this (gchat) :D
I mean, I don't know of any compilers that don't support openmp.
@swails do you want to have a quick fix for that since I don't have osx for testing.
May be make openmp as default for linux and turn it off for osx. Just try to make the setup less complicated.
@drroe while waiting for @swails feedback, I added suggestion to disable openmp in osx
clang does not support OpenMP yet to my knowledge. If they do now, it's very recent.
thanks. so openmp will be disabled in osx.
The very latest one from macports does (3.9 i think?). I enabled openmp for cpptraj with clang (configure bow tests that openmp works).
On Thursday, February 25, 2016, Jason Swails notifications@github.com wrote:
clang does not support OpenMP yet to my knowledge. If they do now, it's very recent.
— Reply to this email directly or view it on GitHub https://github.com/Amber-MD/pytraj/issues/1151#issuecomment-188924257.
Daniel R. Roe, PhD Department of Medicinal Chemistry University of Utah 30 South 2000 East, Room 307 Salt Lake City, UT 84112-5820 http://home.chpc.utah.edu/~cheatham/ (801) 587-9652 (801) 585-6208 (Fax)
since I do not have osx to test and we don't have much time, I just added more info to README file
So clang is a silent requirement to build on OS X.
https://github.com/Amber-MD/pytraj/blob/master/README.md#install
# osx: pytraj will use clang to compile cython extension.
# if you want to change compiler, please check setup.py file
python setup.py install --disable-openmp
pytraj's setup.py should be a bit more informative and state that clang is required on OSX
I updated README file and the setup message too: https://github.com/Amber-MD/pytraj/blob/master/scripts/base_setup.py#L80-L81
Also, if libcpptraj was installed with openmp, pytraj will raise error https://github.com/Amber-MD/pytraj/pull/1157/files
thanks
close after a bunch of osx fixing.
I've recently been trying to compile cpptraj/pytraj on OS X and ran into an issue that took me some time to track down. After getting Macports/cython etc all set up, I built libcpptraj and then tried to make pytraj. I first got hit with this error:
Fair enough - so I went back and re-configured libcpptraj with OpenMP. After that build finished I once again tried to install pytraj. Ended up with a new error:
What I found strange was that instead of gcc (my active port) pytraj setup was defaulting to clang. This persisted even when I tried to explicitly set the CC/CXX environment variables. After some digging, I found it was due to this part of setup.py:
So clang is a silent requirement to build on OS X. The problem is that the default clang does not support OpenMP (@swails I think maybe the macports one does?), but requiring OpenMP is the default for pytraj. I think that pytraj's setup.py should be a bit more informative and state that clang is required on OSX, and disable the OpenMP requirement on OS X (with a warning) if the active clang does not support it. @hainm What do you think?