charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Jeff Hammond <jeff.science AT gmail.com>
- To: Jozsef Bakosi <jbakosi AT gmail.com>
- Cc: Phil Miller <mille121 AT illinois.edu>, "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: Re: [charm] #include <intrinsics.h> in converse.h
- Date: Sat, 3 Dec 2016 15:03:37 +0800
On Fri, Dec 2, 2016 at 12:51 AM, Jozsef Bakosi <jbakosi AT gmail.com> wrote:
(module swap PrgEnv-intel PrgEnv-cray)
jhammond@edison02:~> CC -h std=c++03 map.cc
CC-18 crayc++: ERROR File = map.cc, Line = 2
A right parenthesis ")" is expected.
void fn( std::map< int, int >&& m ) {}
^
CC-289 crayc++: ERROR File = map.cc, Line = 3
No instance of constructor "std::map<_Key, _Tp, _Compare, _Alloc>::map [with
_Key=int, _Tp=int, _Compare=std::less<int>,
_Alloc=std::allocator<std::pair<const int, int>>]" matches the
argument list.
The argument types are: ({...}, {...}).
int main() { fn( { {1,2}, {2,1} } ); return 0;}
^
Total errors detected in map.cc: 2
jhammond@edison02:~> CC -h std=c++11 map.cc
CC-12489 crayc++: WARNING File = /opt/gcc/4.8.1/snos/include/g++/type_traits, Line = 62
constexpr non-static member function will not be implicitly 'const' in C++14
constexpr operator value_type() { return value; }
^
Cray C++ : Version 8.5.1 (20160621140302_6d8c847f9f2d39b12d44ed5cf23e60ef45080ba9)
Total warnings detected in map.cc: 1
jhammond@edison02:~> CC -std=c++03 map.cc
map.cc:2:30: error: expected ',' or '...' before '&&' token
void fn( std::map< int, int >&& m ) {}
^~
map.cc: In function 'int main()':
map.cc:3:18: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
int main() { fn( { {1,2}, {2,1} } ); return 0;}
^
map.cc:3:35: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
int main() { fn( { {1,2}, {2,1} } ); return 0;}
^
map.cc:3:35: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
map.cc:3:35: error: could not convert '{{1, 2}, {2, 1}}' from '<brace-enclosed initializer list>' to 'std::map<int, int>'
jhammond@edison02:~> CC -std=c++11 map.ccOk, thanks guys. I will shelve a Cray-compiler port then. I have other issues with it anyway. For example, the following, which compiles fine with gcc, is not yet supported by the Cray C++ compiler either:
No, the Cray compiler is just fine. You just didn't tell it to support C++11. GCC defaults to that, which is why it works.
See below where Cray and GCC behave the same way when using explicit language support flags for C++03 and C++11.
$ CC -VCray C++ : Version 8.5.4 Thu Dec 01, 2016 08:46:59hello.C:-------------#include <map>void fn( std::map< int, int >&& m ) {}int main() { fn( { {1,2}, {2,1} } ); }-------------cori02:~$ CC -c hello.CCC-18 crayc++: ERROR File = hello.C, Line = 3A right parenthesis ")" is expected.void fn( std::map< int, int >&& m ) {}^CC-289 crayc++: ERROR File = hello.C, Line = 5No instance of constructor "std::map<_Key, _Tp, _Compare, _Alloc>::map [with_Key=int, _Tp=int, _Compare=std::less<int>,_Alloc=std::allocator<std::pair<const int, int>>]" matches theargument list.The argument types are: ({...}, {...}).int main() { fn( { {1,2}, {2,1} } ); }^Total errors detected in hello.C: 2
(module swap PrgEnv-intel PrgEnv-cray)
jhammond@edison02:~> CC -h std=c++03 map.cc
CC-18 crayc++: ERROR File = map.cc, Line = 2
A right parenthesis ")" is expected.
void fn( std::map< int, int >&& m ) {}
^
CC-289 crayc++: ERROR File = map.cc, Line = 3
No instance of constructor "std::map<_Key, _Tp, _Compare, _Alloc>::map [with
_Key=int, _Tp=int, _Compare=std::less<int>,
_Alloc=std::allocator<std::pair<const int, int>>]" matches the
argument list.
The argument types are: ({...}, {...}).
int main() { fn( { {1,2}, {2,1} } ); return 0;}
^
Total errors detected in map.cc: 2
jhammond@edison02:~> CC -h std=c++11 map.cc
CC-12489 crayc++: WARNING File = /opt/gcc/4.8.1/snos/include/g++/type_traits, Line = 62
constexpr non-static member function will not be implicitly 'const' in C++14
constexpr operator value_type() { return value; }
^
Cray C++ : Version 8.5.1 (20160621140302_6d8c847f9f2d39b12d44ed5cf23e60ef45080ba9)
Total warnings detected in map.cc: 1
(module swap PrgEnv-cray PrgEnv-gnu)
jhammond@edison02:~> CC -std=c++03 map.cc
map.cc:2:30: error: expected ',' or '...' before '&&' token
void fn( std::map< int, int >&& m ) {}
^~
map.cc: In function 'int main()':
map.cc:3:18: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
int main() { fn( { {1,2}, {2,1} } ); return 0;}
^
map.cc:3:35: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
int main() { fn( { {1,2}, {2,1} } ); return 0;}
^
map.cc:3:35: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
map.cc:3:35: error: could not convert '{{1, 2}, {2, 1}}' from '<brace-enclosed initializer list>' to 'std::map<int, int>'
(no error)
--
- Re: [charm] #include <intrinsics.h> in converse.h, Jeff Hammond, 12/01/2016
- <Possible follow-up(s)>
- Re: [charm] #include <intrinsics.h> in converse.h, Phil Miller, 12/01/2016
- Re: [charm] #include <intrinsics.h> in converse.h, Jozsef Bakosi, 12/01/2016
- Re: [charm] #include <intrinsics.h> in converse.h, Jeff Hammond, 12/03/2016
- Re: [charm] #include <intrinsics.h> in converse.h, Jozsef Bakosi, 12/04/2016
- Re: [charm] #include <intrinsics.h> in converse.h, Jeff Hammond, 12/03/2016
- Re: [charm] #include <intrinsics.h> in converse.h, Jozsef Bakosi, 12/01/2016
Archive powered by MHonArc 2.6.19.