<div dir="ltr"><div>Thanks. Our server is down today, will test it later tonight. <br><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 7:10 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">On Tue, Apr 16, 2013 at 3:36 AM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br></div><div class="im">          I used the DMPlexCreateSection with Fortran pointers instead of allocatable arrays, the code goes past the error in previous error but now i get error about the BcPoints IS . Now i printed all the in put data before passing to the DMPlexCreateSection, the IS is in a valid state. However, i get a error realted to IS. am i doing something wrong here ?<br>

</div></div></div></div></div></blockquote><div><br></div><div>There is an example of this: src/dm/impls/plex/examples/tutorials/ex1f90.F</div><div><br></div><div>The problem is that I made this a traditional F77 interface. I will change it to F90. The problem is that</div>

<div>I cannot be completely consistent since F77 cannot pass back arrays, and naming all those F90 makes</div><div>the interface look horrible. Also, Fortran has no way of telling you that you are passing the wrong type.</div>

<div><br></div><div>    Matt</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div></div><div>This is the data i pass to the DMPlexCreateSection. Data printed from code before calling the createsection. You can see that the number of boundary conditions is 2, i have allocated the BcPoints array with index lower bound 0 and upper bound 1. Calling ISgetLocalSize and ISView gives no error.<br>


</div><div><br></div> dim           1<br> numField           1<br> numComp pointer           1<br> cell DofMap pointer           1           0<br> num BC           2<br> bcField           0           0<br> Check BCPoints Index set for BcPointsIS[           0 ]<br>


 Number of local points           1<br>Number of indices in set 1<br>0 1<br> -----------end IS View----------<br> Check BCPoints Index set for BcPointsIS[           1 ]<br> Number of local points           1<br>Number of indices in set 1<br>


0 12<br> -----------end IS View----------<br><br></div>But the call do ISViewGetLocalSize inside the DMPlexCreateSection is saying object is in wrong state...<br><br></div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>


[0]PETSC ERROR: Invalid argument!<br>[0]PETSC ERROR: Wrong type of object: Parameter # 1!<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: Petsc Development GIT revision: b6da085e934eddcf71be97425c4be8a7ff05e85d  <br>


GIT Date: 2013-04-15 22:47:22 -0500<br>[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>[0]PETSC ERROR: See docs/index.html for manual pages.<br>


[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: ./PoisTest on a mpi_rScalar_Debug named <a href="http://login3.stampede.tacc.utexas.edu" target="_blank">login3.stampede.tacc.utexas.edu</a> by<br>


 Reddy135 Tue Apr 16 03:29:09 2013<br>[0]PETSC ERROR: Libraries linked from /home1/00924/Reddy135/LocalApps/petsc/mpi_rScalar_De<br>bug/lib<br>[0]PETSC ERROR: Configure run at Tue Apr 16 01:38:29 2013<br>[0]PETSC ERROR: Configure options   --download-blacs=1 --download-ctetgen=1 --download-met<br>


is=1 --download-mumps=1 --download-parmetis=1 --download-scalapack=1 --download-superlu_di<br>st=1 --download-triangle=1 --download-umfpack=1 --with-blas-lapack-dir=/opt/apps/intel/13/<br>composer_xe_2013.2.146/mkl/lib/intel64/ --with-debugging=1 --with-mpi-dir=/opt/apps/intel1<br>


3/mvapich2/1.9/ --with-petsc-arch=mpi_rScalar_Debug --with-petsc-dir=/home1/00924/Reddy135<br>/LocalApps/petsc PETSC_ARCH=mpi_rScalar_Debug<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>


[0]PETSC ERROR: ISGetLocalSize() line 322 in /home1/00924/Reddy135/LocalApps/petsc/src/vec<br>/is/is/interface/index.c<br>[0]PETSC ERROR: DMPlexCreateSectionBCDof() line 5937 in /home1/00924/Reddy135/LocalApps/pe<br>tsc/src/dm/impls/plex/plex.c<br>


[0]PETSC ERROR: DMPlexCreateSection() line 6149 in /home1/00924/Reddy135/LocalApps/petsc/s<br>rc/dm/impls/plex/plex.c<br></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Apr 16, 2013 at 2:52 AM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello,<br></div>         I am getting a segfault in DMPlexcreateSectionF90 ...I am not sure if the problem is in parameters i pass or it is coming from petsc...can you help me fix this ?<br>



</div>Here is the output from debugger:<br></div>I print the variables passed to function before call and they seem consistent with the format required by the DMPlexCreateSectionF90 call...<br><br>Breakpoint 1.1, FEMLIB_M::setupdefualtsection_dofmap (this=0x2781e28) at /home1/00924/R<br>



eddy135/projects/utgds/src/fem/VariationalProblemBoundProcedures.F90:197<br>197       call DMPlexCreateSectionF90(this%mdata%Meshdm,this%tdim, this%numField, &<br>(idb) s<br>198            this%numComp,this%cellDofMap, this%numBC, this%bcFieldId,  &<br>



(idb) s<br>199            this%bcPointIS,section,ierr)<br>(idb) print this%tdim<br>$25 = 1<br>(idb) print this%numField<br>$26 = 1<br>(idb) print this%numcomp<br>$27 = 1<br>(idb) print this%cellDofMap<br>$28 = {1, 0}<br>


(idb) print this%numBC<br>
$29 = 2<br>(idb) c<br>Continuing.<br><br>Breakpoint 1.2, FEMLIB_M::setupdefualtsection_dofmap (this=0x2781e28) at /home1/00924/R<br>eddy135/projects/utgds/src/fem/VariationalProblemBoundProcedures.F90:197<br>197       call DMPlexCreateSectionF90(this%mdata%Meshdm,this%tdim, this%numField, &<br>



(idb) c<br>Continuing.<br><br>Breakpoint 1.3, FEMLIB_M::setupdefualtsection_dofmap (this=0x2781e28) at /home1/00924/R<br>eddy135/projects/utgds/src/fem/VariationalProblemBoundProcedures.F90:197<br>197       call DMPlexCreateSectionF90(this%mdata%Meshdm,this%tdim, this%numField, &<br>



(idb) c<br>Continuing.<br><br></div>Now i see a segfault in inside the petsc call<br><br>Program received signal SIGSEGV<br>DMPlexCreateSectionInitial (dm=0x281cfa0, dim=1, numFields=1, numComp=0x43ce7cf20000000<br>1, numDof=0x1, section=0x7fffa07c8d28) at /home1/00924/Reddy135/LocalApps/petsc/src/dm/<br>



impls/plex/plex.c:5892<br>5892        for (f = 0; f < numFields; ++f) numDofTot[d] += numDof[f*(dim+1)+d];<br><br></div>why is the adress of numDof 0x1 ? some thing wrong in the FortranAddress conversion code in zplexf90 ?<br>



<br></div>here is the backtrace<br><br>#0  0x00002b79e6cec09a in DMPlexCreateSectionInitial (dm=0x281cfa0, dim=1, numFields=1,<br> numComp=0x43ce7cf200000001, numDof=0x1, section=0x7fffa07c8d28) at /home1/00924/Reddy1<br>



35/LocalApps/petsc/src/dm/impls/plex/plex.c:5892<br>#1  0x00002b79e6cf1038 in DMPlexCreateSection (dm=0x281cfa0, dim=1, numFields=1, numCom<br>p=0x43ce7cf200000001, numDof=0x1, numBC=2, bcField=0xc420000000000000, bcPoints=0xc4200<br>



00002a66e21, section=0x7fffa07c8d28) at /home1/00924/Reddy135/LocalApps/petsc/src/dm/im<br>pls/plex/plex.c:6148<br>#2  0x00002b79e6d9e571 in dmplexcreatesectionf90_ (dm=0x259bda8, dim=0x2781e8c, numFiel<br>ds=0x2781e90, ptrC=0x25ed9e0, ptrD=0x28adf00, numBC=0x27820a0, ptrF=0x25eda00, ptrP=0x2<br>



878900, section=0x7fffa07c8d28, __ierr=0x7fffa07c8c98) at /home1/00924/Reddy135/LocalAp<br>ps/petsc/src/dm/impls/plex/f90-custom/zplexf90.c:221<span><font color="#888888"><br clear="all"><div><div><div><div>
<div><div><div><div><br>-- <br>-----------------------------------------------------<br>
Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>University of Texas at Austin,<br>10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>



Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>



</div></div></div></div></div></div></div></div></font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>University of Texas at Austin,<br>


10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>

United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</div>
</div></div></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>

-- Norbert Wiener
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>University of Texas at Austin,<br>
10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: +1-512-350-9082<br>United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</div>