<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks Ted. This is helpful.<div class=""><br class=""></div><div class="">FYI, when I tried using <font face="Courier" class="">coinbrew</font> to install from source, I got an error due to macOS bash being older than required. So I believe bash needs to be added to the brew installs listed <a href="https://coin-or.github.io/user_introduction.html#os-x-1" class="">here</a> that should be done before running <font face="Courier" class="">coinbrew</font>.</div><div class=""><br class=""></div><div class="">I’m able to build IPOPT from source now, both 3.13 (which I discovered no longer includes the files to build the Matlab interface) and 3.12 (which does). My (hopefully last) remaining roadblock is collecting the correct include and lib options to use to make the MEX interface.</div><div class=""><br class=""></div><div class="">The Makefile I used to build successfully with Homebrew installed ipopt has the following lines …</div><div class=""><div class=""><br class=""></div><div class=""><font face="Courier" class="">INCL = `pkg-config --cflags ipopt` -I`mkoctfile -p OCTINCLUDEDIR`</font></div><div class=""><font face="Courier" class="">LIBS = `pkg-config --libs ipopt`</font></div><div class=""><br class=""></div><div class="">And <font face="Courier" class="">pkg-config</font> complains that <i class="">"Package ipopt was not found in the pkg-config search path."</i></div><div class="">Can anyone offer a suggestion on how to modify them for an installation of IPOPT that was built from source?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">    Ray</div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 20, 2019, at 9:24 AM, Ted Ralphs <<a href="mailto:ted@lehigh.edu" class="">ted@lehigh.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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 class=""><br class=""></div><div class=""><a href="https://github.com/Homebrew/homebrew-core/blob/master/Formula/ipopt.rb" class="">https://github.com/Homebrew/homebrew-core/blob/master/Formula/ipopt.rb</a>  <br class=""></div><div class=""><br class=""></div><div class="">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 class=""><div class=""><br class=""></div><div class=""><a href="https://github.com/dpo/homebrew-openblas/tree/master/Formula" class="">https://github.com/dpo/homebrew-openblas</a></div><div class=""><br class=""></div><div class="">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 class=""> </div></div><div class="">Cheers, <br class=""></div><div class=""><br class=""></div><div class="">Ted </div><div class=""><br class=""></div><div class=""><br class=""></div></div><br class=""><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" class="">rz10@cornell.edu</a>> wrote:<br class=""></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;" class=""><div style="overflow-wrap: break-word;" class=""><div class="">Hi all,</div><div class=""><br class=""></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 class=""><br class=""></div><div class="">Homebrew is used to install IPOPT and Octave in the macOS container …</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">brew install ipopt</font></div><div class=""><font face="Courier" class="">brew install octave</font></div><div class=""><br class=""></div><div class="">… then grab the corresponding source from the <a href="http://coin-or.org/" target="_blank" class="">coin-or.org</a> site, and build it using the Makefile below, as follows:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier" class=""><div class="">IPOPT_VER=3.12.13</div></font></div><div class=""><font face="Courier" class="">curl -SL <a href="https://www.coin-or.org/download/source/Ipopt/Ipopt-$%7BIPOPT_VER%7D.tgz" target="_blank" class="">https://www.coin-or.org/download/source/Ipopt/Ipopt-${IPOPT_VER}.tgz</a> | tar -xzC $TRAVIS_BUILD_DIR/build</font></div><div class=""><font face="Courier" class="">mv $TRAVIS_BUILD_DIR/build/Ipopt-${IPOPT_VER}/Ipopt/contrib/MatlabInterface $TRAVIS_BUILD_DIR/build/ipopt</font></div><div class=""><font face="Courier" class="">mv $TRAVIS_BUILD_DIR/.travis/Makefile $TRAVIS_BUILD_DIR/build/ipopt/src</font></div><div class=""><font face="Courier" class="">make -C $TRAVIS_BUILD_DIR/build/ipopt/src</font></div><div class=""><br class=""></div><div class="">It builds fine, but at runtime, when attempting to call the MEX file from Octave, I get the following error:</div><div class=""><br class=""></div><div class=""><font face="Courier" class=""><span style="font-size:13.3333px" class="">*** The MPI_Comm_f2c() function was called before MPI_INIT was invoked.</span><br style="font-size:13.3333px" class=""><span style="font-size:13.3333px" class="">*** This is disallowed by the MPI standard.</span><br style="font-size:13.3333px" class=""><span style="font-size:13.3333px" class="">*** Your MPI job will now abort.</span><br style="font-size:13.3333px" class=""><span style="font-size:13.3333px" class="">[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 class=""><br class=""></div><div class="">Any suggestions for how to modify either the homebrew IPOPT install or the MEX build to avoid the use of MPI?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">    Ray</div><div class=""><br class=""></div><div class="">————————————————</div><div class=""><br class=""></div><div class="">Makefile contents:</div></div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier" class=""># Copyright 2017 Richard Lincoln. All rights reserved.</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">OBJS = callbackfunctions.o \</font></div><div class=""><font face="Courier" class="">       ipoptoptions.o \</font></div><div class=""><font face="Courier" class="">       ipopt.o \</font></div><div class=""><font face="Courier" class="">       iterate.o \</font></div><div class=""><font face="Courier" class="">       matlabexception.o \</font></div><div class=""><font face="Courier" class="">       matlabfunctionhandle.o \</font></div><div class=""><font face="Courier" class="">       matlabinfo.o \</font></div><div class=""><font face="Courier" class="">       matlabjournal.o \</font></div><div class=""><font face="Courier" class="">       matlabprogram.o \</font></div><div class=""><font face="Courier" class="">       options.o \</font></div><div class=""><font face="Courier" class="">       sparsematrix.o</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">CXXFLAGS = -fPIC -std=c++11 -O3 -DIPOPT_BUILD -DMATLAB_MEXFILE -DHAVE_CSTDDEF</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">INCL = `pkg-config --cflags ipopt` -I`mkoctfile -p OCTINCLUDEDIR`</font></div><div class=""><font face="Courier" class="">LIBS = `pkg-config --libs ipopt`</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">all: ipopt.mex</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">%.o: %.cpp</font></div><div class=""><font face="Courier" class="">    g++ $(CXXFLAGS) $(INCL) -o $@ -c $^</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">ipopt.mex: $(OBJS)</font></div><div class=""><font face="Courier" class="">    mkoctfile $(LIBS) -v --mex --output $@ $^</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">clean:</font></div><div class=""><font face="Courier" class="">    rm -f $(OBJS) ipopt.mex</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">check:</font></div><div class=""><font face="Courier" class="">    octave-cli --no-gui -p `pwd`/examples --eval "examplehs038;examplehs051;examplehs071;examplelasso"</font></div></div><div class=""><br class=""></div></div></div>_______________________________________________<br class="">
Ipopt mailing list<br class="">
<a href="mailto:Ipopt@list.coin-or.org" target="_blank" class="">Ipopt@list.coin-or.org</a><br class="">
<a href="https://list.coin-or.org/mailman/listinfo/ipopt" rel="noreferrer" target="_blank" class="">https://list.coin-or.org/mailman/listinfo/ipopt</a><br class="">
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Dr. Ted Ralphs<br class="">Professor, Industrial and Systems Engineering<br class="">Lehigh University<br class="">(610) 628-1280<br class="">ted 'at' lehigh 'dot' edu<br class=""><a href="http://coral.ie.lehigh.edu/~ted" target="_blank" class="">coral.ie.lehigh.edu/~ted</a><br class=""></div></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></div></div></body></html>