help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Compiling Octave 3.2.3 with icpc 10.1 fails: more than one instance


From: RUSS BRENNAN
Subject: RE: Compiling Octave 3.2.3 with icpc 10.1 fails: more than one instance of overloaded function "octave_int_cmp_op::mop"
Date: Fri, 20 Aug 2010 08:43:53 -0500

Ok I looked into this a bit more and I think I understand the problem.  Around line 57 of intNDArray.cc,  we have

template <class T>
bool
intNDArray<T>::any_element_not_one_or_zero (void) const {
  octave_idx_type nel = this->nelem ();
  for (octave_idx_type i = 0; i < nel; i++)
    {
      T val = this->elem (i);
      if (val != 0.0 && val != 1.0)
        return true;
    }
  return false;
}

While the declaration of the != operator matches:

            function template "bool octave_int_cmp_op::mop<xop,T>(T, double)"
            function template "bool octave_int_cmp_op::mop<xop>(int64_t={long long}, double)"

Which means that if in the case that T=int64_t, the two declarations are the same, which would obviously cause some compiler issues. I must admit that I cannot determine where the second one-arg function template is coming from, it seems that all octave_int_cmp_op methods take two args, and perhaps this is the real root of the problem.

Can anyone advise on the correct way to patch this?  I'm not sure why noone else's compiler is catching this but it does appear to be a real issue.  For reference I am compiling on a 32-bit CentOS 4.8 install with Intel comilers and MKL 11.0.081.

Playing around with this, I can get it to compile if I cast in this manner:
if ((long long)val != 0.0 && (long long)val != 1.0)

Although I don't feel that this is a particularly correct solution.

Thanks for any help!


From: address@hidden
To: address@hidden
Subject: RE: Compiling Octave 3.2.3 with icpc 10.1 fails: more than one instance of overloaded function "octave_int_cmp_op::mop"
Date: Thu, 19 Aug 2010 15:04:58 -0500

I recompiled all of my source with version 11.0.081 of the intel compiler and I still get the same error.  Here's an updated printout of the error:

icpc -c -I/opt/intel/Compiler/11.0/081/mkl/include/fftw -I/usr/local/include/ -I/usr/local/include -I/usr/include/freetype2 -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H -mieee-fp  -w -O2 -xW -mieee-fp -I/usr/local/include/ -I/usr/include/freetype2 int64NDArray.cc -o pic/int64NDArray.o
oct-inttypes.h(1052): error: more than one instance of overloaded function "octave_int_cmp_op::mop" matches the argument list:
            function template "bool octave_int_cmp_op::mop<xop,T>(T, double)"
            function template "bool octave_int_cmp_op::mop<xop>(int64_t={long long}, double)"
            argument types are: (int64_t, const double)
  OCTAVE_INT_DOUBLE_CMP_OP (!=, ne)
  ^
          detected during:
            instantiation of "bool operator!=(const octave_int<T> &, const double &) [with T=int64_t={long long}]" at line 57 of "intNDArray.cc"
            instantiation of "bool intNDArray<T>::any_element_not_one_or_zero() const [with T=octave_int64]" at line 32 of "int64NDArray.cc"



Has anyone seen anything similar to this?  I don't really know how to go about resolving this compile error, I haven't seen anything like it before and google is not of much help.  It seems that anyone building 3.2.3 with the intel compile should have seen this, since the relevant code is all part of the octave basline and not it's dependancies...


From: address@hidden
To: address@hidden
Subject: RE: Compiling Octave 3.2.3 with icpc 10.1 fails: more than one instance of overloaded function "octave_int_cmp_op::mop"
Date: Wed, 18 Aug 2010 11:54:02 -0500
CC: address@hidden

I'm using 10.1.022,  but I will see what happens if I upgrade.

> Date: Wed, 18 Aug 2010 08:27:36 +0200
> Subject: Re: Compiling Octave 3.2.3 with icpc 10.1 fails: more than one instance of overloaded function "octave_int_cmp_op::mop"
> From: address@hidden
> To: address@hidden
> CC: address@hidden
>
> On Mon, Aug 16, 2010 at 10:43 PM, RUSS BRENNAN <address@hidden> wrote:
> > I am compiling from source using icc/icpc/mkl 10.1 on a CentOS 4.8 install.
> > After lurking here a while and drudging through some issues, I get the
> > following compile time error:
> >
> > icpc -c -I/usr/local/include/ -I/usr/local/include -I/usr/include/freetype2
> > -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H
> > -mieee-fp  -w -O2 -xW -mieee-fp -I/usr/local/include/
> > -I/usr/include/freetype2 int64NDArray.cc -o pic/int64NDArray.o
> > oct-inttypes.h(1052): error: more than one instance of overloaded function
> > "octave_int_cmp_op::mop" matches the argument list:
> >             function template "bool octave_int_cmp_op::mop<xop,T>(T,
> > double)"
> >             function template "bool
> > octave_int_cmp_op::mop<xop>(int64_t={long long}, double)"
> >             argument types are: (int64_t, const double)
> >   OCTAVE_INT_DOUBLE_CMP_OP (!=, ne)
> >   ^
> >           detected during:
> >             instantiation of "bool operator!=(const octave_int<T> &, const
> > double &) [with T=int64_t={long long}]" at line 57 of "intNDArray.cc"
> >             instantiation of "bool
> > intNDArray<T>::any_element_not_one_or_zero() const [with T=octave_int64]" at
> > line 32 of "int64NDArray.cc"
> >
> > compilation aborted for int64NDArray.cc (code 2)
> >
> >
> >
> > My configure line looks like this:
> > ./configure --enable-shared --disable-static
> > --with-blas='-L$MKLPATH -lmkl -lpthread'
> > --with-lapack='-lmkl_lapack'
> > LIBS="-L$MKLPATH $MKLPATH/libmkl_solver.a -Wl,--start-group -lm -lmkl_intel
> > -lmkl_intel_thread -lmkl_core -Wl,--end-group -liomp5 -lpthread"
> > --disable-extra-warning-flags
> > F77=ifort FFLAGS="-O3 -xW"
> > CC=icc CFLAGS="-O2 -xW -mieee-fp -I/usr/local/include/"
> > CXX=icpc CXXFLAGS="-w -O2 -xW -mieee-fp -I/usr/local/include/"
> > CPP="icc -E" CPPFLAGS="-I$MKLROOT/include/fftw -I/usr/local/include/"
> > CXXPP="icpc -E"
> > LDFLAGS=-L/usr/local/lib/
> >
> > Broke it up for clarity.  Any idea as to why I get this error?
> >
>
> IIRC this is a bug in Intel C++ that has been subsequently fixed.
> What's your exact Intel C++ version? It's fixed in 11.0.074, but I
> think it was already fixed in 10.1.008.
>
>
> > Another thing to ponder, how can I make octave recognize intel's fftw
> > implementation?
>
> No idea, but if the interface is compatible, Octave can't really tell
> the difference.
>
> --
> RNDr. Jaroslav Hajek, PhD
> computing expert & GNU Octave developer
> Aeronautical Research and Test Institute (VZLU)
> Prague, Czech Republic
> url: www.highegg.matfyz.cz

_______________________________________________ Help-octave mailing list address@hidden https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
_______________________________________________ Help-octave mailing list address@hidden https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

reply via email to

[Prev in Thread] Current Thread [Next in Thread]