Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
7568 Discussions

compiler 2020.1.217 - internal error: assertion failed: find_assoc_pragma: pragma not found

VladimirV
Beginner
1,010 Views

Good day!

I have recently obtained the following compile error with Intel Compiler 2020.1.217.

internal error: assertion failed: find_assoc_pragma: pragma not found (shared/cfe/edgcpfe/il.c, line 24734)
                                function_2a(temp1[i_ + 2 * comp * dofs_per_face],
                                ^
compilation aborted

The problematic OpenMP statement in the lines above is "#pragma omp simd". With version 2019.5.281 everything compiled nicely.

Labels (3)
0 Kudos
17 Replies
AbhishekD_Intel
Moderator
997 Views

Hi,

Thanks for reporting the issue to us. We are forwarding this issue to the concerned team. They will get back to you.

 

Warm Regards,

Abhishek

 

Viet_H_Intel
Moderator
990 Views

Can you look into your buildlog and see which source file gave the internal error, then create a preprocess (replace -c with -E and remove -o filename.o) file for us to investigate?

Thanks,


VladimirV
Beginner
978 Views

Thank you for the quick response.

Please check if the attachment is that what you asked for.

Viet_H_Intel
Moderator
973 Views

I dont have "7z" handy to extract your file. Can you provide us .tbz. or some thing that I can use "tar" to extract it.

Also, please provide us your command line options as well.

Thanks,


VladimirV
Beginner
968 Views

I attached gzip archive, check it please. There is already the preprocessed i-file there.

My compile line is:

mpiicpc $(CXX_FLAGS) -o step-67.cc.o -c step-67.cc

where

CXX_FLAGS = -fpic -ansi -w2 -diag-disable=remark -wd21 -wd68 -wd135 -wd175 -wd177 -wd191 -wd193 -wd279 -wd327 -wd383 -wd854 -wd981 -wd1418 -wd1478 -wd1572 -wd2259 -wd2536 -wd2651 -wd3415 -wd15531 -wd15552 -wd111 -wd128 -wd185 -wd186 -wd280 -qopenmp-simd -std=c++14 -march=native -Wno-array-bounds -Wno-parentheses -no-ansi-alias -ip -funroll-loops -O3

 

Viet_H_Intel
Moderator
946 Views

Thanks for the test case. I've reported this bug to our Developer.


SRett
Beginner
831 Views

We just stumbled upon this problem, too.

compiler: icpc (ICC) 2021.1 Beta 20200827 (using the latest docker image)

```

/opt/intel/oneapi/compiler/2021.1-beta10/linux/bin/intel64/icpc -DAUTOPAS_OPENMP -DSPDLOG_COMPILED_LIB -Iexamples/md-flexible -I../../examples/md-flexible -I../../src -Isrc -I../../tools/. -O3 -DNDEBUG -fno-math-errno -fp-model precise -qopenmp-simd -march=native -qopenmp -std=c++17 -MD -MT examples/md-flexible/CMakeFiles/md-flexible.dir/src/main.cpp.o -MF examples/md-flexible/CMakeFiles/md-flexible.dir/src/main.cpp.o.d -o examples/md-flexible/CMakeFiles/md-flexible.dir/src/main.cpp.o -c ../../examples/md-flexible/src/main.cpp
FAILED: examples/md-flexible/CMakeFiles/md-flexible.dir/src/main.cpp.o
/opt/intel/oneapi/compiler/2021.1-beta10/linux/bin/intel64/icpc -DAUTOPAS_OPENMP -DSPDLOG_COMPILED_LIB -Iexamples/md-flexible -I../../examples/md-flexible -I../../src -Isrc -I../../tools/. -O3 -DNDEBUG -fno-math-errno -fp-model precise -qopenmp-simd -march=native -qopenmp -std=c++17 -MD -MT examples/md-flexible/CMakeFiles/md-flexible.dir/src/main.cpp.o -MF examples/md-flexible/CMakeFiles/md-flexible.dir/src/main.cpp.o.d -o examples/md-flexible/CMakeFiles/md-flexible.dir/src/main.cpp.o -c ../../examples/md-flexible/src/main.cpp
../../src/autopas/containers/verletClusterLists/VerletClusterLists.h(594): internal error: assertion failed: find_assoc_pragma: pragma not found (il.c, line 25362 in find_assoc_pragma)

loopBody(cluster);
^

compilation aborted for ../../examples/md-flexible/src/main.cpp (code 4)

```

In case you can use an additional test-case, I have attached it below.

Sadly, it is not at all minimal and taken from our code base.

The code compiled fine with a 2019 version of icpc.

Viet_H_Intel
Moderator
826 Views

Can you use -O1 instead of -O3 as a workaround?

Thanks,



SRett
Beginner
824 Views

Hi,

compilation in debug mode, or using -O1 does not help.

But thanks for the suggestion.

SRett
Beginner
820 Views

(i.e. the error persists.)

Viet_H_Intel
Moderator
812 Views

Thanks,

I've also reported your case to our Developer.

Here is a small reproducer:


$ icpc test2.cpp -c -O3 -qopenmp -std=c++17

test2.cpp(7): internal error: assertion failed: find_assoc_pragma: pragma not found (il.c, line 25362 in find_assoc_pragma)


    f(0);

    ^


compilation aborted for test2.cpp (code 4)

$ cat test2.cpp

template < typename F>

void foo(const F& f)

{

  #pragma omp parallel for schedule(dynamic) collapse(2)

  for (unsigned int v = 0; v < 0; ++v){

   for (unsigned int t = 0; t < 0; ++t){

   f(0);

}

}

}

void f() {

 foo( [](const auto &indices_2) {} );

}



psychocoder
Beginner
570 Views

We hit the same issue in [alpaka](https://github.com/alpaka-group/alpaka/pull/1279)

A workaround is:

template<typename F>
void foo(const F& f)
{
  #pragma omp parallel for schedule(dynamic) collapse(2) 
  for (unsigned int v = 0; v < 0; ++v){
   for (unsigned int t = 0; t < 0; ++t){
      auto x = [&f]( const auto & i){ f(i);};
      x(0);
   }
  }
}

void f() {
 foo( [](const auto &indices_2) {} );
}

 

psychocoder
Beginner
542 Views

I missed to add the compiler version I used to test my workaround.

```

icpc -V

Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.3.304 Build 20200925_000000
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.

```

Viet_H_Intel
Moderator
539 Views

Thanks for the workaround. It also works with our oneAPI 2021.2

$ icpc -V

Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_000000



ArpitaP_Intel
Moderator
410 Views

Hi,


Glad to know the issue is resolved. If any addition help is required, please raise another thread, as this thread will no longer be monitored.


Regards,

Arpita


psychocoder
Beginner
404 Views

Dear Arpita,

 

the issue is NOT solved.

We only know a workaround that can be used until the bug is fixed in the compiler.

As soon as this issue is fixed it should be announced in this thread that the reader/follower is aware of which ICC version is solving the issue.

ArpitaP_Intel
Moderator
383 Views

Hi,


I really apologize .

I thought that the work around works perfectly fine. I would surely keep the forum posted regarding the issue fix. But I cannot promise the time frame of this issue fix.


Regards,

Arpita


Reply