<div dir="ltr">Ah yes, very good point about bash on OS X. You absolutely need to install and use Homebrew bash. I will add it to the documentation. <div><br></div><div>For the problem with pkg-config search path, you can just set the environment variable PKG_CONFIG_PATH. I do something like</div><div><br></div><div><div><font face="Courier">INCL = `PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --cflags ipopt` -I`mkoctfile -p OCTINCLUDEDIR`</font></div><div><font face="Courier">LIBS = `PKG_CONFIG_PATH=/usr/local/lib/pkgconfig </font><span style="font-family:Courier">pkg-config --libs ipopt`</span></div><div><span style="font-family:Courier"><br></span></div>Cheers,<br><br>Ted</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 21, 2019 at 12:56 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;">Thanks Ted. This is helpful.<div><br></div><div>FYI, when I tried using <font face="Courier">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" target="_blank">here</a> that should be done before running <font face="Courier">coinbrew</font>.</div><div><br></div><div>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><br></div><div>The Makefile I used to build successfully with Homebrew installed ipopt has the following lines …</div><div><div><br></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><br></div><div>And <font face="Courier">pkg-config</font> complains that <i>"Package ipopt was not found in the pkg-config search path."</i></div><div>Can anyone offer a suggestion on how to modify them for an installation of IPOPT that was built from source?</div><div><br></div><div>Thanks,</div><div><br></div><div>    Ray</div><div><br></div><div><div><br><blockquote type="cite"><div>On Nov 20, 2019, at 9:24 AM, Ted Ralphs <<a href="mailto:ted@lehigh.edu" target="_blank">ted@lehigh.edu</a>> wrote:</div><br><div><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" target="_blank">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" target="_blank">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" target="_blank">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><div><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"><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>
</div></blockquote></div><br></div></div></div></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>