compilation error in pragma unroll (tsmm) with Clang 6.0.1

Issue #327 resolved
Denis Davydov
created an issue

Here are error (including compiler flags):

     1120    [ 66%] Building C object CMakeFiles/ghost.dir/src_unrolled/tsmm_avx__8_8.c.o
     1121    /Users/davydden/spack/lib/spack/env/clang/clang -DIACA_MARKS_OFF -DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Dghost_EXPORTS -I/Users/davydden/spack/var/spack/stage/ghost-develop-nipe4lyzvb3mz5e4xc7mcdwmtb454wde/g
             host/include -I/Users/davydden/spack/var/spack/stage/ghost-develop-nipe4lyzvb3mz5e4xc7mcdwmtb454wde/ghost/spack-build -I/Users/davydden/spack/var/spack/stage/ghost-develop-nipe4lyzvb3mz5e4xc7mcdwmtb454wde/ghost/spack-build/ghost -I/Users/davydden/spack/opt/s
             pack/darwin-highsierra-x86_64/clang-6.0.1/hwloc-1.11.9-m4i5fgkllzweaau7qeic3ffhsyc776uz/include -isystem /Users/davydden/spack/opt/spack/darwin-highsierra-x86_64/clang-6.0.1/openmpi-3.1.2-gn5iknlza36wzcil7k24lhuh6gxhz5ce/include -isystem /Users/davydden/spac
             k/opt/spack/darwin-highsierra-x86_64/clang-6.0.1/openblas-0.3.3-jncx5vfwwsqis2xjaelmleamtxoitcci/include  -fPIC -std=c99 -Wall -Wextra -pedantic -Wno-unknown-pragmas -march=native -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/ghost.dir/src_unrolled/tsmm_avx__8_8.c.o
                -c /Users/davydden/spack/var/spack/stage/ghost-develop-nipe4lyzvb3mz5e4xc7mcdwmtb454wde/ghost/spack-build/src_unrolled/tsmm_avx__8_8.c
  >> 1122    /Users/davydden/spack/var/spack/stage/ghost-develop-nipe4lyzvb3mz5e4xc7mcdwmtb454wde/ghost/spack-build/src_unrolled/tsmm_avx__1_1.c:737:17: error: invalid value '0'; must be positive
     1123    #pragma unroll(1/4)
     1124                    ^
     1125    1 error generated.
  >> 1126    make[2]: *** [CMakeFiles/ghost.dir/src_unrolled/tsmm_avx__1_1.c.o] Error 1
     1127    make[2]: *** Waiting for unfinished jobs....
  >> 1128    /Users/davydden/spack/var/spack/stage/ghost-develop-nipe4lyzvb3mz5e4xc7mcdwmtb454wde/ghost/spack-build/src_unrolled/tsmm_avx__2_2.c:737:17: error: invalid value '0'; must be positive
     1129    #pragma unroll(2/4)
     1130                    ^
     1131    1 error generated.
  >> 1132    make[2]: *** [CMakeFiles/ghost.dir/src_unrolled/tsmm_avx__2_2.c.o] Error 1
     1133    1 warning generated.
  >> 1134    make[1]: *** [CMakeFiles/ghost.dir/all] Error 2
  >> 1135    make: *** [all] Error 2

Comments (9)

  1. Denis Davydov reporter

    Hi Jonas, as far as I understand, GHOST does not have a stable releases yet, so I took the HEAD of development branch (via Spack). I did not try any other version of GHOST. I also have only one installation of LLVM around.

    Thanks for looking at the problem, I am glad that you can reproduce it.

  2. Dominik Ernst

    I pushed two changes, that should improve compatibility with clang. The particular error is definitely fixed, though there might be others. I have only clang 3.8 available, so that is all I tested. Please advise whether other errors appear.

  3. Log in to comment