I have a tricky problem and I have no idea were the error is coming from.
I write out data couple of times during my calcualtions, always appending the current data to the existing file, using:
OPEN(UFO_FU,FILE=FNAME,STATUS="OLD",POSITION='APPEND', &
FORM='UNFORMATTED',access='STREAM')
This works quite well on my computer and our CLUSTER, but on my colleague's computer, the data doesn't get appended but the file gets overwritten.
I checked this by inquiring the current file position just after the open statement:
INQUIRE(UNIT=UFO_FU, POS=I)
WRITE(*,*) "BLOCK", BN,"POS",I
So we did some tests and the results were very confusing:
It works on my computer with both ifort(13.1.1) and gfortran(4.3.4).
My colleague has the same compiler versions but if he compiles with gfortran the code doesn't append correctly, ifort still works.
So far it looks like a gfortran config issue on his computer, but the program, compiled on his computer, works correctly on my computer and the program compiled on my computer doesn't work correctly on his computer (again only gfortran).
It seems to me there is a runtime issue for gfortran only, but I am clueless where to look.
We are both using SUSE-Linux:
Linux version 3.0.13-0.27-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b)
SUSE Linux Enterprise Desktop 11 (x86_64)
ldd- for the ifort version:
linux-vdso.so.1 => (0x00007fffdd9ff000)
libm.so.6 => /lib64/libm.so.6 (0x00007f33af57f000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f33af361000)
libc.so.6 => /lib64/libc.so.6 (0x00007f33aefe9000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f33aedd3000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f33aebce000)
/lib64/ld-linux-x86-64.so.2 (0x00007f33af848000)
Version information:
bin/tascom3d:
libdl.so.2 (GLIBC_2.2.5) => /lib64/libdl.so.2
libpthread.so.0 (GLIBC_2.2.5) => /lib64/libpthread.so.0
libgcc_s.so.1 (GCC_3.0) => /lib64/libgcc_s.so.1
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libm.so.6:
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libpthread.so.0:
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
libc.so.6 (GLIBC_2.3.2) => /lib64/libc.so.6
libc.so.6 (GLIBC_PRIVATE) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
/lib64/libgcc_s.so.1:
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libdl.so.2:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
libc.so.6 (GLIBC_PRIVATE) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
and the gfortran version:
linux-vdso.so.1 => (0x00007fff4d9ff000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007f69375d0000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6937356000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6937140000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6936dc8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6937905000)
Version information:
bin/tascom3d:
libgcc_s.so.1 (GCC_4.0.0) => /lib64/libgcc_s.so.1
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
libgfortran.so.3 (GFORTRAN_1.0) => /usr/lib64/libgfortran.so.3
libm.so.6 (GLIBC_2.2.5) => /lib64/libm.so.6
/usr/lib64/libgfortran.so.3:
libm.so.6 (GLIBC_2.2.5) => /lib64/libm.so.6
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libm.so.6:
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libgcc_s.so.1:
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
I search for some similar issues but wasn't able to find anything.
I would really appreciate your ideas and help.
Kind regards,
Roman
@edit: Added the ldd info @edit2: Added the ldd -v info
lddon your executable to check the versions of used shared libraries? - Peter