error: more than one instance of overloaded function "MessageHandler::debug" matches the argument list:

error: more than one instance of overloaded function "MessageHandler::debug" matches the argument list:

So I am still trying to compile a CFD code using the Intel Compiler v 11.1 and Intel MPI on a new cluster. I have previously successfully compiled this code on a RedHat 5 clutser using GCC 4.1.2 and OpenMPI.

I am getting the error:

error: more than one instance of overloaded function "MessageHandler::debug" matches the argument list:
function "MessageHandler::debug(const char *, ...)"
function "MessageHandler::debug(bool, int, const char *, ...)"
argument types are: (const char [54], int, int, double)
MessageHandler::debug("Memory for ILU(%d) preconditioner (dim=%d): %3.2f MB\\n", fill, dim, size);

detected during:
instantiation of "KspPrec *ImplicitTsDesc::createPreconditioner(PcData &, Domain *) [with dim=5, Scalar=float, neq=5]" at line 44 of "/usr/people/keertib/AERO-Suite/aerof.v625-iMPI/./ImplicitCoupledTsDesc.C"
instantiation of "ImplicitCoupledTsDesc::ImplicitCoupledTsDesc(IoData &, GeoSource &, Domain *) [with dim=5]" at line 24 of "/usr/people/keertib/AERO-Suite/aerof.v625-iMPI/./FluidSensitivityAnalysisHandler.C"
instantiation of "FluidSensitivityAnalysisHandler::FluidSensitivityAnalysisHandler(IoData &, GeoSource &, Domain *) [with dim=5]" at line 32 of "/usr/people/keertib/AERO-Suite/aerof.v625-iMPI/Solvers/NavierStokesCoupledSolver.h"
instantiation of "void startNavierStokesCoupledSolver(IoData &, GeoSource &, Domain &) [with dim=5]" at line 16 of "/usr/people/keertib/AERO-Suite/aerof.v625-iMPI/Solvers/NavierStokesCoupledSolver5.C"

compilation aborted for /usr/people/keertib/AERO-Suite/aerof.v625-iMPI/Solvers/NavierStokesCoupledSolver5.C (code 2)
make[2]: *** [CMakeFiles/FluidBase.dir/Solvers/NavierStokesCoupledSolver5.C.o] Error 2
make[2]: Leaving directory `/usr/people/keertib/AERO-Suite/aerof.v625-iMPI'
make[1]: *** [CMakeFiles/FluidBase.dir/all] Error 2
make[1]: Leaving directory `/usr/people/keertib/AERO-Suite/aerof.v625-iMPI'
make: *** [all] Error 2

In the MessageHandler class definition (MessageHandler.h) there are two versions of the overloaded function ::debug :

static void debug(int level, const char *, ...);
static void debug(bool single, int level, const char *, ...);

Any hints on why the Intel compiler is unhappy with this?
Is the syntax ', ...'); not allowed?

Thank you,

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Keerti,

Would you be able to compile the "NavierStokesCoupledSolver5.C" file using gcc 4.1.2 and Intel MPI Library This will help us narrow down if it's an issue with the compiler or the MPI library.

Thank you.


Gergana Slavova
Technical Consulting Engineer
Intel® Cluster Tools

Hi Keerti,

Can you try seeing if you get an error using gcc with Intel MPI? That will help narrow down whether the compiler is the culprit or the MPI header.

I've tried to reproduce using a simple test case, and no luck:

class widget {
static void foo(const char*, ...);
static void foo(bool, int, const char*, ...);

void goo(int fill, int dim, double size) {
   widget::foo("Memory for ILU(%d) preconditioner (dim=%d): %3.2f MBn", fill, dim, size);

Which I just compiled with "icpc -O0 -c test.cpp" and got no errors.

Also, I'm noticing an inconsistency between what you say is in the header file and what the compiler error message is reporting. The header you say contains:

static void debug(int level, const char *, ...);

but the error message refers to:

function "MessageHandler::debug(const char *, ...)"

I'm wondering if this indicates maybe you're looking at the wrong header or getting the wrong header. It might be useful to preprocess the source into a .i using the -E option. There will be comments included to tell you which file a particular code is coming from, so you could just search for "static void debug(const char*" and see what file this is coming from.

Brandon Hewitt
Technical Consulting Engineer

For 1:1 technical support:

Software Product Support info:

Gergana and Brandon,

It looks like I am able to compile the file(s) in question with GCC4.4and IntelMPI3.2.

[ 0%] Building CXX object CMakeFiles/FluidBase.dir/NavierStokesSolver.C.o
/mnt/lustre/opt/compiler/gcc/4.4.1/bin/g++ -DUSE_MPI -DMPICH_IGNORE_CXX_SEEK -DTEMPLATE_FIX -D__LINUX -DF_NEEDS_UNDSC -DTYPE_PREC=float -O3 -DNDEBUG -I/usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/. -I/opt/intel/impi/ -fPIC -o CMakeFiles/FluidBase.dir/NavierStokesSolver.C.o -c /usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/NavierStokesSolver.C
/usr/people/keertib/cmake-2.8.0-Linux-i386/bin/cmake -E cmake_progress_report /usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/CMakeFiles 1
[ 1%] Building CXX object CMakeFiles/FluidBase.dir/Solvers/NavierStokesCoupledSolver5.C.o
/mnt/lustre/opt/compiler/gcc/4.4.1/bin/g++ -DUSE_MPI -DMPICH_IGNORE_CXX_SEEK -DTEMPLATE_FIX -D__LINUX -DF_NEEDS_UNDSC -DTYPE_PREC=float -O3 -DNDEBUG -I/usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/. -I/opt/intel/impi/ -fPIC -o CMakeFiles/FluidBase.dir/Solvers/NavierStokesCoupledSolver5.C.o -c /usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/Solvers/NavierStokesCoupledSolver5.C
/usr/people/keertib/cmake-2.8.0-Linux-i386/bin/cmake -E cmake_progress_report /usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/CMakeFiles 2
[ 2%] Building CXX object CMakeFiles/FluidBase.dir/Solvers/NavierStokesCoupledSolver6.C.o
/mnt/lustre/opt/compiler/gcc/4.4.1/bin/g++ -DUSE_MPI -DMPICH_IGNORE_CXX_SEEK -DTEMPLATE_FIX -D__LINUX -DF_NEEDS_UNDSC -DTYPE_PREC=float -O3 -DNDEBUG -I/usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/. -I/opt/intel/impi/ -fPIC -o CMakeFiles/FluidBase.dir/Solvers/NavierStokesCoupledSolver6.C.o -c /usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/Solvers/NavierStokesCoupledSolver6.C
/usr/people/keertib/cmake-2.8.0-Linux-i386/bin/cmake -E cmake_progress_report /usr/people/keertib/AERO-Suite/aerof.v625-gcc-iMPI/CMakeFiles 3

Itoo alsojust tried a simple test case, and had no problems withg++, icpc (Intel C++) and mpiicpc (Intel MPI C++).

I will investigate the header inconsistency and let you know what I find.

Thank you very much,


I looked into the header inconsistency. The correct header is indeed present in the MessageHandler.h file. I just missedcopying it properlyinto the forum post.

The file looks like:
static void debug(const char *, ...);
static void error(const char *, ...);
static void error(int single, const char *, ...);

static void tell(int level, const char *, ...);
static void warn(int level, const char *, ...);
static void debug(int level, const char *, ...);
static void debug(bool single, int level, const char *, ...);

Is it worth trying to compile the code with GCC4.1.2 and Intel MPI, or is the combination of GCC4.4 and Intel MPI sufficient?

Thank you,

Hi Keerti,

I've tried to reproduce the issue but I was not able.

Could you provide the command line for Intel compiler as you did for g++ compiler? Could you try to create as simple code as possible using original MessageHandler.h

Could you try to add "-E" option to preprocess the code with icpc and recompile it both with gcc and icpc?

Looks like this is not compiler's issue.



Leave a Comment

Please sign in to add a comment. Not a member? Join today