[Ipopt] Questions About Fortran 90 Interface

Wang, Yajie ywang273 at ur.rochester.edu
Sat Feb 8 11:10:04 EST 2020


Hi all,

Hi all, I just fixed the problem.

Use the following code to compile:

gfortran hs071.f90 -o hs071.out -L /usr/local/lib -lipopt -g -Wall -fcheck=all

But notice that if your library of IPOPT is 64-bit, need to change the code from

integer IPROBLEM
integer IPCREATE
into

integer*8 IPROBLEM
integer*8 IPCREATE

Hope this thread can help someone!
________________________________
From: Wang, Yajie
Sent: Sunday, January 26, 2020 8:57 AM
To: ipopt at list.coin-or.org <ipopt at list.coin-or.org>
Subject: Questions About Fortran 90 Interface


Hi, all!

I have tried the pyipopt to run IPOPT. That works well.

I am using Fortran 90 now. I look into hs071_f for the Fortran interface. I guess it is written in Fortran 77? Unfortunately, I really don't understand.

I was wondering whether there was a Fortran 90 interface?

Though I just found a Fortran90 Interface Source from http://apmonitor.com/wiki/index.php/Main/DownloadIpopt, I cannot build it. It is because I am using Mac but the source is for Windows?

Errors:

gfortran hs071.f90 -o vfi.out -fbounds-check -O2
Undefined symbols for architecture x86_64:
"_ipaddintoption_", referenced from:
_MAIN__ in cculABQh.o
"_ipaddnumoption_", referenced from:
_MAIN__ in cculABQh.o
"_ipaddstroption_", referenced from:
_MAIN__ in cculABQh.o
"_ipcreate_", referenced from:
_MAIN__ in cculABQh.o
"_ipfree_", referenced from:
_MAIN__ in cculABQh.o
"_ipopenoutputfile_", referenced from:
_MAIN__ in cculABQh.o
"_ipsolve_", referenced from:
_MAIN__ in cculABQh.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

Looking forward to any advice! Thanks in advance.

Best wishes,

Yajie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20200208/8ef39222/attachment.html>


More information about the Ipopt mailing list