Adios2: Building on cori: intel compiler and include file extensions

Created on 2 Aug 2019  Â·  9Comments  Â·  Source: ornladios/ADIOS2

Hi,
there are still some issues compiling adios2 on cori using the intel compiler.

This is the error message I get when building:
[ 25%] Building CXX object source/adios2/CMakeFiles/adios2.dir/core/Attribute.cpp.o
[ 25%] Building CXX object source/adios2/CMakeFiles/adios2.dir/common/ADIOSTypes.cpp.o
In file included from /usr/include/c++/7/complex(44),
from /opt/intel/compilers_and_libraries_2019.3.199/linux/compiler/include/complex(30),
from /global/homes/r/rkube/repos/ADIOS2/source/adios2/common/ADIOSTypes.h(21),
from /global/homes/r/rkube/repos/ADIOS2/source/adios2/common/ADIOSTypes.cpp(12):
/usr/include/c++/7/cmath(45): catastrophic error: cannot open source file "math.h"
#include_next

compilation aborted for /global/homes/r/rkube/repos/ADIOS2/source/adios2/common/ADIOSTypes.cpp (code 4)
make[2]: * [source/adios2/CMakeFiles/adios2.dir/build.make:63: source/adios2/CMakeFiles/adios2.dir/common/ADIOSTypes.cpp.o] Error 4
make[2]: *
Waiting for unfinished jobs....
In file included from /usr/include/c++/7/ext/string_conversions.h(41),
from /usr/include/c++/7/bits/basic_string.h(6361),
from /usr/include/c++/7/string(52),
from /global/homes/r/rkube/repos/ADIOS2/source/adios2/core/AttributeBase.h(15),
from /global/homes/r/rkube/repos/ADIOS2/source/adios2/core/AttributeBase.cpp(11):
/usr/include/c++/7/cstdlib(75): catastrophic error: cannot open source file "stdlib.h"
#include_next
^
Looking at the first error message of these three, I changed line 21 from
ADIOS2/source/common/ADIOSTypes.h from

include

to

include

Then icc doesn't look for includes in /usr/include/c++/7, but uses its own include files.
But then the next problem, also related to include files, appears:

compilation aborted for /global/homes/r/rkube/repos/ADIOS2/source/adios2/core/AttributeBase.cpp (code 4)
make[2]: * [source/adios2/CMakeFiles/adios2.dir/build.make:111: source/adios2/CMakeFiles/adios2.dir/core/AttributeBase.cpp.o] Error 4
In file included from /usr/include/c++/7/ext/string_conversions.h(41),
from /usr/include/c++/7/bits/basic_string.h(6361),
from /usr/include/c++/7/string(52),
from /global/homes/r/rkube/repos/ADIOS2/source/adios2/core/AttributeBase.h(15),
from /global/homes/r/rkube/repos/ADIOS2/source/adios2/core/Attribute.h(14),
from /global/homes/r/rkube/repos/ADIOS2/source/adios2/core/Attribute.cpp(11):
/usr/include/c++/7/cstdlib(75): catastrophic error: cannot open source file "stdlib.h"
#include_next

I'm trying to compile with the intel compiler.

These are the modules I have loaded:
(base) ✘ rkube@cori08  ~/repos/adios2-build  module list
Currently Loaded Modulefiles:
1) modules/3.2.11.1 9) pmi/5.0.14 17) atp/2.1.3
2) nsg/1.2.0 10) dmapp/7.1.1-7.0.0.1_5.15__g25e5077.ari 18) PrgEnv-intel/6.0.5
3) intel/19.0.3.199 11) gni-headers/5.0.12.0-7.0.0.1_7.30__g3b1768f.ari 19) craype-haswell
4) craype-network-aries 12) xpmem/2.2.17-7.0.0.1_3.20__g7acee3a.ari 20) cray-mpich/7.7.6
5) craype/2.5.18 13) job/2.2.4-7.0.0.1_3.26__g36b56f4.ari 21) craype-hugepages2M
6) cray-libsci/19.02.1 14) dvs/2.11_2.2.131-7.0.0.1_7.3__gd2a05f7e 22) openmpi/3.1.3
7) udreg/2.3.2-7.0.0.1_4.23__g8175d3d.ari 15) alps/6.6.50-7.0.0.1_3.30__g962f7108.ari 23) python/3.7-anaconda-2019.07
8) ugni/6.0.14.0-7.0.0.1_7.25__ge78e5b0.ari 16) rca/2.2.20-7.0.0.1_4.29__g8e3fb5b.ari

Any ideas?
Thanks, Ralph

Most helpful comment

Thanks, ADIOS2 compiles now on cori with python support and dynamic linking.
I had to

  • export CRAYPE_LINK_TYPE=dynamic
  • load cmake/3.14.4
  • load intel (icc 19.0.3.199)
  • cmake
    -DCMAKE_INSTALL_PREFIX=/global/homes/r/rkube/local
    -DPYTHON_EXECUTABLE=/usr/common/software/python/3.7-anaconda-2019.07/bin/python
    -DADIOS2_USE_Python=ON
    -DADIOS2_BUILD_TESTING=OFF

All 9 comments

Ralph, thanks for reporting this. Can you post the output of your cmake configuration? Thanks!

@rkube please try loading a gcc module as well. We are using standard C++ headers in adios2 (not need to change the code), we might be able to reproduce with a simple code including <complex>. Seems the icc version is not compatible with the current gcc system headers in your environment. I remember seeing something similar on Titan (another Cray system). I also see that openmpi and cray-mpich are loaded at the same time.

Use the most recent version of cmake. I had the same error with the default one (3.10.2). After loading "cmake/3.14.4", I solved the problem.

@jychoi-hpc thanks, @rkube please try @jychoi-hpc suggestion before mine. cmake might be picking up an incompatible toolchain. Thanks!

Thanks, I tried compiling it with cmake-3.14.4 now.
There is no problem with the header files anymore, but some gtest-... files won't compile:

[ 49%] Building CXX object testing/adios2/interface/CMakeFiles/TestADIOSInterfaceWrite.dir/TestADIOSInterfaceWrite.cpp.o
In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(952): error: expected a ")"
template
^

In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(953): error: expression must have integral or enum type
struct tuple_element : ::std::tr1::tuple_element {};
^

In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(955): error: expected a ")"
template
^

In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(957): error: expression must have integral or enum type
const typename ::std::tr1::tuple_element::type>::type get(
^

In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(972): error: expected a ")"
template
^

In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(973): error: expression must have integral or enum type
struct tuple_element : ::std::tuple_element {};
^

In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(975): error: expected a ")"
template
^

In file included from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/internal/gtest-param-util.h(47),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-param-test.h(190),
from /global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest.h(62),
from /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp(8):
/global/homes/r/rkube/repos/ADIOS2/thirdparty/GTest/googletest/googletest/include/gtest/gtest-printers.h(976): error: expression must have integral or enum type
static const typename ::std::tuple_element::type& get(
^

compilation aborted for /global/homes/r/rkube/repos/ADIOS2/testing/adios2/interface/TestADIOSInterfaceWrite.cpp (code 2)
make[2]: * [testing/adios2/interface/CMakeFiles/TestADIOSInterfaceWrite.dir/build.make:63: testing/adios2/interface/CMakeFiles/TestADIOSInterfaceWrite.dir/TestADIOSInterfaceWrite.cpp.o] Error 2
make[1]:
[CMakeFiles/Makefile2:2689: testing/adios2/interface/CMakeFiles/TestADIOSInterfaceWrite.dir/all] Error 2
make: *
* [Makefile:141: all] Error 2

@rkube unless you're planning to run ctest you can always turn off testing in the cmake configuration stage: -DADIOS2_BUILD_TESTING=OFF Seems the Intel compiler is less forgiving with string concatenation and type mapping done on gtest.

Thanks, ADIOS2 compiles now on cori with python support and dynamic linking.
I had to

  • export CRAYPE_LINK_TYPE=dynamic
  • load cmake/3.14.4
  • load intel (icc 19.0.3.199)
  • cmake
    -DCMAKE_INSTALL_PREFIX=/global/homes/r/rkube/local
    -DPYTHON_EXECUTABLE=/usr/common/software/python/3.7-anaconda-2019.07/bin/python
    -DADIOS2_USE_Python=ON
    -DADIOS2_BUILD_TESTING=OFF

@rkube thanks for your patience, more than often building on HPC systems is not a straightforward task. Glad it worked.

@rkube, it seems this is resolved for you now so I'm going to go ahead and close this. Please feel free to re-open if that's not the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ax3l picture ax3l  Â·  6Comments

ax3l picture ax3l  Â·  4Comments

rkube picture rkube  Â·  5Comments

tleger26 picture tleger26  Â·  6Comments

ax3l picture ax3l  Â·  4Comments