Software Tuning, Performance Optimization & Platform Monitoring
Discussion around monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform monitoring

Compiling with O3 giving segmentation fault

Londhe__Ashutosh
Beginner
147 Views

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