R interface installation

23 views
Skip to first unread message

stuart

unread,
Jul 7, 2008, 9:11:04โ€ฏAM7/7/08
to TANGO Project - ALGENCAN
Hi,
Installing the R interface on Suse 11 is not going too well for me.
(a) downloaded Algencan into /home/myhome/algencan - although could
not install according to the instructions, I successfully ran make
algencan-c PROBNAME="toyprob" as discussed previously in this forum
(b) downloaded R-interface files into /home/myhome/tango and from this
directory successfully executed (as root) the command gfortran -O4 -c -
shared -fPIC -xf77-cpp-input /home/myhome/algencan/sources/algencan/
algencan.f (c) however, could not run gcc++ -O4 -c -shared -fPIC -
Df2cFortran -I/usr/share/R/include rwrapper.c Are you able to help me
with some clarification of the instructions?
Many thanks,
Stuart

gcc -O4 -c -shared -fPIC -Df2cFortran -I/usr/share/R/include
rwrapper.c caused the following errors:
In file included from rwrapper.c:60:
rwrapper.h:2:15: error: R.h: No such file or directory
rwrapper.h:3:22: error: Rdefines.h: No such file or directory
In file included from rwrapper.c:60:
rwrapper.h:5: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜evalf_rโ€™
rwrapper.h:87: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜createRRealScalarโ€™
rwrapper.h:89: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜createRRealVectorโ€™
rwrapper.h:91: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜createRIntScalarโ€™
rwrapper.h:93: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜createRIntVectorโ€™
rwrapper.h:95: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜algencanโ€™
rwrapper.c:68: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜createRRealScalarโ€™
rwrapper.c:83: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™
before โ€˜createRRealVectorโ€™
rwrapper.c:107: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or
โ€˜__attribute__โ€™ before โ€˜createRIntScalarโ€™
rwrapper.c:122: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or
โ€˜__attribute__โ€™ before โ€˜createRIntVectorโ€™
rwrapper.c: In function โ€˜inipโ€™:
rwrapper.c:151: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:151: error: (Each undeclared identifier is reported only
once
rwrapper.c:151: error: for each function it appears in.)
rwrapper.c:151: error: expected โ€˜;โ€™ before โ€˜n_rโ€™
rwrapper.c:156: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:163: error: โ€˜inip_rโ€™ undeclared (first use in this
function)
rwrapper.c:165: error: โ€˜n_rโ€™ undeclared (first use in this function)
rwrapper.c:166: error: โ€˜x_rโ€™ undeclared (first use in this function)
rwrapper.c:167: error: โ€˜m_rโ€™ undeclared (first use in this function)
rwrapper.c:168: error: โ€˜l_rโ€™ undeclared (first use in this function)
rwrapper.c:169: error: โ€˜u_rโ€™ undeclared (first use in this function)
rwrapper.c:170: error: โ€˜lambda_rโ€™ undeclared (first use in this
function)
rwrapper.c:171: error: โ€˜equatn_rโ€™ undeclared (first use in this
function)
rwrapper.c:172: error: โ€˜linear_rโ€™ undeclared (first use in this
function)
rwrapper.c:174: error: subscripted value is neither array nor pointer
rwrapper.c:175: error: subscripted value is neither array nor pointer
rwrapper.c:185: error: subscripted value is neither array nor pointer
rwrapper.c:186: error: subscripted value is neither array nor pointer
rwrapper.c:187: error: subscripted value is neither array nor pointer
rwrapper.c:191: error: subscripted value is neither array nor pointer
rwrapper.c:192: error: subscripted value is neither array nor pointer
rwrapper.c:193: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜evalfโ€™:
rwrapper.c:203: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:203: error: expected โ€˜;โ€™ before โ€˜flag_rโ€™
rwrapper.c:205: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:208: error: โ€˜evalf_rโ€™ undeclared (first use in this
function)
rwrapper.c:210: error: โ€˜f_rโ€™ undeclared (first use in this function)
rwrapper.c:211: error: โ€˜flag_rโ€™ undeclared (first use in this
function)
rwrapper.c:213: error: subscripted value is neither array nor pointer
rwrapper.c:214: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜evalgโ€™:
rwrapper.c:224: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:224: error: expected โ€˜;โ€™ before โ€˜flag_rโ€™
rwrapper.c:226: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:230: error: โ€˜evalg_rโ€™ undeclared (first use in this
function)
rwrapper.c:232: error: โ€˜g_rโ€™ undeclared (first use in this function)
rwrapper.c:233: error: โ€˜flag_rโ€™ undeclared (first use in this
function)
rwrapper.c:236: error: subscripted value is neither array nor pointer
rwrapper.c:238: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜evalhโ€™:
rwrapper.c:250: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:250: error: expected โ€˜;โ€™ before โ€˜hlin_rโ€™
rwrapper.c:252: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:258: error: โ€˜evalh_rโ€™ undeclared (first use in this
function)
rwrapper.c:260: error: โ€˜nnzh_rโ€™ undeclared (first use in this
function)
rwrapper.c:261: error: โ€˜flag_rโ€™ undeclared (first use in this
function)
rwrapper.c:262: error: โ€˜hlin_rโ€™ undeclared (first use in this
function)
rwrapper.c:263: error: โ€˜hcol_rโ€™ undeclared (first use in this
function)
rwrapper.c:264: error: โ€˜hval_rโ€™ undeclared (first use in this
function)
rwrapper.c:266: error: subscripted value is neither array nor pointer
rwrapper.c:269: error: subscripted value is neither array nor pointer
rwrapper.c:270: error: subscripted value is neither array nor pointer
rwrapper.c:271: error: subscripted value is neither array nor pointer
rwrapper.c:274: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜evalcโ€™:
rwrapper.c:283: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:283: error: expected โ€˜;โ€™ before โ€˜flag_rโ€™
rwrapper.c:285: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:289: error: โ€˜evalc_rโ€™ undeclared (first use in this
function)
rwrapper.c:291: error: โ€˜c_rโ€™ undeclared (first use in this function)
rwrapper.c:292: error: โ€˜flag_rโ€™ undeclared (first use in this
function)
rwrapper.c:294: error: subscripted value is neither array nor pointer
rwrapper.c:295: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜evaljacโ€™:
rwrapper.c:307: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:307: error: expected โ€˜;โ€™ before โ€˜flag_rโ€™
rwrapper.c:309: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:315: error: โ€˜evaljac_rโ€™ undeclared (first use in this
function)
rwrapper.c:317: error: โ€˜nnzjac_rโ€™ undeclared (first use in this
function)
rwrapper.c:318: error: โ€˜indjac_rโ€™ undeclared (first use in this
function)
rwrapper.c:319: error: โ€˜valjac_rโ€™ undeclared (first use in this
function)
rwrapper.c:320: error: โ€˜flag_rโ€™ undeclared (first use in this
function)
rwrapper.c:322: error: subscripted value is neither array nor pointer
rwrapper.c:325: error: subscripted value is neither array nor pointer
rwrapper.c:326: error: subscripted value is neither array nor pointer
rwrapper.c:329: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜evalhcโ€™:
rwrapper.c:342: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:342: error: expected โ€˜;โ€™ before โ€˜hclin_rโ€™
rwrapper.c:344: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:351: error: โ€˜evalhc_rโ€™ undeclared (first use in this
function)
rwrapper.c:353: error: โ€˜nnzhc_rโ€™ undeclared (first use in this
function)
rwrapper.c:354: error: โ€˜hclin_rโ€™ undeclared (first use in this
function)
rwrapper.c:355: error: โ€˜hccol_rโ€™ undeclared (first use in this
function)
rwrapper.c:356: error: โ€˜hcval_rโ€™ undeclared (first use in this
function)
rwrapper.c:357: error: โ€˜flag_rโ€™ undeclared (first use in this
function)
rwrapper.c:359: error: subscripted value is neither array nor pointer
rwrapper.c:362: error: subscripted value is neither array nor pointer
rwrapper.c:363: error: subscripted value is neither array nor pointer
rwrapper.c:364: error: subscripted value is neither array nor pointer
rwrapper.c:367: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜evalhlpโ€™:
rwrapper.c:378: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:378: error: expected โ€˜;โ€™ before โ€˜hp_rโ€™
rwrapper.c:380: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:388: error: โ€˜evalhlp_rโ€™ undeclared (first use in this
function)
rwrapper.c:390: error: โ€˜hp_rโ€™ undeclared (first use in this function)
rwrapper.c:391: error: โ€˜goth_rโ€™ undeclared (first use in this
function)
rwrapper.c:392: error: โ€˜flag_rโ€™ undeclared (first use in this
function)
rwrapper.c:395: error: subscripted value is neither array nor pointer
rwrapper.c:397: error: subscripted value is neither array nor pointer
rwrapper.c:398: error: subscripted value is neither array nor pointer
rwrapper.c: In function โ€˜endpโ€™:
rwrapper.c:408: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:417: error: โ€˜endp_rโ€™ undeclared (first use in this
function)
rwrapper.c: In function โ€˜paramโ€™:
rwrapper.c:431: error: โ€˜SEXPโ€™ undeclared (first use in this function)
rwrapper.c:431: error: expected โ€˜;โ€™ before โ€˜rhoauto_rโ€™
rwrapper.c:435: error: โ€˜environment_rโ€™ undeclared (first use in this
function)
rwrapper.c:439: error: โ€˜param_rโ€™ undeclared (first use in this
function)
rwrapper.c:440: error: โ€˜rhoauto_rโ€™ undeclared (first use in this
function)
rwrapper.c:441: error: โ€˜rhotype_rโ€™ undeclared (first use in this
function)
rwrapper.c:442: error: โ€˜rhomult_rโ€™ undeclared (first use in this
function)
rwrapper.c:443: error: โ€˜rhofrac_rโ€™ undeclared (first use in this
function)
rwrapper.c:444: error: โ€˜rho_rโ€™ undeclared (first use in this function)
rwrapper.c:445: error: โ€˜gtype_rโ€™ undeclared (first use in this
function)
rwrapper.c:446: error: โ€˜hptype_rโ€™ undeclared (first use in this
function)
rwrapper.c:447: error: โ€˜intype_rโ€™ undeclared (first use in this
function)
rwrapper.c:448: error: โ€˜precond_rโ€™ undeclared (first use in this
function)
rwrapper.c:449: error: โ€˜checkder_rโ€™ undeclared (first use in this
function)
rwrapper.c:450: error: โ€˜epsfeas_rโ€™ undeclared (first use in this
function)
rwrapper.c:451: error: โ€˜epsopt_rโ€™ undeclared (first use in this
function)
rwrapper.c:452: error: โ€˜maxoutit_rโ€™ undeclared (first use in this
function)
rwrapper.c:453: error: โ€˜maxtotit_rโ€™ undeclared (first use in this
function)
rwrapper.c:454: error: โ€˜maxtotfc_rโ€™ undeclared (first use in this
function)
rwrapper.c:455: error: โ€˜iprint_rโ€™ undeclared (first use in this
function)
rwrapper.c:456: error: โ€˜ncomp_rโ€™ undeclared (first use in this
function)
rwrapper.c:458: error: subscripted value is neither array nor pointer
rwrapper.c:459: error: subscripted value is neither array nor pointer
rwrapper.c:460: error: subscripted value is neither array nor pointer
rwrapper.c:461: error: subscripted value is neither array nor pointer
rwrapper.c:464: error: subscripted value is neither array nor pointer
rwrapper.c:466: error: subscripted value is neither array nor pointer
rwrapper.c:467: error: subscripted value is neither array nor pointer
rwrapper.c:468: warning: passing argument 2 of โ€˜strcpyโ€™ makes pointer
from integer without a cast
rwrapper.c:469: error: subscripted value is neither array nor pointer
rwrapper.c:470: error: subscripted value is neither array nor pointer
rwrapper.c:471: error: subscripted value is neither array nor pointer
rwrapper.c:472: error: subscripted value is neither array nor pointer
rwrapper.c:473: error: subscripted value is neither array nor pointer
rwrapper.c:474: error: subscripted value is neither array nor pointer
rwrapper.c:475: error: subscripted value is neither array nor pointer
rwrapper.c:476: error: subscripted value is neither array nor pointer
rwrapper.c: At top level:
rwrapper.c:548: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or
โ€˜__attribute__โ€™ before โ€˜algencanโ€™

Ernesto G. Birgin

unread,
Jul 7, 2008, 9:26:20โ€ฏAM7/7/08
to TANGO Project - ALGENCAN
Dear Stuart, many thanks for your interest in our work.

ALGENCAN 1.0 is available as individual files from the TANGO Project
web page:

http://www.ime.usp.br/~egbirgin/tango/

ALGENCAN 1.0 has a Fortran 77 stand-alone version as well as
interfaces with AMPL, C/C++, CUTEr, Matlab, Octave, Python and R. To
install and run the Fortran 77 stand-alone version or any of the
interfaced versions, please, follow the individual Quick Start
instructions.

The beta version ALGENCAN 2.0 (current version is 2.0.2) is also
availabe as a tarball file. In this version all the interfaces are
available, unless the R and the Octave interfaces. Interfaces of
ALGENCAN 1.0 can not be used in connection with ALGENCAN 2.0. We are
currently developing the missing interfaces that will be available
soon.

I hope it helps,
Ernesto.

Stuart Nettleton

unread,
Jul 7, 2008, 9:42:24โ€ฏAM7/7/08
to Ernesto G. Birgin, TANGO Project - ALGENCAN
Hi Ernesto,
I did use Algencan 2.0.2 beta rather than 1.0 so I will try again with 1.0.
Thanks,
Stuart

On Mon, 07 Jul 2008 23:26:20 +1000, Ernesto G. Birgin <egbi...@gmail.com>
wrote:

--
UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain
confidential information. If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments. If
you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly, and
with authority, states them to be the views the University of Technology,
Sydney. Before opening any attachments, please check them for viruses and
defects.

Ernesto G. Birgin

unread,
Jul 7, 2008, 9:44:34โ€ฏAM7/7/08
to Stuart Nettleton, TANGO Project - ALGENCAN
Ok, you are welcome. Please, let us know if you succeed using algencan or if there is something else we can do to help you to use it. Regards, Ernesto.
--
Ernesto G. Birgin
Department of Computer Science
http://www.ime.usp.br/~egbirgin

Stuart Nettleton

unread,
Jul 7, 2008, 9:59:10โ€ฏAM7/7/08
to Ernesto G. Birgin, TANGO Project - ALGENCAN
Hi Ernesto,
I downloaded the Algencan 1.0 individual files but received many errors
compiling
g77 -O4 -xf77-cpp-input algencanma.f toyprob.f algencan.f -o algencanma
...using gcc instead of g77.
Also, received the same errors as mentioned before with
gcc-4.2 -O4 -c -shared -fPIC -Df2cFortran -I/usr/share/R/include rwrapper.c
... using gcc-4.3 instead of gcc-4.2.
Will it take you a long time to complete your work on the R-interface?
Thanks,
Stuart

On Mon, 07 Jul 2008 23:44:34 +1000, Ernesto G. Birgin <egbi...@gmail.com>
wrote:

> Ok, you are welcome. Please, let us know if you succeed using algencan
> or if
> there is something else we can do to help you to use it. Regards,
> Ernesto.
>
> On Mon, Jul 7, 2008 at 10:42 AM, Stuart Nettleton <
> stuart.n...@optusnet.com.au> wrote:
>
>> Hi Ernesto,
>> I did use Algencan 2.0.2 beta rather than 1.0 so I will try again with
>> 1.0.
>> Thanks,
>> Stuart
>>
>>
>> On Mon, 07 Jul 2008 23:26:20 +1000, Ernesto G. Birgin
>> <egbi...@gmail.com>
>> wrote:
>>
>> Dear Stuart, many thanks for your interest in our work.
>>>
>>> ALGENCAN 1.0 is available as individual files from the TANGO Project
>>> web page:
>>>

>>> http://www.ime.usp.br/~egbirgin/tango/<http://www.ime.usp.br/%7Eegbirgin/tango/>

Ernesto G. Birgin

unread,
Jul 7, 2008, 10:37:23โ€ฏAM7/7/08
to TANGO Project - ALGENCAN
Dear Stuart,

I do not know whether I understood your comment. algencanma.f,
algencan.f and toyprob.f are Fortran 77 programs and, as the Quick
Start suggests, they must be complied using a Fortran 77 compiler as,
for example, g77. To compile them with gcc is not an option.

I guess the R interface will be ready soon. However, you will also
need a Fortran 77 compiler to use ALGENCAN 2.0. So, my recommendation
is to pursue with the compilation of ALGENCAN 1.0.

Regards,
Ernesto.



On Jul 7, 10:59 am, "Stuart Nettleton"
<stuart.nettle...@optusnet.com.au> wrote:
> Hi Ernesto,
> I downloaded the Algencan 1.0 individual files but received many errors
> compiling
> g77 -O4 -xf77-cpp-input algencanma.f toyprob.f algencan.f -o algencanma
> ...using gcc instead of g77.
> Also, received the same errors as mentioned before with
> gcc-4.2 -O4 -c -shared -fPIC -Df2cFortran -I/usr/share/R/include rwrapper.c
> ... using gcc-4.3 instead of gcc-4.2.
> Will it take you a long time to complete your work on the R-interface?
> Thanks,
> Stuart
>
> On Mon, 07 Jul 2008 23:44:34 +1000, Ernesto G. Birgin <egbir...@gmail.com>
> wrote:
>
> > Ok, you are welcome. Please, let us know if you succeed using algencan
> > or if
> > there is something else we can do to help you to use it. Regards,
> > Ernesto.
>
> > On Mon, Jul 7, 2008 at 10:42 AM, Stuart Nettleton <
> > stuart.nettle...@optusnet.com.au> wrote:
>
> >> Hi Ernesto,
> >> I did use Algencan 2.0.2 beta rather than 1.0 so I will try again with
> >> 1.0.
> >> Thanks,
> >> Stuart
>
> >> On Mon, 07 Jul 2008 23:26:20 +1000, Ernesto G. Birgin
> >> <egbir...@gmail.com>
> ...
>
> read more ยป

Paul Smith

unread,
Jul 7, 2008, 11:06:06โ€ฏAM7/7/08
to TANGO Project - ALGENCAN
On Mon, Jul 7, 2008 at 3:37 PM, Ernesto G. Birgin <egbi...@gmail.com> wrote:
> I guess the R interface will be ready soon. However, you will also
> need a Fortran 77 compiler to use ALGENCAN 2.0. So, my recommendation
> is to pursue with the compilation of ALGENCAN 1.0.

Could you please announce here the availability of the R interface as
soon as it becomes ready?

Thanks in advance,

Paul

Ernesto G. Birgin

unread,
Jul 7, 2008, 11:59:27โ€ฏAM7/7/08
to TANGO Project - ALGENCAN
Ok, no problem. Regards, Ernesto.

On Jul 7, 12:06 pm, "Paul Smith" <phh...@gmail.com> wrote:

Paul Smith

unread,
Jul 7, 2008, 12:31:38โ€ฏPM7/7/08
to TANGO Project - ALGENCAN

Thanks, Ernesto.

Paul

Ernesto G. Birgin

unread,
Jul 14, 2008, 3:10:37โ€ฏPM7/14/08
to TANGO Project - ALGENCAN
Dear Paul, the R interface for ALGENCAN 2.0 is now available. Regards,
Ernesto.

On Jul 7, 1:31 pm, "Paul Smith" <phh...@gmail.com> wrote:

Paul Smith

unread,
Jul 14, 2008, 3:33:22โ€ฏPM7/14/08
to TANGO Project - ALGENCAN
On Mon, Jul 14, 2008 at 8:10 PM, Ernesto G. Birgin <egbi...@gmail.com> wrote:
> Dear Paul, the R interface for ALGENCAN 2.0 is now available. Regards,

Thanks, Ernesto. It seems to be working fine! However, Fedora 9 users
need to replace the following line

RINC := /usr/share/R/include

with

RINC := /usr/include/R

Otherwise, one gets an error.

Paul

Stuart Nettleton

unread,
Jul 14, 2008, 8:19:18โ€ฏPM7/14/08
to Ernesto G. Birgin, TANGO Project - ALGENCAN
Hi Ernesto,
I have an error running make with algencan-2.0.4-beta.tgz
For R on Suse 11, I have modified RINC := /usr/share/R/include to RINC :=
/usr/lib/R/include/
Just checking that this this ok?
The make log is as follows.
Can you suggest what the problem might be?
Many thanks,
Stuart

> make
make -C /home/stuart/tango/algencan/sources/algencan
make[1]: Entering directory `/home/stuart/tango/algencan/sources/algencan'
gfortran -O4 -xf77-cpp-input -fPIC -c -o algencanma.o algencanma.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o algencan.o algencan.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o auglag.o auglag.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o backtrack.o backtrack.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o calc.o calc.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o cgm.o cgm.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o checkder.o checkder.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o drand.o drand.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o evalal.o evalal.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o fma27ad.o fma27ad.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o fmc30ad.o fmc30ad.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o fparam.o fparam.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o gencan.o gencan.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o happrox.o happrox.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o newtd.o newtd.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o newtonkkt.o newtonkkt.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o setpoint.o setpoint.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o sevalus.o sevalus.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o spgls.o spgls.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o tevalus.o tevalus.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o tnls.o tnls.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o uevalus.o uevalus.f
gfortran -O4 -xf77-cpp-input -fPIC -c -o vevalus.o vevalus.f
make[1]: Leaving directory `/home/stuart/tango/algencan/sources/algencan'
make -C /home/stuart/tango/algencan/sources/problems all install
make[1]: Entering directory `/home/stuart/tango/algencan/sources/problems'
gcc -o .o
gcc: no input files
make[1]: *** [.o] Error 1
make[1]: Leaving directory `/home/stuart/tango/algencan/sources/problems'
make: *** [algencan] Error 2

Ernesto G. Birgin

unread,
Jul 15, 2008, 6:47:18โ€ฏAM7/15/08
to TANGO Project - ALGENCAN
Dear Stuart, please, read the README file.

a) If files R.h and Rdefines.h are located at /usr/lib/R/include/ in
your Linux installation then yes, this is the correct value for RINC.
(This explanation is in the "R interface section" of the README file.)

b) Typing only "make" you are compiling the stand-alone Fortran 77
version of ALGENCAN 2.0 instead of the R interface as you desire. The
compilation of the stand-alone Fortran 77 version of ALGENCAN 2.0 is
not being successful because the name of the Fortran 77 file with the
definition of the problem is missing. To properly compile it you
should type "make PROBNAME=toyprob" or "make algencan
PROBNAME=toyprob, where toyprob.f is a Fortran 77 file (located at $
(PROBSRC)) with the definition of the problem to be solved. (This
explanation is in the "Stand-alone Fortran 77 section" of the README
file.)

c) Finally, to compile the R interface, as you want, you must type
"make algencan-r". (This explanation is in the "R interface section"
of the README
file.)

I hope it helps.

Best regards,
Ernesto.


On Jul 14, 9:19 pm, "Stuart Nettleton"

Stuart Nettleton

unread,
Jul 15, 2008, 7:35:40โ€ฏAM7/15/08
to Ernesto G. Birgin, TANGO Project - ALGENCAN
Hi Ernesto,
Indeed I should have read the README more fully. Algencan as a standalone
now runs fine.
However, I receive an error with part (c) of your email: make algencan-r.
"Cannot find -lg2c"
The full error is below. Your continued help is much appreciated!
Thanks,
Stuart

~/tango/algencan> make algencan-r


make -C /home/stuart/tango/algencan/sources/algencan
make[1]: Entering directory `/home/stuart/tango/algencan/sources/algencan'

make[1]: Nothing to be done for `all'.


make[1]: Leaving directory `/home/stuart/tango/algencan/sources/algencan'

make -C /home/stuart/tango/algencan/sources/interfaces/r all install
make[1]: Entering directory
`/home/stuart/tango/algencan/sources/interfaces/r'
R CMD SHLIB -shared -lg2c rwrapper.o
/home/stuart/tango/algencan/sources/algencan/algencan.o
/home/stuart/tango/algencan/sources/algencan/auglag.o
/home/stuart/tango/algencan/sources/algencan/backtrack.o
/home/stuart/tango/algencan/sources/algencan/calc.o
/home/stuart/tango/algencan/sources/algencan/cgm.o
/home/stuart/tango/algencan/sources/algencan/checkder.o
/home/stuart/tango/algencan/sources/algencan/drand.o
/home/stuart/tango/algencan/sources/algencan/evalal.o
/home/stuart/tango/algencan/sources/algencan/fma27ad.o
/home/stuart/tango/algencan/sources/algencan/fmc30ad.o
/home/stuart/tango/algencan/sources/algencan/fparam.o
/home/stuart/tango/algencan/sources/algencan/gencan.o
/home/stuart/tango/algencan/sources/algencan/happrox.o
/home/stuart/tango/algencan/sources/algencan/newtd.o
/home/stuart/tango/algencan/sources/algencan/newtonkkt.o
/home/stuart/tango/algencan/sources/algencan/setpoint.o
/home/stuart/tango/algencan/sources/algencan/sevalus.o
/home/stuart/tango/algencan/sources/algencan/spgls.o
/home/stuart/tango/algencan/sources/algencan/tevalus.o
/home/stuart/tango/algencan/sources/algencan/tnls.o
/home/stuart/tango/algencan/sources/algencan/uevalus.o
/home/stuart/tango/algencan/sources/algencan/vevalus.o -o algencan.so
make[2]: Entering directory
`/home/stuart/tango/algencan/sources/interfaces/r'
gcc -std=gnu99 -shared -L/usr/local/lib -o algencan.so rwrapper.o
/home/stuart/tango/algencan/sources/algencan/algencan.o
/home/stuart/tango/algencan/sources/algencan/auglag.o
/home/stuart/tango/algencan/sources/algencan/backtrack.o
/home/stuart/tango/algencan/sources/algencan/calc.o
/home/stuart/tango/algencan/sources/algencan/cgm.o
/home/stuart/tango/algencan/sources/algencan/checkder.o
/home/stuart/tango/algencan/sources/algencan/drand.o
/home/stuart/tango/algencan/sources/algencan/evalal.o
/home/stuart/tango/algencan/sources/algencan/fma27ad.o
/home/stuart/tango/algencan/sources/algencan/fmc30ad.o
/home/stuart/tango/algencan/sources/algencan/fparam.o
/home/stuart/tango/algencan/sources/algencan/gencan.o
/home/stuart/tango/algencan/sources/algencan/happrox.o
/home/stuart/tango/algencan/sources/algencan/newtd.o
/home/stuart/tango/algencan/sources/algencan/newtonkkt.o
/home/stuart/tango/algencan/sources/algencan/setpoint.o
/home/stuart/tango/algencan/sources/algencan/sevalus.o
/home/stuart/tango/algencan/sources/algencan/spgls.o
/home/stuart/tango/algencan/sources/algencan/tevalus.o
/home/stuart/tango/algencan/sources/algencan/tnls.o
/home/stuart/tango/algencan/sources/algencan/uevalus.o
/home/stuart/tango/algencan/sources/algencan/vevalus.o -shared -lg2c
-L/usr/lib/R/lib -lR
/usr/lib/gcc/i586-suse-linux/4.3/../../../../i586-suse-linux/bin/ld:
cannot find -lg2c
collect2: ld returned 1 exit status
make[2]: *** [algencan.so] Error 1
make[2]: Leaving directory
`/home/stuart/tango/algencan/sources/interfaces/r'
make[1]: *** [algencan.so] Error 2
make[1]: Leaving directory
`/home/stuart/tango/algencan/sources/interfaces/r'
make: *** [algencan-r] Error 2

Ernesto G. Birgin

unread,
Jul 15, 2008, 8:05:05โ€ฏAM7/15/08
to TANGO Project - ALGENCAN
Dear Stuart,

Try modifying the Makefile to use -lgfortran instead of -lg2c.
Specifically, in the file /home/stuart/tango/algencan/sources/
interfaces/r/Makefile, line 15, replace -lg2c by -lgfortran. If this
change does not work, you will need to install gcc-gfortran and
libgfortran to use -lgfortran, or, alternatively, to install a package
that contains libg2c (may be gcc v3 and gcc-g77, but I am not sure).

Ernesto.

On Jul 15, 8:35 am, "Stuart Nettleton"

Stuart Nettleton

unread,
Jul 15, 2008, 8:16:40โ€ฏAM7/15/08
to Ernesto G. Birgin, TANGO Project - ALGENCAN
Hi Ernesto,
Your suggestion to substitute -lgfortran for -lg2c in line 15 of the
makefile worked fine.
Algencan is now operational in R, which is very nice to see!
I very much appreciate your help!
Stuart

On Tue, 15 Jul 2008 22:05:05 +1000, Ernesto G. Birgin <egbi...@gmail.com>
wrote:

> Dear Stuart,


>
> Try modifying the Makefile to use -lgfortran instead of -lg2c.
> Specifically, in the file /home/stuart/tango/algencan/sources/
> interfaces/r/Makefile, line 15, replace -lg2c by -lgfortran. If this
> change does not work, you will need to install gcc-gfortran and
> libgfortran to use -lgfortran, or, alternatively, to install a package
> that contains libg2c (may be gcc v3 and gcc-g77, but I am not sure).
>
> Ernesto.

--

Reply all
Reply to author
Forward
0 new messages