All,

When I build Open MPI with NAG, I have to pass in:

  FCFLAGS"=-mismatch_all -fpp"

this flag tells nagfor to downgrade some errors with interfaces to warnings:

       -mismatch_all
                 Further downgrade consistency checking of procedure
argument lists so that calls to routines in the same file which are
                 incorrect will produce warnings instead of error
messages.  This option disables -C=calls.

The fpp flag is how you tell NAG to do preprocessing (it doesn't
automatically do it with .F90 files).

I also have to pass in a lot of other flags as seen here:

https://github.com/mathomp4/parcelmodulefiles/blob/main/Compiler/nag-7.1_7101/openmpi/4.1.2.lua

Now I hadn't yet tried NAG 7.1 with Open MPI because NAG 7.1 has a bug with
a library I depend on, but it does promise better F2008 support. To see
what happens, I tried myself and added --enable-mpi-fortran=all, but:

checking if building Fortran 'use mpi_f08' bindings... no
configure: error: Cannot build requested Fortran bindings, aborting

Unfortunately, the NAG Fortran guru I work with is off until the new year.
When he comes back, I might ask him about this. He might know something we
can do to make NAG happy with mpif08.

Matt

On Wed, Dec 22, 2021 at 3:44 PM Tom Kacvinsky via users <
users@lists.open-mpi.org> wrote:

> On Wed, Dec 22, 2021 at 8:54 AM Tom Kacvinsky <tkacv...@gmail.com> wrote:
> >
> > On Wed, Dec 22, 2021 at 8:48 AM Wadud Miah via users
> > <users@lists.open-mpi.org> wrote:
> > >
> > > Hi,
> > >
> > > I tried using the NAG compiler 7.2 which is fully Fortran 2008
> compliant, but the Open MPI configure script shows that it will not build
> the Fortran 2008 MPI bindings:
> > >
> > > $ FC=nagfor ./configure --prefix=/usr/local/openmpi-4.1.2
> > > [ ... ]
> > > checking if building Fortran 'use mpi_f08' bindings... no
> > > Build MPI Fortran bindings: mpif.h, use mpi
> > >
> > > Could someone please look into this?
> >
> > Would you provide the config.log from running configure?  That would
> > help diagnose the problem.  Oftentimes, you will see what the error is
> > when checking for certain features.
> >
>
> I was sent the config.log off kist, and I spotted this:
>
> configure:69595: result: no
> configure:69673: checking for Fortran compiler support of !$PRAGMA
> IGNORE_TKR
> configure:69740: nagfor -c -f2008 -dusty -mismatch  conftest.f90 >&5
> NAG Fortran Compiler Release 7.1(Hanzomon) Build 7101
> Evaluation trial version of NAG Fortran Compiler Release 7.1(Hanzomon)
> Build 7101
> Questionable: conftest.f90, line 52: Variable A set but never referenced
> Warning: conftest.f90, line 52: Pointer PTR never dereferenced
> Error: conftest.f90, line 39: Incorrect data type REAL (expected
> CHARACTER) for argument BUFFER (no. 1) of FOO
> Error: conftest.f90, line 50: Incorrect data type INTEGER (expected
> CHARACTER) for argument BUFFER (no. 1) of FOO
> [NAG Fortran Compiler error termination, 2 errors, 2 warnings]
> configure:69740: $? = 2
>
> So I suspect this makes the Fortran checks unhappy so that the
> configure logic (as for as I could see) wouldn't check for 2018
> binding support.
>
> So apparently, the new NAG Fortran compiler is really fussy.
>
> There is not much more I can do with this as I am nowhere near
> competent in Fortran coding.
>


-- 
Matt Thompson
   “The fact is, this is about us identifying what we do best and
   finding more ways of doing less of it better” -- Director of Better Anna
Rampton

Reply via email to