From thomas.petzoldt at tu-dresden.de  Sat Apr 19 20:15:13 2008
From: thomas.petzoldt at tu-dresden.de (thomas.petzoldt at tu-dresden.de)
Date: Sat, 19 Apr 2008 20:15:13 +0200 (CEST)
Subject: [Rd] Fortran underscore problem persists on Linux x86/64 (PR#11206)
Message-ID: <20080419181513.6E73D2834154@mail.pubhealth.ku.dk>

Full_Name: Thomas Petzoldt
Version: R 2.8.0 devel, svn version 45389
OS: Linux x86/64 Ubuntu 7.1
Submission from: (NULL) (217.235.62.12)


In contrast to all other tested operating systems a call of Fortran functions on
Linux x86/64 requires an appended underscore.

The problem occured with package deSolve
(http://r-forge.r-project.org/projects/desolve/)


See also:

http://tolstoy.newcastle.edu.au/R/e4/devel/08/04/1224.html

Relevant code snippets

In R:

> getNativeSymbolInfo("iniaqua", PACKAGE = "deSolve")$address
Error in FUN("iniaqua"[[1L]], ...) :
   no such symbol iniaqua in package deSolve
 > getNativeSymbolInfo("iniaqua_", PACKAGE = "deSolve")$address
<pointer: 0x2b5cd3aa3960>
attr(,"class")
[1] "NativeSymbol"


In Aquaphy.f:

     subroutine iniaqua(odeparms)

      external odeparms
      double precision pars(19)
      common /myparms/pars

       call odeparms(19, pars)

      return
      end



[Rd] Fortran underscore problem persists on Linux x86/64 (PR#11206)
thomas.petzoldt at tu-dresden.de