Block icon indicating copy to clipboard operation
Block copied to clipboard

Crash with intel compiler when run in parallel

Open mneuer71 opened this issue 8 years ago • 2 comments

Hi,

I compiled Block 1.0.1 with the Intel compiler 15.0.3. When I run a test job using mpi I get a segmentation fault. I found out that the wrong version of add_local_indices gets called, i.e. not the specialization template<> void Op_component<Des>::add_local_indices(int i, int j , int k) but the function from the primary template which does nothing.

In my opinion this is a bug because in save_load_block.C there is no declaration of this specialization, but as stated in this answer from stackoverflow this is needed otherwise the program is ill-formed. This means undefined behavior and indeed icpc behaves differently than g++ here.

You could for example put declarations of all the specializations in op_components.C in the header file op_components.h to prevent this error.

Best regards, Matthias

mneuer71 avatar Dec 14 '16 16:12 mneuer71

Do you find the same problem on Block-1.1.1?

Qiming

sunqm avatar Dec 14 '16 17:12 sunqm

Block-1.1-alpha has the same problem.

mneuer71 avatar Dec 15 '16 10:12 mneuer71