Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix all lambda lib and cuSTL related errors if compiling with IntelIcc compiler. #100

Merged
merged 3 commits into from
Nov 12, 2013

Conversation

heikoburau
Copy link
Member

No description provided.

@ax3l ax3l mentioned this pull request Nov 11, 2013
@psychocoderHPC
Copy link
Member

Very nice. 👍
It would by nice if you can add same comments in the changed files. Fix something is the right time to comment files.

@ax3l
Copy link
Member

ax3l commented Nov 11, 2013

This pull should fix #76 ...

@ghost ghost assigned psychocoderHPC Nov 11, 2013
@ax3l
Copy link
Member

ax3l commented Nov 11, 2013

Way cleaner now 👍
Remember: ICC testing is not included in the compile suite, please test by hand...

@ax3l
Copy link
Member

ax3l commented Nov 11, 2013

I tested it now by hand mainline:dev vs Heikman:fix/IntelIcc:

  • gcc/4.6 + boost/1.49: ☑ | ☑
  • icc/12.0 + boost/1.49: ☐ | ☒
  • icc/12.0 + boost/1.54: ☐ | ☒
  • icc/12.1 + boost/1.49: ☒ | ☒
  • icc/12.1 + boost/1.54: ☒ | ☒

Unfortunately: not fixed...

@Heikman What did you test with?

CUDA 5.0: ICC 12.X
CUDA 5.5: ICC 12.1

@psychocoderHPC
Copy link
Member

I have looked over the code and can only see a nicer implementation of the old code. Can you please explane what was the problem which trigger the bug #76 and how you solved it.

@ax3l
Copy link
Member

ax3l commented Nov 11, 2013

The problems seems to be freaking variadic templates in include/boost/proto/detail/preprocessed/expr_variadic.hpp ...
Probably gcc knows them already and one has to compile a separate boost for icc...

Actually, I do not want to rely on proto if it causes that on every system we run they have to compile boost for each compiler independently because of that...

Edit: ICC states it knows them since 12.1+: link

@ax3l
Copy link
Member

ax3l commented Nov 11, 2013

@Heikman I think the proto includes are outdated, aren't they?

diff --git a/src/libPMacc/include/lambda/placeholder.h b/src/libPMacc/include/lambda/placeholder.h
index 78c18eb..ee381b9 100644
--- a/src/libPMacc/include/lambda/placeholder.h
+++ b/src/libPMacc/include/lambda/placeholder.h
@@ -23,9 +23,6 @@
 #define LAMBDA_PLACEHOLDER_H

 #include <boost/mpl/int.hpp>
-#include <boost/proto/core.hpp>
-
-namespace proto = boost::proto;

 namespace PMacc
 {
@@ -35,7 +32,7 @@ namespace lambda
 template<int I>
 struct placeholder {};

-} // lamnda
+} // lambda
 } // PMacc

@heikoburau
Copy link
Member Author

I didn't mean that I solved all Intel compiler bugs but only the cuSTL and lambdaLib related ones, sorry ;)
At least one error comes from the hdf5 code. I used icc/12.1, boost/1.54.0 and cuda/5.0

The problem I solved were some out-of-range compile-time accesses on a mpl::vector in Expression.hpp. But as they were kind of optimized out by gcc they only appeared along with icc.

@ax3l You are right with proto, they are definitly outdated!

@psychocoderHPC
Copy link
Member

@ax3l and @Heikman
I have delete the include of proto and add
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES 1 to libPMacc/include/types.h

Merge #101 to this branch

Than all template bugs are gone but we get new errors (with icc 13.1) and some warnings

/usr/include/fenv.h(86): error: exception specification is incompatible with that of previous function "fegetround" (declared at line 63 of "/opt/pkg/compiler/intel/fc/13.1/composer_xe_2013.3.163/compiler/include/float.h")
  extern "C" int fegetround() throw();
                              ^

UPDATE:
This default linux file /usr/include/fenv.h ships int fegetround() throw() but intel compiler only ship int fegetround()

@ax3l
Copy link
Member

ax3l commented Nov 12, 2013

I also ended up with fenv.h yesterday evening, caused by "newer than 4.4" gnu headers icc is not compatible with but using. One can by hand set the CPLUS_INCLUDE_PATH to the /usr/include/c++/4.xx/ dirs, but that's a hack.

I also added BOOST_NO_CXX11_VARIADIC_TEMPLATES but in our CMake icc-section since this is an icc bug in the experimental implementation of c++11 variadic templates, I guess link.
There are some more Flags to play with: -U__GXX_EXPERIMENTAL_CXX0X__ and -std=c++0x.

Work around the HDF5 related errors by unloading hdf5 and splash or setting export SPLASH_ROOT=.

@Heikman Can you please remove proto as I stated here ? Afterwards that's ready to get merged.

@ax3l
Copy link
Member

ax3l commented Nov 12, 2013

Fixed icc 12.1+ with boost now.
They catched that error for icc <1200, probably it is still not working.

diff --git a/src/picongpu/CMakeLists.txt b/src/picongpu/CMakeLists.txt
index ebdb7ee..c9a2b49 100644
--- a/src/picongpu/CMakeLists.txt
+++ b/src/picongpu/CMakeLists.txt
@@ -236,6 +236,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
 # ICC
 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_NO_VARIADIC_TEMPLATES")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_NO_CXX11_VARIADIC_TEMPLATES")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_NO_FENV_H")
 # PGI
 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Minform=inform")

@ax3l
Copy link
Member

ax3l commented Nov 12, 2013

@Heikman I think that pull request is fine.
I will remove proto in a new pull request and I will set the icc flags there, too.

ax3l added a commit that referenced this pull request Nov 12, 2013
fix all lambda lib and cuSTL related errors if compiling with IntelIcc compiler.
@ax3l ax3l merged commit a296de2 into ComputationalRadiationPhysics:dev Nov 12, 2013
slizzered pushed a commit to slizzered/picongpu that referenced this pull request Sep 28, 2015
80bf2b0 Merge pull request ComputationalRadiationPhysics#102 from ComputationalRadiationPhysics/dev
ef29c73 Merge pull request ComputationalRadiationPhysics#101 from slizzered/prepare-version_2_2_crp
248539c changelog entry for 2.2.0crp
f57b59b version bump to 2.2.0crp
3b91c67 Merge pull request ComputationalRadiationPhysics#100 from slizzered/issue98-rename_uint_typedef
aeab138 the backslash is now aligned
af6b7ca changed type to match __ballot signature
17389a5 removed typedef uint32_richtig_huebsch
b5737f7 Merge pull request ComputationalRadiationPhysics#97 from slizzered/issue65-add_comment
1d0b136 Added TODO to boost_static_assert cast warning
da904d0 Merge pull request ComputationalRadiationPhysics#95 from ax3l/topic-wshadow
ca39cbc Fix Wshadow Warnings
0e7e517 Add Wshadow
65e010d Merge pull request ComputationalRadiationPhysics#93 from ax3l/doc-updateCMakeVersion
b4d0657 Add a CMake 2.8.12.2 PPA for Precise
3eb9205 Close ComputationalRadiationPhysics#92: Update CMake Version to 2.8.12.2+
bb96ed9 Merge pull request ComputationalRadiationPhysics#91 from BenjaminW3/patch-3
2fafcbd Merge pull request ComputationalRadiationPhysics#89 from BenjaminW3/patch-1
f09c782 Define __THROW for systems without Glibc
133eb65 Merge pull request ComputationalRadiationPhysics#90 from BenjaminW3/patch-2
01b2dd7 fix a spelling mistake
229c891 fix unconditional usage of getAvailableSlotsHost
1b1819a Merge pull request ComputationalRadiationPhysics#87 from BenjaminW3/fix-struct-class
5f4adf5 fix non-matching class/struct declaration
799d7d7 Merge pull request ComputationalRadiationPhysics#84 from ComputationalRadiationPhysics/dev
1314bf2 Merge pull request ComputationalRadiationPhysics#76 from ComputationalRadiationPhysics/dev
ddeae86 Merge pull request ComputationalRadiationPhysics#56 from ComputationalRadiationPhysics/dev

git-subtree-dir: thirdParty/mallocMC
git-subtree-split: 80bf2b0d0ec33bf350c5de4cc5dc11231f9ee7cd
psychocoderHPC pushed a commit to psychocoderHPC/picongpu that referenced this pull request May 9, 2019
a96b293 Merge pull request ComputationalRadiationPhysics#106 from fwyzard/cupla_accelerator_namespace
1af2b2b Merge pull request ComputationalRadiationPhysics#110 from tdd11235813/cmake-macro
663521c Changes function to macro 'CUPLA_ADD_EXECUTABLE'.
a440a7c Fix namespace definition if two accelerators are selected
64f02bb Move all accelerator-specific code to an inline namespece
bbef699 Merge pull request ComputationalRadiationPhysics#105 from fwyzard/tbb_IsThreadSeqAcc
b463a25 Mark the TBB backend as "thread sequential"
b45d4e9 Merge pull request ComputationalRadiationPhysics#102 from psychocoderHPC/topic-updateToLatestAlapkaDev
7e8b832 createTaskExec -> createTaskKernel
84b6dc1 update to latest alapka develop branch
037f7b2 Merge pull request ComputationalRadiationPhysics#100 from DerWaldschrat/dev
7add5ed fix -Wreorder in cuplaPitchedPtr (#4)
9fa745b Merge pull request ComputationalRadiationPhysics#99 from ax3l/topic-cmake312rootHints
041d454 Merge pull request ComputationalRadiationPhysics#98 from DerWaldschrat/dev-fix
ecc5839 CMake: Honor _ROOT Env Hints
24d159a Added conditional check for backends.
5822555 Add cudaEventBlockingSync to event creation
906cd41 Merge pull request ComputationalRadiationPhysics#97 from psychocoderHPC/topic-HIPBackend
bc67259 alpaka backend: HIP
87fe58d Merge pull request ComputationalRadiationPhysics#96 from psychocoderHPC/fix-kernelSharedMemCalc
68877b5 fix dynamic shared mem definition
9452a70 Merge pull request ComputationalRadiationPhysics#95 from psychocoderHPC/topic-updateDocs
8b26918 update docs
e822bfa Merge pull request ComputationalRadiationPhysics#89 from psychocoderHPC/topic-switchToAlpakaDevelop0.4.X
50cedbc alpaka renamings + cmake version incerase
5ecd227 update to alapka dev upcoming version 0.4.X
66a9240 Merge pull request ComputationalRadiationPhysics#94 from psychocoderHPC/topic-ciUpdateToCUDA8
3ba6104 CI: update CUDA from 7.5 to 8.0
5af56ce Merge pull request ComputationalRadiationPhysics#93 from psychocoderHPC/topic-updateCIToClang4
68a6555 Travis: CUDA Compiler Ignore
279bfd0 Travis: Xenial
9d583b7 CI: switch from clan 3.5 to 4.0
11eb874 Merge pull request ComputationalRadiationPhysics#92 from ax3l/topic-ciCMake3110
da617da Travis: CMake 3.11.0
da63524 Merge pull request ComputationalRadiationPhysics#91 from ComputationalRadiationPhysics/dev
66a2da7 Merge pull request ComputationalRadiationPhysics#88 from psychocoderHPC/topic-versionIncreaseTo0.1.1
e029584 version increase to 0.1.1
ffdb268 Merge pull request ComputationalRadiationPhysics#90 from psychocoderHPC/fix-tbbSelection
06030af fix TBB backend activation
aa8a921 Merge pull request ComputationalRadiationPhysics#84 from psychocoderHPC/topic-cuplaGetErrorString
55c99b7 add implementation for `cuplaGetErrorString`
c765052 Merge pull request ComputationalRadiationPhysics#86 from psychocoderHPC/topic-cuplaPeekAtLastError
49612bb Merge pull request ComputationalRadiationPhysics#87 from psychocoderHPC/topic-helpUpdatecuplaGetLastError
c763de4 Merge pull request ComputationalRadiationPhysics#85 from psychocoderHPC/topic-cuplaStreamQuerySupport
5d19923 update documentation of `cuplaGetLastError`
3806b8f implement `cuplaPeekAtLastError()`
2e79816 add `cuplaStreamQuery()`
7c73dc8 Merge pull request ComputationalRadiationPhysics#83 from psychocoderHPC/fix-cuplaGetLastError
b02299a fix `cuplaGetLastError`
1b7d7ea Merge pull request ComputationalRadiationPhysics#81 from tdd11235813/master
b0adfd9 Updates alpaka to 0.3.5.

git-subtree-dir: thirdParty/cupla
git-subtree-split: a96b293dcb14662a57901b55dfedaa1cd615adc9
psychocoderHPC pushed a commit to psychocoderHPC/picongpu that referenced this pull request May 17, 2019
a96b293 Merge pull request ComputationalRadiationPhysics#106 from fwyzard/cupla_accelerator_namespace
1af2b2b Merge pull request ComputationalRadiationPhysics#110 from tdd11235813/cmake-macro
663521c Changes function to macro 'CUPLA_ADD_EXECUTABLE'.
a440a7c Fix namespace definition if two accelerators are selected
64f02bb Move all accelerator-specific code to an inline namespece
bbef699 Merge pull request ComputationalRadiationPhysics#105 from fwyzard/tbb_IsThreadSeqAcc
b463a25 Mark the TBB backend as "thread sequential"
b45d4e9 Merge pull request ComputationalRadiationPhysics#102 from psychocoderHPC/topic-updateToLatestAlapkaDev
7e8b832 createTaskExec -> createTaskKernel
84b6dc1 update to latest alapka develop branch
037f7b2 Merge pull request ComputationalRadiationPhysics#100 from DerWaldschrat/dev
7add5ed fix -Wreorder in cuplaPitchedPtr (#4)
9fa745b Merge pull request ComputationalRadiationPhysics#99 from ax3l/topic-cmake312rootHints
041d454 Merge pull request ComputationalRadiationPhysics#98 from DerWaldschrat/dev-fix
ecc5839 CMake: Honor _ROOT Env Hints
24d159a Added conditional check for backends.
5822555 Add cudaEventBlockingSync to event creation
906cd41 Merge pull request ComputationalRadiationPhysics#97 from psychocoderHPC/topic-HIPBackend
bc67259 alpaka backend: HIP
87fe58d Merge pull request ComputationalRadiationPhysics#96 from psychocoderHPC/fix-kernelSharedMemCalc
68877b5 fix dynamic shared mem definition
9452a70 Merge pull request ComputationalRadiationPhysics#95 from psychocoderHPC/topic-updateDocs
8b26918 update docs
e822bfa Merge pull request ComputationalRadiationPhysics#89 from psychocoderHPC/topic-switchToAlpakaDevelop0.4.X
50cedbc alpaka renamings + cmake version incerase
5ecd227 update to alapka dev upcoming version 0.4.X
66a9240 Merge pull request ComputationalRadiationPhysics#94 from psychocoderHPC/topic-ciUpdateToCUDA8
3ba6104 CI: update CUDA from 7.5 to 8.0
5af56ce Merge pull request ComputationalRadiationPhysics#93 from psychocoderHPC/topic-updateCIToClang4
68a6555 Travis: CUDA Compiler Ignore
279bfd0 Travis: Xenial
9d583b7 CI: switch from clan 3.5 to 4.0
11eb874 Merge pull request ComputationalRadiationPhysics#92 from ax3l/topic-ciCMake3110
da617da Travis: CMake 3.11.0
da63524 Merge pull request ComputationalRadiationPhysics#91 from ComputationalRadiationPhysics/dev
66a2da7 Merge pull request ComputationalRadiationPhysics#88 from psychocoderHPC/topic-versionIncreaseTo0.1.1
e029584 version increase to 0.1.1
ffdb268 Merge pull request ComputationalRadiationPhysics#90 from psychocoderHPC/fix-tbbSelection
06030af fix TBB backend activation
aa8a921 Merge pull request ComputationalRadiationPhysics#84 from psychocoderHPC/topic-cuplaGetErrorString
55c99b7 add implementation for `cuplaGetErrorString`
c765052 Merge pull request ComputationalRadiationPhysics#86 from psychocoderHPC/topic-cuplaPeekAtLastError
49612bb Merge pull request ComputationalRadiationPhysics#87 from psychocoderHPC/topic-helpUpdatecuplaGetLastError
c763de4 Merge pull request ComputationalRadiationPhysics#85 from psychocoderHPC/topic-cuplaStreamQuerySupport
5d19923 update documentation of `cuplaGetLastError`
3806b8f implement `cuplaPeekAtLastError()`
2e79816 add `cuplaStreamQuery()`
7c73dc8 Merge pull request ComputationalRadiationPhysics#83 from psychocoderHPC/fix-cuplaGetLastError
b02299a fix `cuplaGetLastError`
1b7d7ea Merge pull request ComputationalRadiationPhysics#81 from tdd11235813/master
b0adfd9 Updates alpaka to 0.3.5.

git-subtree-dir: thirdParty/cupla
git-subtree-split: a96b293dcb14662a57901b55dfedaa1cd615adc9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the project's code component: PMacc in PMacc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants