[SCore-users-jp] Re: [SCore-users] unformatted io bug gnu mpif77 score 5.8.x

kameyama @ pccluster.org kameyama @ pccluster.org
2005年 2月 28日 (月) 11:45:55 JST


In article <421F051A.8020308 @ streamline-computing.com> Nick Birkett <nick @ streamline-computing.com> wrotes:
> However there is still seems to be a bug on Suse 9.0 64bit (Opteron).
> 
> The code output.f produces an incorrect file parallelout 528 bytes
> when compiled with the gnu compiler (mpif77 -compiler gnu)
> but produces the correct file 520 bytes when compiled with
> intel8, absoft and pgi.

The g77.info for gcc-3.4.2 (on Fedora Core 3/X86) said:
    15.3.48 Portable Unformatted Files
    ...
    In case you do need to write a program to translate to or from `g77'
    (`libf2c') unformatted files, they are written as follows:
    Sequential
        Unformatted sequential records consist of
          1. A number giving the length of the record contents;

          2. the length of record contents again (for backspace).

        The record length is of C type `long'; this means that it is 8
        bytes on 64-bit systems such as Alpha GNU/Linux and 4 bytes on
        other systems, such as x86 GNU/Linux.  Consequently such files
        cannot be exchanged between 64-bit and 32-bit systems, even with
        the same basic number format.

the output.f outputs 512 bytes data.
If you run on i386, the file length is 520 bytes (512 + sizeof(long) * 2).
But if you run x86-64, the file length is 628 bytes (512 + 8 * 2).

                       from Kameyama Toyohisa
_______________________________________________
SCore-users mailing list
SCore-users @ pccluster.org
http://www.pccluster.org/mailman/listinfo/score-users



SCore-users-jp メーリングリストの案内