Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Londhe__Ashutosh
Beginner
68 Views

Compiling with O3 giving segmentation fault

I am getting a segmentation fault while executing a MPI+OpneMP program compiled with O3 flag. Sample program structure is given below

int main()

{

//MPI init

if(rank == 0)

         Master();

else

       Worker();

printf("\n Finalize MPI");

//MPI finalize

return 0;

}//End of main

void Master()

{

//Some computations

printf("\n Exiting master");

}

void Worker()

{

//Some computations

printf("\n Exiting worker");

}

when i execute this program compiled with O3, i am getting a segmentation fault after execution of last statement of master/worker function (printf in this case) and before "finalize mpi" printf statement in main.

But when i try to execute the same program compiled with O3 and traceback flag, i am not getting any sort of error.

I am using a mpiicpc for compilation of the program. Both 2015 and 2016 compiler version has been used for compilation but the same problem comes.

Please help me to resolve this problem.

Regards,

Ashutosh S. Londhe

 

0 Kudos
0 Replies
Reply