From pgilbert@bank-banque-canada.ca  Wed Jan 20 17:04:04 1999
From: pgilbert@bank-banque-canada.ca (Paul Gilbert)
Date: Wed, 20 Jan 1999 12:04:04 -0500
Subject: pow__ii
Message-ID: <99Jan20.122558est.13449@mailgate.bank-banque-canada.ca>

> R code works but the shared objects built from fortran code do not find
> the appropriate libs with functions like  __pow_ii or __epx at runtime.

I used to have endless trouble with  __pow_ii which as I recall could be be
fixed by the correct incantation of the mix of compiler libraries and
LD_LIBRARY_PATH. It seemed to be extremely sensitive and never easy to get
right. The problem is that pow_ii is not used by R itself, and so when your
fortran code does something like 4**2 (or using variables declared as integer)
then a call to pow_ii is generated and you need to find the correct library. I
eventually fixed the problem by changing the fortran code to 4.0D0**2 (or
4.0D0**2.0D0 ? and declared variables as double). This generates  calls to a
routine which is used by R itself, and I never had to worry about the libraries
again.

This also worked better with Splus, which can also be problematic in this
regard. I highly recommend this change to anyone distributing fortran code with
a package.

I'm not sure about __epx.

Paul Gilbert

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


pow__ii
Paul Gilbert