Closed kfiz closed 6 years ago
Thanks for the report. IPOPT depends on serial MUMPS, which doesn't depend on MPI. The error messages suggest something having to do with OpenMP. Could you post the output of brew gist-logs ipopt
? Thanks.
I don't see any clues in there. It's possible something else got updated and out of sync. Could you try brew uninstall $(brew deps -r ipopt)
followed by brew install ipopt
?
Tried that, but it didn't work. Same result.
FWIW I installed the package without tests, since I will not use ipopt from c or c++.
Ok, I hope it works out for you until I figure out what went wrong.
Actually, could you post the output of brew gist-logs mumps
? Thanks.
I'm not sure why we don't see the MUMPS tests in the logs. Do those pass?
Should there be tests when compiling MUMPS from your formula? I'don't think they are executed.
Actually you're right. I'll see if there are tests that can be run at build time. Does brew test mumps
succeed?
EDIT: brew test mumps
runs the same tests that could be run at build time, so that should be sufficient.
brew test mumps
succeeds.
So when running the ipopt tests obviously clang is looking for omp.h
and can't find it. So I checked whether libomp is installed on my system, which it is. So my guess would be that clang is looking at the wrong places. omp.h
is symlinked to /usr/local/include
and libomp.dylib
is symlinked to /usr/local/lib
, so nothing out of the ordinary here. I haven't found a way yet to tell ipopt where to look for headers. Any suggestions?
The only way OpenMP comes into play is via METIS. Are you sure you have d86f1fbc152ccad632ba02be40ab251f8ca1ee31? If not, brew update
. Let's also see if #77 succeeds on the test bots.
Are you sure you have
d86f1fb
?
Yes, definitely.
Let's also see if #77 succeeds on the test bots.
ok
It turns out that -fopenmp
should be added to the compile flags because either MUMPS or METIS always depends on it. Somehow, the linker needs the flag again. Could you try brew update
and brew install ipopt
again?
Done, but clang weirdly doesn't seem to like -fopenmp
on my machine...
https://gist.github.com/275d9f6817f632542ae99b9e8c722a32
Something's wrong because ipopt
says depends_on "gcc"
, so it shouldn't be using clang at all. If you brew edit ipopt
and add the line
fails_with :clang
just before def install
, does it work? For some reason, I don't need to do that, and neither does the build bot...
That helped, which leads to a partial success, since now all tests, except for the Fortran Test succeed. https://gist.github.com/208cc078bfbbd463f5ab3a6e806f19f0
The problem seems to be, that fopenmp
is not passed to gfortran.
So I adjusted FCFLAGS
in ipopt.rb
and now it works.
Here's the patch of all the changes.
ipopt.patch.txt
Would this work?
diff --git a/ipopt.rb b/ipopt.rb
index 617ee6c..b9b121a 100644
--- a/ipopt.rb
+++ b/ipopt.rb
@@ -14,6 +14,8 @@ class Ipopt < Formula
depends_on "openblas"
depends_on "pkg-config" => :build
+ fails_with :clang # because of OpenMP
+
def install
mumps_libs = %w[-ldmumps -lmumps_common -lpord -lmpiseq]
mumps_libs << "-lmetis" if Tab.for_name("mumps").with?("metis")
@@ -35,6 +37,7 @@ class Ipopt < Formula
"--with-asl-lib=-L#{Formula["ampl-mp"].opt_lib} -lasl"]
ENV.append_to_cflags "-fopenmp" # for MUMPS and/or METIS
+ ENV.append "FFLAGS", "-fopenmp"
system "./configure", *args
system "make"
ENV.deparallelize # Needs a serialized install
That works for me.
Ok, thank you. #78 should do it then.
Hi, ipopt installation fails during
make test
. My guess: the tests have some open-mpi dependency, that is not satisfied.Best
Doro