Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7646 Discussions

Segmentation violation on simple piece of code

Leoni__Massimiliano
626 Views

Hello everyone, I am experiencing a nasty bug with icpc version 19.0.1.144. When compiling the following code, that I am also attaching,

class nseh12_cell_integral_0_0
{
public:
  virtual void tabulate_tensor(double* A,
                               const double * const * w) const;
};

void nseh12_cell_integral_0_0::tabulate_tensor(double* A,
                                    const double * const * w) const
{   
    static const double FE0_D001[14][2] = \
    {{-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0},
    {-1.0, 1.0}};

    static const unsigned int nzc2[2] = {0, 1};
    static const unsigned int nzc1[2] = {0, 2};

    A[0] = 0.0;
    for (unsigned int ip = 0; ip < 14; ip++)
    { 

      double F0 = 0.0;
      double F1 = 0.0;

      for (unsigned int r = 0; r < 2; r++)
      { 
        F0 += FE0_D001[ip]*w[1][nzc2];
        F1 += FE0_D001[ip]*w[1][nzc1];
      }// end loop over 'r'

      double I[1];
      I[0] = F0*F1;

      A[0] += I[0];
    }// end loop over 'ip'
}

 

I get

 

$ icpc -c NSEH12.cpp
": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.

icpc: error #10105: /cfs/klemming/pdc.vol.beskow/intel/19.0.1.144/compilers_and_libraries_2019.1.144/linux/bin/intel64/mcpcom: core dumped
icpc: warning #10102: unknown signal(1029699696)
icpc: error #10106: Fatal error in /cfs/klemming/pdc.vol.beskow/intel/19.0.1.144/compilers_and_libraries_2019.1.144/linux/bin/intel64/mcpcom, terminated by unknown
compilation aborted for NSEH12.cpp (code 1)

 

This used to work with icpc v17 and stopped with v18, so it seems to be a regression.

Can anyone reproduce it and, if yes, report the bug upstream?

By the way, compiling with

$ icpc -fast -c NSEH12.cpp

works fine.

Thanks and best regards,
Massimiliano Leoni

0 Kudos
6 Replies
GouthamK_Intel
Moderator
626 Views

Hi Massimiliano,

Thanks for reaching out to us.

We are able to reproduce the error which you are facing. We will forward this issue to the concerned team.

 

Regards

Goutham

 

 

Leoni__Massimiliano
626 Views
Hello Goutham, thanks for the feedback, looking forward to a solution! Best regards, Massimiliano
Viet_H_Intel
Moderator
626 Views

I have reported this bug to our compiler Developer (CMPLRIL0-32645). Thanks

PrasanthD_intel
Moderator
428 Views

Hi,


Thanks for your patience. The issue raised by you has been fixed in the latest OneAPI version 2021.2. Please download and let us know your experience with it.


PrasanthD_intel
Moderator
406 Views

Hi,


We haven't heard back from you. Please let us know your feedback after testing the latest version.


Regards

Prasanth


PrasanthD_intel
Moderator
386 Views

Hi,


We are closing this thread as the issue has been resolved in the latest version.

We will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only


Regards

Prasanth


Reply