[mpich-discuss] Two different mpif90 (in mpich2) versions giving different output for same source code

Shitij Bhargava shitij.cse at gmail.com
Tue Jun 19 03:45:52 CDT 2012


Hi all !!


I have a simple code in fortran that reads a file, and outputs it as it is.
I have two different versions of mpif90 in my system. When I compile the
same program with the two different compilers and examine the output of the
resulting two executables, they differ. This is just a toy program
of course, actually I am using MPICH2 with PETSc/SLEPc, and I have the
mpif90 that is configured with PETSc/SLEPc in
/home/shitij/Lib/MPI/mpich2-1.3.2/bin/.
The problem is that this version of mpif90 is giving the wrong output. I am
giving the -v outputs of both versions below:

(this one is configured with PETSc/SLEPc and gives incorrect output)
*shitij at shitij:~/JNCASR2012$ /home/shitij/Lib/MPI/mpich2-1.3.2/bin/mpif90 -v
*
*mpif90 for MPICH2 version 1.3.2*
*Version 11.0

*
*shitij at shitij:~/JNCASR2012$ mpif90 -v*
*Using built-in specs.*
*COLLECT_GCC=/usr/bin/gfortran*
*
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
*
*Target: x86_64-linux-gnu*
*Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.5 --enable-shared --enable-multiarch
--with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.5
--libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu*
*Thread model: posix*
*gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)*

The differences in the files I mentioned are varied (and weird), for
example some lines are missing (always the same across different runs),
some line is read half-way/incorrectly, for example a line:
ATOM NE2  NR2    -0.70
is always read as
ATOM NE2      -0.70
for some reason.

*This is the first time I am having a problem like this. Is this a problem
with installation of MPICH2 ?*

I am also giving the code below:

*program exp4*
*implicit none*
*
*
* character(79)::line*
* *
*
open(unit=1,file='top_all27_prot_na_RTF.txt',action='read',ACCESS='STREAM',FORM='FORMATTED')
*
*
*
* do*
* read(1,'(a)',END=10)line   !! Read line as string*
* write(*,*)line*
* enddo*
* 10 write(*,*)'Done !!'*
* *
*end program exp4*

Thank you for your help in advance !!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120619/80db609b/attachment.html>


More information about the mpich-discuss mailing list