[ADOL-C] ADOL-C 2.5.2: Problem compiling with g++ 4.4.6 or Intel icpc

Antoine De Blois antoine.deblois at aero.bombardier.com
Fri Feb 20 13:34:51 EST 2015


Alright, I'll compile a newer version of gcc along with its companion libstdc++. Unfortunately, our system admin is reluctant to upgrade gcc since he claims that it has too many dependencies... 

Thank you for your support,
Antoine

-----Message d'origine-----
De : Kshitij Kulshreshtha [mailto:kshitij at math.upb.de] 
Envoyé : Thursday, February 19, 2015 11:45 AM
À : Antoine De Blois; 'Scott Rasmussen @ Zaita'; adol-c at list.coin-or.org
Objet : Re: [ADOL-C] ADOL-C 2.5.2: Problem compiling with g++ 4.4.6 or Intel icpc

Hello, GCC 4.4.6 has no support for c++11. First support arrived in GCC 4.7 with most of the standard being implemented in GCC 4.8.

Now the compiler isn't the only factor here, the version of the C++ API library must match too. The libstdc++ before version 4.7 will not work since that version is the first to have C++11 compliant header files . If you look carefully at the errors then even the intel compiler is using the C++ headers from libstdc++ version 4.4.6. (/usr/include/c++/4.4.6 ). Hence these errors. 

I don't know if your intel compiler has its own headers and C++ API library in some other location. Try seeing if it has options like -nostdinc and -nostdlib and specify the location of the correct header files and library using -I and -L options.

Best wishes
Kshitij 

On 19 February 2015 17:03:51 CET, Antoine De Blois <antoine.deblois at aero.bombardier.com> wrote:
>Hi everyone,
>
>I am also experimenting compiling issues with ADOL-C 2.5.2. Following 
>the previous post from Scott, I executed my configure script using  the
>following:
>
>export CC=icc
>export CXX=icpc
>export CXXFLAGS=”-std=c++11”
>
>./configure -enable-sparse
>--with-colpack../ColPack-1.0.9/ColPack-1.0.9_argus/
>
>Note that I am using intel compilers since icpc version 13.0.1 supports
>c++11 stantard. Our gcc version is 4.4.6. The compilation errors are
>printed below. Any helps is appreciated.
>Best,
>Antoine
>
>make[4]: Entering directory
>`/gpfs/fs2/aero/SOFTWARE/TOOLS/PROGRAMMING/AutoDiff/ADOL-C/ADOL-C-2.5.2/ADOL-C/src'
>  CC       adalloc.lo
>  CXX      adouble.lo
>/usr/include/c++/4.4.6/tr1_impl/cmath(541): error: no instance of 
>constructor "adub::adub" matches the argument list
>            argument types are: (adouble)
>        return fmin(__type(__x), __type(__y));
>                    ^
>detected during instantiation of "__gnu_cxx::__promote_2<_Tp, 
>_Up>::__type std::fmin(_Tp, _Up) [with _Tp=adouble, _Up=badouble]" at 
>line 1741 of "adouble.cpp"
>
>/usr/include/c++/4.4.6/tr1_impl/cmath(541): error: no instance of 
>constructor "adub::adub" matches the argument list
>            argument types are: (badouble)
>        return fmin(__type(__x), __type(__y));
>                                 ^
>detected during instantiation of "__gnu_cxx::__promote_2<_Tp, 
>_Up>::__type std::fmin(_Tp, _Up) [with _Tp=adouble, _Up=badouble]" at 
>line 1741 of "adouble.cpp"
>
>/usr/include/c++/4.4.6/tr1_impl/cmath(541): error: no instance of 
>constructor "adub::adub" matches the argument list
>            argument types are: (badouble)
>        return fmin(__type(__x), __type(__y));
>                    ^
>detected during instantiation of "__gnu_cxx::__promote_2<_Tp, 
>_Up>::__type std::fmin(_Tp, _Up) [with _Tp=badouble, _Up=adouble]" at 
>line 1747 of "adouble.cpp"
>
>/usr/include/c++/4.4.6/tr1_impl/cmath(541): error: no instance of 
>constructor "adub::adub" matches the argument list
>            argument types are: (adouble)
>        return fmin(__type(__x), __type(__y));
>                                 ^
>detected during instantiation of "__gnu_cxx::__promote_2<_Tp, 
>_Up>::__type std::fmin(_Tp, _Up) [with _Tp=badouble, _Up=adouble]" at 
>line 1747 of "adouble.cpp"
>
>compilation aborted for adouble.cpp (code 2)
>make[4]: *** [adouble.lo] Error 1
>make[4]: Leaving directory
>`/gpfs/fs2/aero/SOFTWARE/TOOLS/PROGRAMMING/AutoDiff/ADOL-C/ADOL-C-2.5.2/ADOL-C/src'
>make[3]: *** [all-recursive] Error 1
>make[3]: Leaving directory
>`/gpfs/fs2/aero/SOFTWARE/TOOLS/PROGRAMMING/AutoDiff/ADOL-C/ADOL-C-2.5.2/ADOL-C/src'
>make[2]: *** [all] Error 2
>make[2]: Leaving directory
>`/gpfs/fs2/aero/SOFTWARE/TOOLS/PROGRAMMING/AutoDiff/ADOL-C/ADOL-C-2.5.2/ADOL-C/src'
>make[1]: *** [all-recursive] Error 1
>make[1]: Leaving directory
>`/gpfs/fs2/aero/SOFTWARE/TOOLS/PROGRAMMING/AutoDiff/ADOL-C/ADOL-C-2.5.2/ADOL-C'
>make: *** [all-recursive] Error 1
>
>
>Antoine DeBlois
>Specialiste ingenierie, MDO lead / Engineering Specialist, MDO lead 
>Aéronautique / Aerospace 514-855-5001, x 50862 
>antoine.deblois at aero.bombardier.com<mailto:antoine.deblois at aero.bombard
>ier.com>
>
>2351 Blvd Alfred-Nobel
>Montreal, Qc
>H4S 1A9
>
>[Description : Description :
>http://signatures.ca.aero.bombardier.net/eom_logo_164x39_fr.jpg]
>CONFIDENTIALITY NOTICE - This communication may contain privileged or 
>confidential information.
>If you are not the intended recipient or received this communication by 
>error, please notify the sender and delete the message without copying
>
>
>
>De : adol-c-bounces at list.coin-or.org
>[mailto:adol-c-bounces at list.coin-or.org] De la part de Scott Rasmussen 
>@ Zaita Envoyé : Thursday, December 18, 2014 5:27 PM À : 
>adol-c at list.coin-or.org Objet : Re: [ADOL-C] Problem compiling with g++ 
>4.4.7 ?
>
>IIRC GCC 4.7 is the first to have any decent support for C++11.
>On 19/12/2014 4:02 a.m., Kshitij Kulshreshtha wrote:
>
>ADOL-C 2.5.2 requires that C++11 standard is implemented correctly in
>
>the compiler. I don't know if that is the case with g++ 4.4.7.
>
>
>
>As a heads up, future versions will also use C++11 features that did 
>not
>
>exist before.
>
>
>
>Regards
>
>Kshitij
>
>
>
>On 2014-12-18 15:53, Brad Bell wrote:
>
>I am experiencing some difficulty testing adolc on the coin jenkins 
>test
>
>system,which uses g++ 4.4.7.
>
>(This problem does not seem to exist on my Fedora system running with
>
>g++ 4.8.3.)
>
>
>
>When I use ADOL-C-2.5.2, I get the error
>
>    ../../../ADOL-C/include/adolc/adouble.h:74: error:
>
>'badouble::badouble()' is protected
>
>See the end of the page
>
>    http://jenkins.coin-or.org:8080/job/cppad_trunk/447/console
>
>for the complete error message.
>
>
>
>When I use ADOL-C-2.4.1, the error goes away; see
>
>    https://projects.coin-or.org/CppAD/changeset/3484
>
>    http://jenkins.coin-or.org:8080/job/cppad_trunk/448/changes
>
>    http://jenkins.coin-or.org:8080/job/cppad_trunk/448/console
>
>
>
>A more extensive listing of the error message is:
>
>
>
>In file included from
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bi
>ts/stl_algobase.h:64,
>
>
>
>                 from
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bi
>ts/char_traits.h:41,
>
>
>
>                 from
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/io
>s:41,
>
>
>
>                 from
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/os
>tream:40,
>
>
>
>                 from
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/io
>stream:40,
>
>
>
>                 from ../../../ADOL-C/include/adolc/adouble.h:30,
>
>                 from ../../../ADOL-C/src/adouble.cpp:24:
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ext/type_traits.h:
>
>In instantiation of '__gnu_cxx::__promote_2<adouble, badouble>':
>
>../../../ADOL-C/src/adouble.cpp:1741:   instantiated from here
>
>../../../ADOL-C/include/adolc/adouble.h:74: error:
>
>'badouble::badouble()' is protected
>
>
>
>... snip ...
>
>
>
>
>
>
>
>
>
>_______________________________________________
>
>ADOL-C mailing list
>
>ADOL-C at list.coin-or.org<mailto:ADOL-C at list.coin-or.org>
>
>http://list.coin-or.org/mailman/listinfo/adol-c
>
>
>
>
>
>-----------------------------------------------------------------------
>-
>
>_______________________________________________
>ADOL-C mailing list
>ADOL-C at list.coin-or.org
>http://list.coin-or.org/mailman/listinfo/adol-c



--
Dr. Kshitij Kulshreshtha

Scribbled on an Android Tablet





More information about the ADOL-C mailing list