<div dir="ltr">I don't know that much about Mumps, but it looks like the Ipopt homebrew recipe builds Ipopt with the MPI version of Mumps. The formula is here:<div><br></div><div><a href="https://github.com/Homebrew/homebrew-core/blob/master/Formula/ipopt.rb">https://github.com/Homebrew/homebrew-core/blob/master/Formula/ipopt.rb</a> <br></div><div><br></div><div>It looks to me like the easiest solution is just to build Ipopt yourself instead of with Homebrew. You are already downloading the Ipopt code anyway, so this would seem to be straightforward. If you really need to install from homebrew, I just found another tap that provides an Ipopt recipe and expicitly allows the option not to use MPI:</div><div><div><br></div><div><a href="https://github.com/dpo/homebrew-openblas/tree/master/Formula">https://github.com/dpo/homebrew-openblas</a></div><div><br></div><div>You could either use this one or submit a PR to Homebrew core to ask that this option be added (not sure how successful this will be).</div><div> </div></div><div>Cheers, <br></div><div><br></div><div>Ted </div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 19, 2019 at 11:18 PM Ray Zimmerman <<a href="mailto:rz10@cornell.edu">rz10@cornell.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div style="overflow-wrap: break-word;"><div>Hi all,</div><div><br></div>I use Octave with IPOPT for continuous integration testing of some of my code via Travis CI. I am able to build a working MEX file in their Linux container, but so far I’m getting MPI runtime errors in their macOS container.<div><br></div><div>Homebrew is used to install IPOPT and Octave in the macOS container …</div><div><br></div><div><font face="Courier">brew install ipopt</font></div><div><font face="Courier">brew install octave</font></div><div><br></div><div>… then grab the corresponding source from the <a href="http://coin-or.org/" target="_blank">coin-or.org</a> site, and build it using the Makefile below, as follows:</div><div><br></div><div><div><font face="Courier"><div>IPOPT_VER=3.12.13</div></font></div><div><font face="Courier">curl -SL <a href="https://www.coin-or.org/download/source/Ipopt/Ipopt-$%7BIPOPT_VER%7D.tgz" target="_blank">https://www.coin-or.org/download/source/Ipopt/Ipopt-${IPOPT_VER}.tgz</a> | tar -xzC $TRAVIS_BUILD_DIR/build</font></div><div><font face="Courier">mv $TRAVIS_BUILD_DIR/build/Ipopt-${IPOPT_VER}/Ipopt/contrib/MatlabInterface $TRAVIS_BUILD_DIR/build/ipopt</font></div><div><font face="Courier">mv $TRAVIS_BUILD_DIR/.travis/Makefile $TRAVIS_BUILD_DIR/build/ipopt/src</font></div><div><font face="Courier">make -C $TRAVIS_BUILD_DIR/build/ipopt/src</font></div><div><br></div><div>It builds fine, but at runtime, when attempting to call the MEX file from Octave, I get the following error:</div><div><br></div><div><font face="Courier"><span style="font-size:13.3333px">*** The MPI_Comm_f2c() function was called before MPI_INIT was invoked.</span><br style="font-size:13.3333px"><span style="font-size:13.3333px">*** This is disallowed by the MPI standard.</span><br style="font-size:13.3333px"><span style="font-size:13.3333px">*** Your MPI job will now abort.</span><br style="font-size:13.3333px"><span style="font-size:13.3333px">[Traviss-Mac-6.local:87648] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!</span></font></div><div><br></div><div>Any suggestions for how to modify either the homebrew IPOPT install or the MEX build to avoid the use of MPI?</div><div><br></div><div>Thanks,</div><div><br></div><div> Ray</div><div><br></div><div>————————————————</div><div><br></div><div>Makefile contents:</div></div><div><br></div><div><div><font face="Courier"># Copyright 2017 Richard Lincoln. All rights reserved.</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">OBJS = callbackfunctions.o \</font></div><div><font face="Courier"> ipoptoptions.o \</font></div><div><font face="Courier"> ipopt.o \</font></div><div><font face="Courier"> iterate.o \</font></div><div><font face="Courier"> matlabexception.o \</font></div><div><font face="Courier"> matlabfunctionhandle.o \</font></div><div><font face="Courier"> matlabinfo.o \</font></div><div><font face="Courier"> matlabjournal.o \</font></div><div><font face="Courier"> matlabprogram.o \</font></div><div><font face="Courier"> options.o \</font></div><div><font face="Courier"> sparsematrix.o</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">CXXFLAGS = -fPIC -std=c++11 -O3 -DIPOPT_BUILD -DMATLAB_MEXFILE -DHAVE_CSTDDEF</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">INCL = `pkg-config --cflags ipopt` -I`mkoctfile -p OCTINCLUDEDIR`</font></div><div><font face="Courier">LIBS = `pkg-config --libs ipopt`</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">all: ipopt.mex</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">%.o: %.cpp</font></div><div><font face="Courier"> g++ $(CXXFLAGS) $(INCL) -o $@ -c $^</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">ipopt.mex: $(OBJS)</font></div><div><font face="Courier"> mkoctfile $(LIBS) -v --mex --output $@ $^</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">clean:</font></div><div><font face="Courier"> rm -f $(OBJS) ipopt.mex</font></div><div><font face="Courier"><br></font></div><div><font face="Courier">check:</font></div><div><font face="Courier"> octave-cli --no-gui -p `pwd`/examples --eval "examplehs038;examplehs051;examplehs071;examplelasso"</font></div></div><div><br></div></div></div>_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="https://list.coin-or.org/mailman/listinfo/ipopt" rel="noreferrer" target="_blank">https://list.coin-or.org/mailman/listinfo/ipopt</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Dr. Ted Ralphs<br>Professor, Industrial and Systems Engineering<br>Lehigh University<br>(610) 628-1280<br>ted 'at' lehigh 'dot' edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br></div></div></div></div></div></div></div></div>