Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Problem with external single float results fixed. New mathematical and array libraries work
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 27th March 08:56
a.sloman
External User
 
Posts: 1
Default Problem with external single float results fixed. New mathematical and array libraries work



this was just a fortran problem. Then [AS]

(At one stage I thought the problem occurred on Solaris poplog as well
as Linux poplog, but that was simply due to my mistakes in C programs.)

Eventually Robert Duncan pointed me at the source of the problem and
this led to a fix, which proved *very* simple, thanks to the good
engineering work previously done by poplog developers!

The file $popsrc/aextern.s (for linux on PC) returns float results from
all external function calls in a double float. However this file (which
on linux PCs is linked to sysdefs.p):

$popsrc/syscomp/sysdefs_linux_elf.p

had

C_FLOAT_RESULT_SINGLE = true,

which was wrong. So that was changed to false.

That cured the problem for external C programs returning single floats,
but it remained for external fortran programs. That was fixed by
changing the file

$popsrc/fields.p

to include this command for PC plus Linux (just after a simpler
instruction for ALPHA float results):

;;; all PC linux float results are in double form
FLWEAK Float_val_s_C -> fsv(FD_VAL_SPEC,fdesc)

That was enough (after rebuilding the system) to make external calls
work. The fixed files can be fetched from here

http://www.cs.bham.ac.uk/research/poplog/bugfixes/
as described in
http://www.cs.bham.ac.uk/research/poplog/bugfixes/BUGREPORTS

Since this makes everything in the current popvision package work on
linux poplog (as far as I know) I have removed previous warnings about
the problems and rebuilt the package here

http://www.cs.bham.ac.uk/research/poplog/popvision.tar.gz

(It previously worked only in Solaris poplog, which had had far more
extensive testing over many years. It may all work on Alpha poplog, but
I no longer have access to an Alpha system.)

All the the changes required for this are now in

http://www.cs.bham.ac.uk/research/poplog/bham-linux-poplog.tar.gz
19444565 bytes. Built 17.40GMT 6 Jan 2005

All previous versions of linux poplog include the external functioncall
bug.

Aaron
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666