True 64 vs. Linux code on an Alpha

Josip Loncaric josip at
Mon Apr 9 09:24:08 PDT 2001

I'm posting this on behalf of a friend who does not subscribe.  Can
anyone help him?  His group is

> finding that compiling under True64 and executing under Linux is
> yielding 20-35% faster code than compiling using the DEC Linux FORTRAN
> compiler and running under Linux. Can this be the page coloring issue
> raising it's head?

However, incorrect 'getcwd' results under Linux are causing the
following problem:

> We have an alpha running True 64 that we are using to compile code
> (Fortran, C) using the Compaq compilers. When we move the executable to
> an alpha running Red Hat Linux 7, any file i/o causes the code to crash.
> Executing the code with strace displayed
> open("getwd: can\'t stat //junk", O_RDWR|O_CREAT, 0666) = -1 ENOENT (No
> such file or directory)
> which corresponds to the statement in the Fortran code
> open(10, file='junk', status='unknown', form='formatted')
> Because the file name given in the open statement does not give an
> absolute path, the os is being queried through the getcwd function to
> determined the current working directory. This directory is prepended to
> the file name. When the code is run under Linux, the incorrect path of
> "//" is returned by getcwd. If all of the fortran statements are
> modified to give absolute paths, the code runs correctly under Linux.
> Also, if a c subroutine named getcwd is linked in that returns the
> directory that the code will be run in, it works properly. The problem
> with these two solutions is that the code will always try to do i/o in
> the hard-wired directory regardless of where the executable resides.
> This often creates confusion. We would like to compile these codes under
> True 64 instead of Linux because we have seen a significantly better run
> times for computationally intensive codes. Does anyone know of a simple
> workaround for this problem?

Thanks in advance,

Dr. Josip Loncaric, Research Fellow               mailto:josip at
ICASE, Mail Stop 132C           PGP key at
NASA Langley Research Center             mailto:j.loncaric at
Hampton, VA 23681-2199, USA    Tel. +1 757 864-2192  Fax +1 757 864-6134

More information about the Beowulf mailing list