arbor: Architecture support: build failures on architectures other than x86_64

While building for Fedora, I’ve noticed that arbor fails to build on all architectures other than x86_64. These other architectures we currently build in Fedora for are: armv7hl, i686, aarch64, ppc64le, s390x.

The crash log says:

c++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from /builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/arbexcept.hpp:6,
                 from /builddir/build/BUILD/arbor-0.2.2/arbor/arbexcept.cpp:4:
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp: In member function 'std::size_t std::hash<arb::cell_member_type>::operator()(const arb::cell_member_type&) const':
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:102:46: error: static assertion failed: invalid size assumptions for hash of cell_member_type
  102 |             static_assert(sizeof(std::size_t)>sizeof(cell_gid_type), "invalid size assumptions for hash of cell_member_type");
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:104:76: warning: left shift count >= width of type [-Wshift-count-overflow]
  104 |             std::size_t k = ((std::size_t)m.gid << (8*sizeof(cell_gid_type))) + m.index;
      |                                                                            ^
make[2]: *** [arbor/CMakeFiles/arbor.dir/build.make:66: arbor/CMakeFiles/arbor.dir/arbexcept.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
[ 32%] Building CXX object arbor/CMakeFiles/arbor.dir/backends/multicore/stimulus.cpp.o
cd /builddir/build/BUILD/arbor-0.2.2/build-serial/arbor && /usr/bin/c++   -I/builddir/build/BUILD/arbor-0.2.2/arbor -I/builddir/build/BUILD/arbor-0.2.2/arbor/include -I/builddir/build/BUILD/arbor-0.2.2/build-serial/arbor/include  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -fPIC   -g -Wall -Wno-maybe-uninitialized -mcpu=native -std=gnu++14 -o CMakeFiles/arbor.dir/backends/multicore/stimulus.cpp.o -c /builddir/build/BUILD/arbor-0.2.2/arbor/backends/multicore/stimulus.cpp
make[2]: Leaving directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
c++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from /builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/fvm_types.hpp:3,
                 from /builddir/build/BUILD/arbor-0.2.2/arbor/backends/multicore/stimulus.cpp:3:
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp: In member function 'std::size_t std::hash<arb::cell_member_type>::operator()(const arb::cell_member_type&) const':
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:102:46: error: static assertion failed: invalid size assumptions for hash of cell_member_type
  102 |             static_assert(sizeof(std::size_t)>sizeof(cell_gid_type), "invalid size assumptions for hash of cell_member_type");
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:104:76: warning: left shift count >= width of type [-Wshift-count-overflow]
  104 |             std::size_t k = ((std::size_t)m.gid << (8*sizeof(cell_gid_type))) + m.index;
      |                                                                            ^
make[2]: *** [arbor/CMakeFiles/arbor.dir/build.make:118: arbor/CMakeFiles/arbor.dir/backends/multicore/stimulus.cpp.o] Error 1
make[2]: Entering directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
[ 32%] Building CXX object arbor/CMakeFiles/arbor.dir/backends/multicore/shared_state.cpp.o
cd /builddir/build/BUILD/arbor-0.2.2/build-serial/arbor && /usr/bin/c++   -I/builddir/build/BUILD/arbor-0.2.2/arbor -I/builddir/build/BUILD/arbor-0.2.2/arbor/include -I/builddir/build/BUILD/arbor-0.2.2/build-serial/arbor/include  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -fPIC   -g -Wall -Wno-maybe-uninitialized -mcpu=native -std=gnu++14 -o CMakeFiles/arbor.dir/backends/multicore/shared_state.cpp.o -c /builddir/build/BUILD/arbor-0.2.2/arbor/backends/multicore/shared_state.cpp
make[2]: Leaving directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
c++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from /builddir/build/BUILD/arbor-0.2.2/arbor/backends/multicore/shared_state.cpp:11:
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp: In member function 'std::size_t std::hash<arb::cell_member_type>::operator()(const arb::cell_member_type&) const':
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:102:46: error: static assertion failed: invalid size assumptions for hash of cell_member_type
  102 |             static_assert(sizeof(std::size_t)>sizeof(cell_gid_type), "invalid size assumptions for hash of cell_member_type");
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:104:76: warning: left shift count >= width of type [-Wshift-count-overflow]
  104 |             std::size_t k = ((std::size_t)m.gid << (8*sizeof(cell_gid_type))) + m.index;
      |                                                                            ^
make[2]: *** [arbor/CMakeFiles/arbor.dir/build.make:105: arbor/CMakeFiles/arbor.dir/backends/multicore/shared_state.cpp.o] Error 1
make[2]: Entering directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
[ 30%] Building CXX object arbor/CMakeFiles/arbor.dir/backends/multicore/mechanism.cpp.o
cd /builddir/build/BUILD/arbor-0.2.2/build-serial/arbor && /usr/bin/c++   -I/builddir/build/BUILD/arbor-0.2.2/arbor -I/builddir/build/BUILD/arbor-0.2.2/arbor/include -I/builddir/build/BUILD/arbor-0.2.2/build-serial/arbor/include  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -fPIC   -g -Wall -Wno-maybe-uninitialized -mcpu=native -std=gnu++14 -o CMakeFiles/arbor.dir/backends/multicore/mechanism.cpp.o -c /builddir/build/BUILD/arbor-0.2.2/arbor/backends/multicore/mechanism.cpp
make[2]: Leaving directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
c++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from /builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/fvm_types.hpp:3,
                 from /builddir/build/BUILD/arbor-0.2.2/arbor/backends/multicore/mechanism.cpp:8:
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp: In member function 'std::size_t std::hash<arb::cell_member_type>::operator()(const arb::cell_member_type&) const':
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:102:46: error: static assertion failed: invalid size assumptions for hash of cell_member_type
  102 |             static_assert(sizeof(std::size_t)>sizeof(cell_gid_type), "invalid size assumptions for hash of cell_member_type");
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:104:76: warning: left shift count >= width of type [-Wshift-count-overflow]
  104 |             std::size_t k = ((std::size_t)m.gid << (8*sizeof(cell_gid_type))) + m.index;
      |                                                                            ^
make[2]: *** [arbor/CMakeFiles/arbor.dir/build.make:92: arbor/CMakeFiles/arbor.dir/backends/multicore/mechanism.cpp.o] Error 1
make[2]: Entering directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
[ 35%] Building CXX object arbor/CMakeFiles/arbor.dir/communication/dry_run_context.cpp.o
cd /builddir/build/BUILD/arbor-0.2.2/build-serial/arbor && /usr/bin/c++   -I/builddir/build/BUILD/arbor-0.2.2/arbor -I/builddir/build/BUILD/arbor-0.2.2/arbor/include -I/builddir/build/BUILD/arbor-0.2.2/build-serial/arbor/include  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -fPIC   -g -Wall -Wno-maybe-uninitialized -mcpu=native -std=gnu++14 -o CMakeFiles/arbor.dir/communication/dry_run_context.cpp.o -c /builddir/build/BUILD/arbor-0.2.2/arbor/communication/dry_run_context.cpp
make[2]: Leaving directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
c++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from /builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/spike.hpp:6,
                 from /builddir/build/BUILD/arbor-0.2.2/arbor/communication/dry_run_context.cpp:5:
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp: In member function 'std::size_t std::hash<arb::cell_member_type>::operator()(const arb::cell_member_type&) const':
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:102:46: error: static assertion failed: invalid size assumptions for hash of cell_member_type
  102 |             static_assert(sizeof(std::size_t)>sizeof(cell_gid_type), "invalid size assumptions for hash of cell_member_type");
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:104:76: warning: left shift count >= width of type [-Wshift-count-overflow]
  104 |             std::size_t k = ((std::size_t)m.gid << (8*sizeof(cell_gid_type))) + m.index;
      |                                                                            ^
make[2]: *** [arbor/CMakeFiles/arbor.dir/build.make:144: arbor/CMakeFiles/arbor.dir/communication/dry_run_context.cpp.o] Error 1
make[2]: Entering directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
[ 32%] Building CXX object arbor/CMakeFiles/arbor.dir/communication/communicator.cpp.o
cd /builddir/build/BUILD/arbor-0.2.2/build-serial/arbor && /usr/bin/c++   -I/builddir/build/BUILD/arbor-0.2.2/arbor -I/builddir/build/BUILD/arbor-0.2.2/arbor/include -I/builddir/build/BUILD/arbor-0.2.2/build-serial/arbor/include  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -fPIC   -g -Wall -Wno-maybe-uninitialized -mcpu=native -std=gnu++14 -o CMakeFiles/arbor.dir/communication/communicator.cpp.o -c /builddir/build/BUILD/arbor-0.2.2/arbor/communication/communicator.cpp
c++: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
In file included from /builddir/build/BUILD/arbor-0.2.2/arbor/communication/communicator.cpp:5:
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp: In member function 'std::size_t std::hash<arb::cell_member_type>::operator()(const arb::cell_member_type&) const':
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:102:46: error: static assertion failed: invalid size assumptions for hash of cell_member_type
  102 |             static_assert(sizeof(std::size_t)>sizeof(cell_gid_type), "invalid size assumptions for hash of cell_member_type");
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/arbor-0.2.2/arbor/include/arbor/common_types.hpp:104:76: warning: left shift count >= width of type [-Wshift-count-overflow]
  104 |             std::size_t k = ((std::size_t)m.gid << (8*sizeof(cell_gid_type))) + m.index;
      |                                                                            ^
make[2]: *** [arbor/CMakeFiles/arbor.dir/build.make:131: arbor/CMakeFiles/arbor.dir/communication/communicator.cpp.o] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/arbor-0.2.2/build-serial'
make[1]: *** [CMakeFiles/Makefile2:637: arbor/CMakeFiles/arbor.dir/all] Error 2
make: *** [Makefile:133: all] Error 2

It seems to be the same error on all these failing arches. The complete build logs can be found here: https://koji.fedoraproject.org/koji/taskinfo?taskID=39482950.

Does arbor support these arches? (We can exclude them from the Fedora build if it does not.) I use -DARB_ARCH=native in the builds, if that makes a difference.

Thanks,

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

Happy to report it fixes the 32 bit issues also. Successful scratch build here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=41932673

I’ve not tested s390x yet, since Random123 didn’t support it. Upstream included our patch now, so once I have Random123 also built for s390x, I’ll build arbor there too.

Thanks all!

The reason for the static_assert was to ensure that std::size_t aliased correctly to one of the built in MPI datatypes for which we had MPI type_traits. The fix should be as simple as extending it to test for unsigned too.

By the way, the flags being passed to the compiler are potentially conflicting, e.g. on i686 there are the following:

-m32
-march=i686
-march=native
-mtune=generic
-msse2
-mfpmath=sse

+1 sounds good. I’ll be building on all arches again, so if it does break something, I’ll be able to report back.

@halfflat has identified that the problem is with 32-bit targets. He is determining how much effort would be required to fix it now.