none
help: segmentation fault occurred RRS feed

  • Question

  • hello there,

    i'm new to this field of programming, and since i study physics i'm not familiar with this kind of term.

    it's been long time that i'm stuck on this matter and would very much appriciate any help on this subject.

    below is the error messge that i get and fortran code that i'm using

    error:

    forrtl: severe (174): SIGSEGV, segmentation fault occurred
    Image              PC                Routine            Line        Source             
    libmpigf.so.4      00007FFFF7A10155  Unknown               Unknown  Unknown
    5per9-6.run        0000000000407170  Unknown               Unknown  Unknow

    code:

          Call Mpi_Comm_Rank(Mpi_Comm_World, Myrank, nIerr)
          Call Mpi_Comm_Size(Mpi_Comm_World, nprocnum,nIerr)
    
    
          call mpi_bcast(mlist,nma,mpi_integer,0,MPI_COMM_WORLD,ierr)
    
    
          if (myrank.eq.0) then
          DO 311 J=1,3
    
    c   recivig computed data from slaves 
              call MPI_RECV(R0_loc,10,MPI_real8, j,0, MPI_COMM_WORLD, nIerr)
              call MPI_RECV(R1_loc,10,MPI_real8, j,1, MPI_COMM_WORLD, nIerr)
              call MPI_RECV(R2_loc,10,MPI_real8, j,2, MPI_COMM_WORLD, nIerr)
              call MPI_RECV(R3_loc,10,MPI_real8, j,3 ,MPI_COMM_WORLD, nIerr)
    cc
    c---------putting data back into original array
            DO 32 I=1,np            
               R0(I,J)=R0_loc(I)
               R1(I,J)=R1_loc(I)
               R2(I,J)=R2_loc(I)
               R3(I,J)=R3_loc(I)     
       32    CONTINUE
      311   CONTINUE
    c------------workers part-----------start
          ELSE
               DO 33 II=1,NMA            
                    I = mlist(II)
                    R0_loc(i)=R0_loc(i)+R1_loc(i)+R2_loc(i)+R3_loc(i)
                    R1_loc(i)=R1_loc(i) + 2.0d0*R2_loc(i) + 3.0d0*R3_loc(i)
                    R2_loc(i)=R2_loc(i) + 3.0d0*R3_loc(i)
                    R0_loc(i)=R0_loc(i)-
         &                    CUBE(myrank)*ANINT(R0_loc(i)/CUBE(myrank))
    c
       33      CONTINUE
    C------finished computation, now send back to root
    c
             call mpi_send(R0_loc(1),10,mpi_real8,0,0,
         &                   Mpi_Comm_World,nIerr)
             call mpi_send(R1_loc(1),10,mpi_real8,0,1,
         &                   Mpi_Comm_World,nIerr)
             call mpi_send(R2_loc(1),10,mpi_real8,0,2,
         &                   Mpi_Comm_World,nIerr)
             call mpi_send(R3_loc(1),10,mpi_real8,0,3,
         &                   Mpi_Comm_World,nIerr)
    c------------workers part-----------end
          endif
    
          RETURN
          END


    • Edited by oferyko Wednesday, September 26, 2012 8:21 PM typo
    Wednesday, September 26, 2012 8:12 PM