[mpich-discuss] Mpif90 bug report
Jonathan Ravens
j.ravens.nz at gmail.com
Thu May 16 21:06:11 CDT 2019
Dear MPIf90 maintainers,
I appear to have found a bug with mpif90, running under Centos 7.
Essentially any assignment to a byte variable gives a warning or an error.
The errors are fatal, and the warnings are too numerous to ignore (I'm
getting one warning for each byte that is initialised in a DATA statement,
so that can be many thousands of warnings). We have used code like this
since 1982 without any problems.
When mpif90 is used to compile a simple Fortran source with the
-fno-range-check option, any byte assignment in code or data statement will
give a warning, eg :
*mpif90_bug_report.f:30.13: b1 = 6 1 Warning:
Possible change of value in conversion from INTEGER(4) to INTEGER(1) at (1)*
This only happens with 'mpif90 -c -fno-range-check'; there is no warning
when using gfortran. However, without -fno-range-check, we get other,
fatal, errors, so that's even worse :
* mpif90_bug_report.f:28.24: byte b2 / '89'X/
1*
* Error: Arithmetic overflow converting INTEGER(16) to INTEGER(1) at (1).
This check can be disabled with the option -fno-range-check *
I've attached a simple program to replicate the problem (mpif90_bug_report.f)
The environment details are :
> more /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
> uname -a
Linux ... 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019
x86_64 x86_64 x86_64 GNU/Linux
> mpif90 -v
mpif90 for MPICH version 3.0.4
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto
--enable-plugin --enable-initfini-array --disable-libgcj
--with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install
--with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install
--enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
Please don't hestitate to let me know if any further details are needed.
Many thanks,
Jonathan Ravens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20190517/8baf48d2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpif90_bug_report.f
Type: text/x-fortran
Size: 1029 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20190517/8baf48d2/attachment.bin>
More information about the discuss
mailing list