<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I think that the following change to<br>
trunk/test_more/rev_sparse_hes.cpp <br>
has fixed the problem:<br>
<a class="moz-txt-link-freetext" href="https://projects.coin-or.org/CppAD/changeset/2935#file3">https://projects.coin-or.org/CppAD/changeset/2935#file3</a><br>
<br>
On 10/11/2013 2:07 PM, Norman Goldstein wrote:<br>
</div>
<blockquote cite="mid:525868A2.3000000@telus.net" type="cite">Hi,
Dominique. I have a hunch, but cannot take it too far, as I do
not
<br>
have gcc 4.8, nor a sufficiently recent version of CPPAD to have
<br>
"case_six" (mine stops at 5). The fact that
<br>
<br>
std::vector<bool>::reference {aka std::_Bit_reference}
<br>
<br>
suggests that gcc 4.8 is space-optimizing vectors of bool to be
bit arrays,
<br>
and the operator |= has not been defined for bit arrays.
<br>
I checked my gcc 4.7, and the allocator<> template does not
seem to
<br>
be overridden to be optimized for bool, so it looks like gcc 4.7
is not
<br>
packing things in like it seems in gcc 4.8.
<br>
<br>
Perhaps, there is some header file that contains this operator,
<br>
and it can be included manually, as a work-around. Or, there may
be
<br>
a compiler flag to not pack vector<bool>.
<br>
<br>
Sorry. Maybe some one else can confirm or go further with this.
<br>
<br>
<br>
<br>
On 10/11/2013 11:33 AM, Dominique Orban wrote:
<br>
<blockquote type="cite">I'm configuring CppAD 20130927 on OSX
10.8.4 (Xcode 4.6.3) with the following setup
<br>
<br>
CC=gcc-4.8 CXX=g++-4.8 cmake ..
-Dcmake_install_prefix=/tmp/cppad_install -Dcppad_testvector=std
<br>
<br>
gcc-4.8 and g++-4.8 were installed via Homebrew.
<br>
<br>
The configure step goes smoothly but `make check` fails with the
following message:
<br>
<br>
--
<br>
[ 93%] Building CXX object
test_more/CMakeFiles/test_more.dir/rev_sparse_hes.cpp.o
<br>
/tmp/cppad-20130927/test_more/rev_sparse_hes.cpp: In function
'bool {anonymous}::case_six()':
<br>
/tmp/cppad-20130927/test_more/rev_sparse_hes.cpp:496:22: error:
no match for 'operator|=' (operand types are
'std::vector<bool>::reference {aka std::_Bit_reference}'
and 'bool')
<br>
Check[i * n + j] |= F2[i * n + k] & r[ k * n + j];
<br>
^
<br>
/tmp/cppad-20130927/test_more/rev_sparse_hes.cpp:496:22: note:
candidates are:
<br>
In file included from
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/ios:42:0,
<br>
from
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/ostream:38,
<br>
from
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/iostream:39,
<br>
from
/tmp/cppad-20130927/cppad/error_handler.hpp:131,
<br>
from
/tmp/cppad-20130927/cppad/base_require.hpp:146,
<br>
from /tmp/cppad-20130927/cppad/cppad.hpp:24,
<br>
from
/tmp/cppad-20130927/test_more/rev_sparse_hes.cpp:14:
<br>
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/bits/ios_base.h:169:3:
note: const std::_Ios_Iostate&
std::operator|=(std::_Ios_Iostate&, std::_Ios_Iostate)
<br>
operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
<br>
^
<br>
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/bits/ios_base.h:169:3:
note: no known conversion for argument 1 from
'std::vector<bool>::reference {aka std::_Bit_reference}'
to 'std::_Ios_Iostate&'
<br>
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/bits/ios_base.h:131:3:
note: const std::_Ios_Openmode&
std::operator|=(std::_Ios_Openmode&, std::_Ios_Openmode)
<br>
operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
<br>
^
<br>
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/bits/ios_base.h:131:3:
note: no known conversion for argument 1 from
'std::vector<bool>::reference {aka std::_Bit_reference}'
to 'std::_Ios_Openmode&'
<br>
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/bits/ios_base.h:91:3:
note: const std::_Ios_Fmtflags&
std::operator|=(std::_Ios_Fmtflags&, std::_Ios_Fmtflags)
<br>
operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
<br>
^
<br>
/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.1/bits/ios_base.h:91:3:
note: no known conversion for argument 1 from
'std::vector<bool>::reference {aka std::_Bit_reference}'
to 'std::_Ios_Fmtflags&'
<br>
make[3]: ***
[test_more/CMakeFiles/test_more.dir/rev_sparse_hes.cpp.o] Error
1
<br>
make[2]: *** [test_more/CMakeFiles/test_more.dir/all] Error 2
<br>
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
<br>
make: *** [check] Error 2
<br>
--
<br>
<br>
This error does not occur if I use either the boost, eigen of
cppad test vector options. According to Brad Bell, the error
does not occur on Linux with gcc-4.8. It might be OSX specific.
My C++ is nonexistent, so I don't understand the error message.
<br>
<br>
Other things I've tried:
<br>
<br>
- change the version of gcc: all lead to the same error
<br>
- use clang / clang++ instead of gcc / g++: same error
<br>
- add CXXFLAGS='-std=c++11' or CXXFLAGS='-std=c++11
-stdlib=libc++': same error.
<br>
<br>
My goal is to submit a Homebrew [1] formula for CppAD to the
Homebrew/Science tap [2]. My current formula is available from
[3]. Any feedback would be greatly appreciated.
<br>
<br>
Thanks!
<br>
<br>
Dominique
<br>
<br>
<br>
[1] <a class="moz-txt-link-freetext" href="http://brew.sh">http://brew.sh</a>
<br>
[2] <a class="moz-txt-link-freetext" href="https://github.com/Homebrew/homebrew-science">https://github.com/Homebrew/homebrew-science</a>
<br>
[3] <a class="moz-txt-link-freetext" href="https://gist.github.com/6938726">https://gist.github.com/6938726</a>
<br>
_______________________________________________
<br>
CppAD mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:CppAD@list.coin-or.org">CppAD@list.coin-or.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cppad">http://list.coin-or.org/mailman/listinfo/cppad</a>
<br>
<br>
</blockquote>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
CppAD mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CppAD@list.coin-or.org">CppAD@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cppad">http://list.coin-or.org/mailman/listinfo/cppad</a>
</pre>
</blockquote>
<br>
</body>
</html>