Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michael J. Donahue <donahue@ulexite.nist.gov>
Subject: Re: f2c and 4-byte integers
Date: Tue, 29 Oct 1996 17:31:42 -0500	[thread overview]
Message-ID: <5cf735edaa2e4dca1f8c573f73ac0432.axp-list@archive.invalid> (raw)

>> Sorry if I'm overlooking something obvious, but how do I get f2c to
>> map INTEGER*4 to 4-byte integers on Linux/AXP?
>
>This is broken.  I was posting in the past on the topic but without
>a trace of a comment from anybody.  It may, or may not, have also
>an impact on a performance.  AFAIK nobody was doing testing.
>
>Why exectly you need that?  There are some workarounds.

There are 2 issues:

1) I'm working with mixed C/fortran code across several platforms.  On
the Linux/AXP system the fortran code is being built through f2c, but
elsewhere it is compiled using f77.  When the C code calls the fortran
code, it has to know what size variable to send (call by address).

2) Presumably the fortran code is taking a performance hit when it is
working with 8-byte integers instead of 4-byte.

I guess I could handle the first problem by #define'ing a constant at
compile time specifying whether I'm linking with an f2c or an f77
built object, and adjusting the function calls appropriately.  This is
painful and ugly, and is also dangerous since AFAIK I can't get the
compiler/linker to insure that the C and fortran code are in agreement.

I suspect issue 2 is minor for my particular code, but I haven't
tested it.

-mike
michael.donahue@nist.gov

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

             reply	other threads:[~1996-10-29 22:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-29 22:31 Michael J. Donahue [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-10-30 16:20 f2c and 4-byte integers Matthew X Economou
1996-10-30 14:19 Matthew X Economou
1996-10-30  4:22 ed bristol
1996-10-29 16:33 Michael J. Donahue
1996-10-29 21:26 ` Michal Jaegermann
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox