Re: AMBER: Inconsistent types (INTEGER(4)/REAL(8)) - Is it serious ?

From: David A. Case <case.scripps.edu>
Date: Wed, 2 Jul 2008 15:58:36 -0700

On Wed, Jul 02, 2008, David A. Case wrote:

> >
> > ============================================================
> > In file nmr_calls.f90:285
> >
> > call mpi_bcast(nmr_iwork, intreq, mpi_integer, &
> > 1
> > In file nmr_calls.f90:273
> >
> > call mpi_bcast(rwell, nmr_dat_dbl_cnt, mpi_double_precision, 0, &
> > 2
> > Warning (155): Inconsistent types (INTEGER(4)/REAL(8)) in actual
> > argument lists at (1) and (2)
> >

Here's my reasons I said not to worry: the mpi_bcast() function is the same
call, no matter whether integers or reals are being broadcast. The third
argument (mpi_integer or mpi_double_precision above) gives the
size and type of the data being transferred.

In the C language binding, the first argument of mpi_bcast is void*, which
essentially says "don't worry about what type of data this is."

There is no simple equivalent in Fortran. If you want to broadcast both
reals and integers in the same subroutine, you have to do it as written above,
and a picky compiler will issue warnings (only!) like the ones you report.

In my view, this has nothing to do with the fact that this is in NMR, nor is
there any real way to avoid it. G95 puts out warnings like this all over the
place. Until shown otherwise, I will stand by my original advice to ignore
this sort of warning.

...dac

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)
      to majordomo.scripps.edu
Received on Sun Jul 06 2008 - 06:07:20 PDT
Custom Search