C CUPMIN    SOURCE    PV        17/12/05    21:15:49     9646           
      subroutine cupmin(bu,bufPos,pMinte)
C=======================================================================
C     COLlaborateur UnPAQuettage MINte
C     Depaquiettage d un segment d integration MINTE
C=======================================================================
      integer nbno,nbpgau
      integer bufPos
      integer lonBuf
-INC SMINTE
C-INC TMCOLAC
      segment BUFFER
         character ffer(lonBuf)
      endsegment
      pointeur pMinte.MINTE
      pointeur bu.BUFFER

C      write(ioimp,*) 'Entre dans CUPMIN'
C      write(ioimp,*) 'Position du buffer',bufPos
      lonBuf=bu.ffer(/2)
      call mpiupI(nbno,1,bu,bufPos)
      call mpiupI(nbpgau,1,bu,bufPos)
C         write(ioimp,*) 'nbno, nbpgau',nbno,nbpgau

      if (pMinte.ne.0) then
         segact pMinte*mod
         segadj pMinte
      else
         segini pMinte
      endif

      if(nbno.ne.0.and.nbpgau.ne.0)then
         call mpiupR( pMinte.poigau,nbpgau,bu,bufPos)
         call mpiupR( pMinte.qsigau,nbpgau,bu,bufPos)
         call mpiupR( pMinte.etagau,nbpgau,bu,bufPos)
         call mpiupR( pMinte.dzegau,nbpgau,bu,bufPos)
         call mpiupR( pMinte.shptot,6*nbno*nbpgau,bu,bufPos)
      else
C         write(ioimp,*) 'segment vide'
      endif
      segdes pMinte
C      write(ioimp,*) 'Position du buffer',bufPos
C      write(ioimp,*) 'Sortie de CUPMIN'
      end


 
 
