      SUBROUTINE COMMUN(NOD1,NOD2,NB,ILIST,JLIST,LONG)
C
      INTEGER NOD1(*),NOD2(*),ILIST(*),JLIST(*)
C
      NB = 0
      DO 10 I=1,LONG
        DO 20 J=1,LONG
          IF (NOD1(I).EQ.NOD2(J)) THEN
            NB = NB+1
            ILIST(NB) = I
            JLIST(NB) = J
            GOTO 10
          ENDIF
   20   CONTINUE
   10 CONTINUE
c      if (nb.ne.0) then
c       print*,'----------------'
c       print*,nb,(nod1(ilist(k)),k=1,nb)
c       print*,nb,(nod2(jlist(k)),k=1,nb)
c      ENDif
      END
