I've come across a compiler dependency concerning derived type I/O.
Consider,
TYPE BOX
INTEGER : I
REAL*8, DIMENSION(10) : Q
END BOX
then
OPEN(UNIT=10,FILE='afile.bin',STATUS='REPLACE',FORMAT=UNFORMATED)
WRITE(10) BOX
the size of afile.bin comes out as
4k + 10*8k + 4k + 4k = 92k with SGI-f90
= 96k with AIX-f90
Clearly this is a problem if one were to use a f77 program to read
afile.bin. I suppose the KIND declaration might resolve this problem?
Apparently xlf90 pads mixed type I/O because if I make Q an INTEGER both
compilers return a 52k file.
Also, is it possible to evaluate a function inside of a WHERE statement?
For example,
WHERE(X.GE.10)
COMPUTE
END WHERE
here the COMPUTE function acts on those elements of array X GE 10?
Thanks for any suggestions or comments,
Mike
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|