Inconsistent number or size of arguments passed to pvmfpack!

Hello,

I am interested in purchasing the PGI worktstation compiler so that I can use OpenMP, but first I am evaluating the compiler to see how easy it is to migrate the existing source code for my Computational Fluid Dynamics Flow Solver over to use PGI.

I have successfully compiled a WINDOW 2000 executable using Compact Visual Fortran V6.6 with Microsoft Visual C++ 6.0. The source code also compiled fine using SGI, CRAY, HP compilers on the UNIX operating system. Not to mention also using the GNU gcc/g77 compilers. The CFD code has been in uses for many years now on many different computer systems.

So I must be using the wrong compiler options or something because the PGI compiler fails to compile a source code file that I have never had problems with using other compilers.

The PGI compiler gives this error at 9 locations:

PGFTN-S-0155-inconsistent number or size of arguments passed to pvmfpack (send-commons.F: 201,226,336,353)

here are lines 201-226 of the source code file – “send_commons.F”:

       do iblp = 1, NBLPROCS

          call pvmfinitsend( PVM_DATA_ENCODING, info )

c         ----------------------------------
c         Pack integers, then reals.
c         ----------------------------------

          call pvmfpack( SIZEINT, ibuf(1), ibuflen, 1, info )

          call pvmfpack( SIZEINT, LSTART(0), NSEQ+1, 1, info )
          call pvmfpack( SIZEINT, LSTOP(0), NSEQ+1, 1, info )
          call pvmfpack( STRING,  BCORDER(1), 5, 1, info )
          call pvmfpack( STRING,  BCORDER(2), 5, 1, info )
          call pvmfpack( STRING,  BCORDER(3), 5, 1, info )
          call pvmfpack( STRING,  BCORDER(4), 5, 1, info )

c        -------------------------------------------------------
c        DISCALC logic.  Every process gets sent all the input
c        data, then only does those AIPs which are in locally
c        handled blocks.
c        -------------------------------------------------------

          call pvmfpack( SIZEINT, NAIP, 1, 1, info )

STRING is and INTEGER
BCORDER() are the REAL
5 is an INTEGER
1 is an INTEGER
info is and INTEGER

I am compiling the source code using the following command line:

pgf77 -c -Mextend -Mbyteswapio -Minform,warn -I./INCLUDES send-commons.F

Error 155 wasn’t listed in section B.3.2 (Compiler Error Message/Message List) of the Help manual. I don’t see what the problem is with the code segment.

For the serial case that I am considering a dummy pvmfpack routine is called since the actual PVM functions are not being used.

Here is the source code for the dummy routine so that the argument list (number and type) can be seen:

       subroutine pvmfpack( arg1, arg2, arg3, arg4, arg5 )
#include "precision.h"
       integer  arg1, arg3, arg4, arg5

#if defined(DBL_PRECISION)
       real(8)  arg2
#else
       real(4)  arg2
#endif

       print*, 'ERROR: Dummy pvmfpack called.  Code was compiled ',
     &         'SERIAL but for some '
       print*, 'reason the code called pvmfpack.  It''s a bug.'
       call hostquit( 'ERROR: Dummy pvmfpack called.' )

       return
       end

What is the problem? This is very frustrating, I have spent almost a whole day trying to figure out the “problem”. All I want to do is compile the code to test the OpenMP directives, however I am stuck trouble shooting compiler errors that no other compiler sees. It is also frustrating that error code isn’t listed in the supplied documentation.

Please help, thanks.

-Steven Speer[/quote]

Sorry for your frustratation, hopefully we can help.

Try compiling with “-Munix”. In windows, not only do the number of arguments need to agree, but also the data type’s size must agree. So most likely “ibuf(1)” and “NAIP” are REAL8 instead of the expected REAL4. Using"-Munix" tells the compiler to use UNIX like parameter passing conventions (as well as symbol names) where this rule does not apply.

  • Mat

Thanks Mat,

The -Munix compiler option worked for me.

Steven