I have a serial code that works with no problems.
But when I was trying to make it parallel (I have the MPI_init and MPI_Comm_rank in the beginning and the MPI_Finalize at the back of the parallel part and I have a if statement of "myid==0", so actually there is only one node is doing the work) there is a segmentation fault.
Is there any common reason that make this kind of thing happen?
If not, is there anyway I can find the specific line that the problem is like the gdb command used in serial code?