Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Segmentation violation on simple piece of code

Leoni__Massimiliano
1,235 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
1,235 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

 

 

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

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

0 Kudos
PrasanthD_intel
Moderator
1,037 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.


0 Kudos
PrasanthD_intel
Moderator
1,015 Views

Hi,


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


Regards

Prasanth


0 Kudos
PrasanthD_intel
Moderator
995 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


0 Kudos
Reply