<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">
<div>Maybe you should delete your PETSC_ARCH directory and recompile it? I tested my branch. It should not that easily fail :)</div>
<div><br clear="all">
<div>
<div dir="ltr" class="m_356008680562990494gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">--Junchao Zhang</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2019 at 8:20 PM Manuel Valera <<a href="mailto:mvalera-w@sdsu.edu" target="_blank">mvalera-w@sdsu.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi Mr Zhang, thanks for your reply,
<div><br>
</div>
<div>I just checked your branch out, reconfigured and recompiled and i am still getting the same error from my last email (null argument, when expected a valid pointer), do you have any idea why this can be happening?</div>
<div><br>
</div>
<div>Thanks so much,</div>
<div><br>
</div>
<div>Manuel </div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2019 at 6:09 PM Zhang, Junchao <<a href="mailto:jczhang@mcs.anl.gov" target="_blank">jczhang@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div dir="ltr">
<div>Manuel,</div>
<div dir="ltr">I was working on a branch to revert the VecScatterCreate to VecScatterCreateWithData change. The change broke PETSc API and I think we do not need it. I had planed to do a pull request after my another PR is merged.</div>
<div dir="ltr">But since it already affects you, you can try this branch now, which is jczhang/fix-vecscattercreate-api
<div>
<div><br>
</div>
<div>
<div>
<div>Thanks.<br clear="all">
<div>
<div dir="ltr" class="gmail-m_356008680562990494gmail-m_-5189842921445293272gmail-m_2591117716463385133gmail_signature">
<div dir="ltr">--Junchao Zhang</div>
</div>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2019 at 5:58 PM Jed Brown via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Did you just update to 'master'? See VecScatter changes:<br>
<br>
<a href="https://www.mcs.anl.gov/petsc/documentation/changes/dev.html" rel="noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/changes/dev.html</a><br>
<br>
Manuel Valera via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> writes:<br>
<br>
> Hello,<br>
><br>
> I just updated petsc from the repo to the latest master branch version, and<br>
> a compilation problem popped up, it seems like the variable types are not<br>
> being acknowledged properly, what i have in a minimum working example<br>
> fashion is:<br>
><br>
> #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) ,<br>
>> 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<br>
>> ISCreateGeneral(PETSC_COMM_WORLD,(gridx-1)*(gridy-1)*(gridz-1), &<br>
>><br>
>> pScalarDA,PETSC_COPY_VALUES,ScalarIS,ierr)<br>
>> call<br>
>> ISCreateGeneral(PETSC_COMM_WORLD,(gridx-1)*(gridy-1)*(gridz-1), &<br>
>><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<br>
>> VecScatterCreate(Vec1,ScalarIS,Vec2,DummyIS,LargerToSmaller,ierr)<br>
>> call<br>
>> VecScatterCreate(Vec2,DummyIS,Vec1,ScalarIS,SmallerToLarger,ierr)<br>
>> call VecDestroy(Vec1,ierr)<br>
>> call VecDestroy(Vec2,ierr)<br>
><br>
><br>
> And the error i get is the part i cannot really understand:<br>
><br>
> matrixobjs.f90:99.34:<br>
>> call<br>
>> VecScatterCreate(Vec1,ScalarIS,Vec2,DummyIS,LargerToSmaller,ie<br>
>> 1<br>
>> Error: Type mismatch in argument 'a' at (1); passed TYPE(tvec) to<br>
>> INTEGER(4)<br>
>> matrixobjs.f90:100.34:<br>
>> call<br>
>> VecScatterCreate(Vec2,DummyIS,Vec1,ScalarIS,SmallerToLarger,ie<br>
>> 1<br>
>> Error: Type mismatch in argument 'a' at (1); passed TYPE(tvec) to<br>
>> 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<br>
><br>
><br>
> What i find hard to understand is why/where my code is finding an integer<br>
> type? as you can see from the MWE header the variables types look correct,<br>
><br>
> Any help is appreaciated,<br>
><br>
> Thanks,<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</body>
</html>