mrklein / openfoam-os-x

Patches for OpenFOAM(R) to build it on OS X
93 stars 33 forks source link

scotch installation fails in Mac 10.14.2 with homebrew #46

Closed aqeelahmed168 closed 5 years ago

aqeelahmed168 commented 5 years ago

mpicc -O3 -fPIC -Drestrict=restrict -DCOMMON_PTHREAD_BARRIER -DCOMMON_PTHREAD -DSCOTCH_CHECK_AUTO -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DSCOTCH_RENAME -DCOMMON_FILE_COMPRESS_BZ2 -DCOMMON_FILE_COMPRESS_GZ -DSCOTCH_PTSCOTCH -I../../include -L../../lib test_scotch_dgraph_redist.c -o test_scotch_dgraph_redist -lptscotch -lscotch -lptscotcherrexit -lm -lz -lpthread -lbz2 make[1]: [check] Error 2 make: [check] Error 2 make: *** Waiting for unfinished jobs.... ./test_strat_par dyld: dyld section not supported in /usr/local/Cellar/scotch/6.0.4_1/lib/libptscotch.dylib make[2]: [check_strat_par] Abort trap: 6 make[2]: Waiting for unfinished jobs.... make[1]: [ptcheck] Error 2 make: [ptcheck] Error 2

mrklein commented 5 years ago

Hi,

Thanks for the report. I do not have access to macOS Mojave, so I won't be able to reproduce the error and fix it. Maybe one day Homebrew will include Scotch in core, right now, you can skip the library installation (it you do not plan to use Scotch decomposition.)

aqeelahmed168 commented 5 years ago

Hi, Thanks for the response. How can I install this library manually, is there any other option? I have tried a couple of times to install version 5.0 and 4.1 but the compilation stopped at some point. Not same location in both cases. Mixing scotch has to do anything with that ? I followed the instructions as mentioned for here https://github.com/mrklein/openfoam-os-x/wiki/OpenFOAM(R)-release-&-Homebrew Also, the version numbering needs to be updated in your guide. The 5.0 is 5-0 on OpenFOAM server if the new download is required.

michaelaye commented 5 years ago

just wondering, do you have a reason to go through the painful self compilation instead of using the docker containers? They should have all libraries required. I am using the docker containers successfully on macOS 10.13.6 (High Sierra), but don't see a reason why they shouldn't work on Mojave, as that's the idea of container-ization.

aqeelahmed168 commented 5 years ago

I am already using docker. I though direct compilation would create an environment like we get in Linux. Able to directly run through terminal and use multi presserros.

mrklein commented 5 years ago

@aqeelahmed168 I need more details. Theoretically missing Scotch should not interfere with compilation (as build scripts check library availability and skip corresponding part if library is not installed). Could you post the error message?

Concerning initial error, since in fact it is not a problem of compilation, but a problem of running tests, maybe you can remove tests from scotch formula (comment out everything between test do and corresponding end in scotch.rb).

AleksZhuravlyov commented 5 years ago

brew install scotch --without-check

matteoicardi commented 5 years ago

same problem here, everything compiles, including scotch with this link [https://raw.githubusercontent.com/jslee02/homebrew-core/3ec5109c8d7bddb6631e9b76f3c540d66f61357f/Formula/scotch.rb], but then decomposePar and all other parallel utilities give me "section not supported" on the scotch dylib

mrklein commented 5 years ago

I have pushed 13ee435d5b2006e6e8e8df6692d20be6b7f99d61 to address the issue. Could you test formula file?

AleksZhuravlyov commented 5 years ago

@mrklein, I had scotch, which was installed as "brew install scotch --without-check". I've made "brew remove scotch" and "brew install scotch.rb" using https://github.com/mrklein/openfoam-os-x/commit/13ee435d5b2006e6e8e8df6692d20be6b7f99d61 and scotch was installed without errors.

mrklein commented 5 years ago

@AleksZhuravljov, Thank you. Did you have problems with scotch decomposition, described by @matteoicardi ?

AleksZhuravlyov commented 5 years ago

@mrklein I didn't. I guess it can depend on the solver which is used. And I actually don't use parallel utilities. I can test a project where can be such a problem if you pick up one.

mrklein commented 5 years ago

@AleksZhuravljov: well, if you do not decompose a case, you should not encounter the error. Let's wait for someone, who does decompose their cases.

matteoicardi commented 5 years ago

Thanks @AleksZhuravljov , it works now!

mrklein commented 5 years ago

Since, it seems, formula works now, closing the issue.