[S] Loading fortran routine

Wolfgang Rolke (w_rolke@rumac.upr.clu.edu)
Fri, 16 Oct 1998 16:10:45 -0700


This is a multi-part message in MIME format.
--------------93C024A7A532E83ED26AA411
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi, I am trying to load a fortran subroutine into Splus. This
routine is one of 62 programs that make up the minimization
package "minuit" from CERN. When I compile these with
my Watcom Fortran 77 compiler and run the executable everything
works fine. But when I use the "COMPILE" program to compile
each routine and then try to load the .obj files into Splus I get the
following error messages:

projects/semiparametric/minuit> dyn.load("d:\\splus45\\cmd\\mncrck.obj")

Error in dyn.load("d:\\splus45\\cmd\\mncrck.obj"): No definition for 10
symbols
Dumped
There were 10 warnings (use warnings() to see them)
projects/semiparametric/minuit> warnings()
Warning messages --
1: undefined symbol "RT@SetUnit" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
2: undefined symbol "RT@SetFmt" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
3: undefined symbol "RT@IOWrite" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
4: undefined symbol "RT@OutCHAR" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
5: undefined symbol "RT@EndIO" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
6: undefined symbol "RT@OutINT4" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
7: undefined symbol "RT@SetIntl" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
8: undefined symbol "RT@SetErr" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
9: undefined symbol "RT@IORead" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")
10: undefined symbol "RT@InpDBLE" in:
dyn.load("d:\\splus45\\cmd\\mncrck.obj")

If anybody has an idea what is causing these problems I would be very
much appreciate your help. I am running Splus 4.5 under Win95 on a
Pentium II 266

Wolfgang

Here is the fortran routine:

SUBROUTINE MNCRCK(CRDBUF,MAXCWD,COMAND,LNC,
+ MXP, PLIST, LLIST,IERR,ISYSWR)
include 'c:\wolfgang\fortran\minuit\d506dp.inc'
C include 'c:\wolfgang\fortran\minuit\d506cm.inc'
CC
CC Called from MNREAD.
CC Cracks the free-format input, expecting zero or more
CC alphanumeric fields (which it joins into COMAND(1:LNC))
CC followed by one or more numeric fields separated by
CC blanks and/or one comma. The numeric fields are put into
CC the LLIST (but at most MXP) elements of PLIST.
CC IERR = 0 if no errors,
CC = 1 if error(s).
CC Diagnostic messages are written to ISYSWR
CC
PARAMETER (MAXELM=25, MXLNEL=19)
CHARACTER*(*) COMAND, CRDBUF
CHARACTER CNUMER*13, CELMNT(MAXELM)*(MXLNEL), CNULL*15
DIMENSION LELMNT(MAXELM),PLIST(MXP)
DATA CNULL /')NULL STRING '/
DATA CNUMER/'123456789-.0+'/
IELMNT = 0
LEND = LEN(CRDBUF)
NEXTB = 1
IERR = 0
C . . . . loop over words CELMNT
10 CONTINUE
DO 100 IPOS= NEXTB,LEND
IBEGIN = IPOS
IF (CRDBUF(IPOS:IPOS).EQ.' ') GO TO 100
IF (CRDBUF(IPOS:IPOS).EQ.',') GO TO 250
GO TO 150
100 CONTINUE
GO TO 300
150 CONTINUE
C found beginning of word, look for end
DO 180 IPOS = IBEGIN+1,LEND
IF (CRDBUF(IPOS:IPOS).EQ.' ') GO TO 250
IF (CRDBUF(IPOS:IPOS).EQ.',') GO TO 250
180 CONTINUE
IPOS = LEND+1
250 IEND = IPOS-1
IELMNT = IELMNT + 1
IF (IEND .GE. IBEGIN) THEN
CELMNT(IELMNT) = CRDBUF(IBEGIN:IEND)
ELSE
CELMNT(IELMNT) = CNULL
ENDIF
LELMNT(IELMNT) = IEND-IBEGIN+1
IF (LELMNT(IELMNT) .GT. MXLNEL) THEN
WRITE (ISYSWR, 253) CRDBUF(IBEGIN:IEND),CELMNT(IELMNT)
253 FORMAT (' MINUIT WARNING: INPUT DATA WORD TOO LONG.'
+ /' ORIGINAL:',A
+ /' TRUNCATED TO:',A)
LELMNT(IELMNT) = MXLNEL
ENDIF
IF (IPOS .GE. LEND) GO TO 300
IF (IELMNT .GE. MAXELM) GO TO 300
C look for comma or beginning of next word
DO 280 IPOS= IEND+1,LEND
IF (CRDBUF(IPOS:IPOS) .EQ. ' ') GO TO 280
NEXTB = IPOS
IF (CRDBUF(IPOS:IPOS) .EQ. ',') NEXTB = IPOS+1
GO TO 10
280 CONTINUE
C All elements found, join the alphabetic ones to
C form a command
300 CONTINUE
NELMNT = IELMNT
COMAND = ' '
LNC = 1
PLIST(1) = 0.
LLIST = 0
IF (IELMNT .EQ. 0) GO TO 900
KCMND = 0
DO 400 IELMNT = 1, NELMNT
IF (CELMNT(IELMNT) .EQ. CNULL) GO TO 450
DO 350 IC= 1, 13
IF (CELMNT(IELMNT)(1:1) .EQ. CNUMER(IC:IC)) GO TO 450
350 CONTINUE
IF (KCMND .GE. MAXCWD) GO TO 400
LEFT = MAXCWD-KCMND
LTOADD = LELMNT(IELMNT)
IF (LTOADD .GT. LEFT) LTOADD=LEFT
COMAND(KCMND+1:KCMND+LTOADD) = CELMNT(IELMNT)(1:LTOADD)
KCMND = KCMND + LTOADD
IF (KCMND .EQ. MAXCWD) GO TO 400
KCMND = KCMND + 1
COMAND(KCMND:KCMND) = ' '
400 CONTINUE
LNC = KCMND
GO TO 900
450 CONTINUE
LNC = KCMND
C . . . . we have come to a numeric field
LLIST = 0
DO 600 IFLD= IELMNT,NELMNT
LLIST = LLIST + 1
IF (LLIST .GT. MXP) THEN
NREQ = NELMNT-IELMNT+1
WRITE (ISYSWR,511) NREQ,MXP
511 FORMAT (/' MINUIT WARNING IN MNCRCK: '/ ' COMMAND HAS INPUT',I5,
+ ' NUMERIC FIELDS, BUT MINUIT CAN ACCEPT ONLY',I3)
GO TO 900
ENDIF
IF (CELMNT(IFLD) .EQ. CNULL) THEN
PLIST(LLIST) = 0.
ELSE
READ (CELMNT(IFLD), '(BN,F19.0)',ERR=575) PLIST(LLIST)
ENDIF
GO TO 600
575 WRITE (ISYSWR,'(A,A,A)') ' FORMAT ERROR IN NUMERIC FIELD: "',
+ CELMNT(IFLD)(1:LELMNT(IFLD)),'"'
IERR = 1
PLIST(LLIST) = 0.
600 CONTINUE
C end loop over numeric fields
900 CONTINUE
IF (LNC .LE. 0) LNC=1
RETURN
END

--------------93C024A7A532E83ED26AA411
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Wolfgang Rolke
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Wolfgang Rolke
n: Rolke;Wolfgang
org: University of Puerto Rico - Mayaguez
email;internet: w_rolke@rumac.upr.clu.edu
title: Associate Professor
note: Web Sites: http://home.coqui.net/wolfgang http://math.upr.clu.edu/~wrolke
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard

--------------93C024A7A532E83ED26AA411--

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news