Description of problem: fortran compiler fails to create a binary file Version-Release number of selected component (if applicable): How reproducible: whenever you create an unformatted file in gfortran (as far as i have been able to trace it, fc3), the binary file has the same length in bytes as in fc2, fc1, but it is unreadable by some plotters (supermongo) create a .f file like this: program bug dimension r(3,3) open(10,file='bug.bin',form='unformatted') do i=1,3 do j=1,3 r(i,j)=i+j !or any other stuff, just generate a matrix end do end do write(10)3,3 write(10)r end You are supposed to have a file which gives you a 2d isocontour map, but what you get on SM, is something like this: Data type is float File cy.rad.trans.abs.chisquare.op.bin's dimensions are 30*26 Data type is float You have nx = 0, ny = 30 No image is defined No image is defined No image is defined No image is defined No image is defined No image is defined No image is defined No image is defined No image is defined If you do compile the same program in FC1, FC2, or even redhat 9 and 8, you get a binary file which can be read, plus, the .f compiled on these versions, is able to run on FC5 with no error output Steps to Reproduce: 1. generate the matrix on FC5, 4 or 3, either f95 or f77 2. compare the output bin with previous FC versions 3. Actual results: The binary output has the same size as that prom older versions, nevertheless, it is unreadable Expected results: Should be equal Additional info:
FC5 is not supported any longer for quite some time. And current F7 gfortran or F7 testing update gfortran certainly creates bitwise identical output to what g77 creates. Particularly gfortran --version | head -n 1; cat X.f; rm -f bug.bin; gfortran -o X X.f; ./X; md5sum bug.bin GNU Fortran (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12) program bug dimension r(3,3) open(10,file='bug.bin',form='unformatted') do i=1,3 do j=1,3 r(i,j)=i+j !or any other stuff, just generate a matrix end do end do write(10)3,3 write(10)r end 6d731e7ef16e83c92ab79d53c4b5073b bug.bin g77 --version | head -n 1; rm -f bug.bin; g77 -o X2 X.f; ./X2; md5sum bug.bin GNU Fortran (GCC) 3.4.6 20060404 (Red Hat 3.4.6-7) 6d731e7ef16e83c92ab79d53c4b5073b bug.bin