<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>I just updated petsc from the repo to the latest master branch version, and a compilation problem popped up, it seems like the variable types are not being acknowledged properly, what i have in a minimum working example fashion is:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">#include <petsc/finclude/petscvec.h><br>#include <petsc/finclude/petscdmda.h><br>#include <petsc/finclude/petscdm.h><br>#include <petsc/finclude/petscis.h><br>#include <petsc/finclude/petscksp.h><br>USE petscvec<br>USE petscdmda<br>USE petscdm<br>USE petscis<br>USE petscksp<br>IS                     :: ScalarIS<br>IS                     :: DummyIS<br>VecScatter             :: LargerToSmaller,to0,from0<br>VecScatter             :: SmallerToLarger<br>PetscInt, ALLOCATABLE  :: pScalarDA(:), pDummyDA(:)<br>PetscScalar            :: rtol<br>Vec                    :: Vec1<br>Vec                    :: Vec2<br>! Create index sets<br>            allocate( pScalarDA(0:(gridx-1)*(gridy-1)*(gridz-1)-1) , pDummyDA(0:(gridx-1)*(gridy-1)*(gridz-1)-1) )<br>            iter=0<br>            do k=0,gridz-2<br>                kplane = k*gridx*gridy<br>                do j=0,gridy-2<br>                    do i=0,gridx-2<br>                        pScalarDA(iter) = kplane + j*(gridx) + i<br>                        iter = iter+1<br>                    enddo<br>                enddo<br>            enddo<br>            pDummyDA = (/ (ind, ind=0,((gridx-1)*(gridy-1)*(gridz-1))-1) /)<br>            call ISCreateGeneral(PETSC_COMM_WORLD,(gridx-1)*(gridy-1)*(gridz-1), &<br>                                         pScalarDA,PETSC_COPY_VALUES,ScalarIS,ierr)<br>            call ISCreateGeneral(PETSC_COMM_WORLD,(gridx-1)*(gridy-1)*(gridz-1), &<br>                                         pDummyDA,PETSC_COPY_VALUES,DummyIS,ierr)<br>            deallocate(pScalarDA,pDummyDA, STAT=ierr)<br>            ! Create VecScatter contexts: LargerToSmaller & SmallerToLarger<br>            call DMDACreateNaturalVector(daScalars,Vec1,ierr)<br>            call DMDACreateNaturalVector(daDummy,Vec2,ierr)<br>            call VecScatterCreate(Vec1,ScalarIS,Vec2,DummyIS,LargerToSmaller,ierr)<br>            call VecScatterCreate(Vec2,DummyIS,Vec1,ScalarIS,SmallerToLarger,ierr)<br>            call VecDestroy(Vec1,ierr)<br>            call VecDestroy(Vec2,ierr)</blockquote></div><div><br></div><div>And the error i get is the part i cannot really understand:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">matrixobjs.f90:99.34:<br>            call VecScatterCreate(Vec1,ScalarIS,Vec2,DummyIS,LargerToSmaller,ie<br>                                                 1<br>Error: Type mismatch in argument 'a' at (1); passed TYPE(tvec) to INTEGER(4)<br>matrixobjs.f90:100.34:<br>            call VecScatterCreate(Vec2,DummyIS,Vec1,ScalarIS,SmallerToLarger,ie<br>                                                 1<br>Error: Type mismatch in argument 'a' at (1); passed TYPE(tvec) to INTEGER(4)<br>make[1]: *** [matrixobjs.o] Error 1<br>make[1]: Leaving directory `/usr/scratch/valera/ParGCCOM-Master/Src'<br>make: *** [gcmSeamount] Error 2</blockquote><div><br></div><div>What i find hard to understand is why/where my code is finding an integer type? as you can see from the MWE header the variables types look correct,</div><div><br></div><div>Any help is appreaciated,</div><div><br></div><div>Thanks, </div><div> </div></div><div><br></div></div></div></div></div></div>