[petsc-users] Segfault in DMPlexCreateSectionF90

Dharmendar Reddy dharmareddy84 at gmail.com
Tue Apr 16 15:27:47 CDT 2013


Thanks. Our server is down today, will test it later tonight.




On Tue, Apr 16, 2013 at 7:10 AM, Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Apr 16, 2013 at 3:36 AM, Dharmendar Reddy <dharmareddy84 at gmail.com
> > wrote:
>
>> Hello,
>>           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 ?
>>
>
> There is an example of this: src/dm/impls/plex/examples/tutorials/ex1f90.F
>
> The problem is that I made this a traditional F77 interface. I will change
> it to F90. The problem is that
> I cannot be completely consistent since F77 cannot pass back arrays, and
> naming all those F90 makes
> the interface look horrible. Also, Fortran has no way of telling you that
> you are passing the wrong type.
>
>     Matt
>
>
>> 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.
>>
>>  dim           1
>>  numField           1
>>  numComp pointer           1
>>  cell DofMap pointer           1           0
>>  num BC           2
>>  bcField           0           0
>>  Check BCPoints Index set for BcPointsIS[           0 ]
>>  Number of local points           1
>> Number of indices in set 1
>> 0 1
>>  -----------end IS View----------
>>  Check BCPoints Index set for BcPointsIS[           1 ]
>>  Number of local points           1
>> Number of indices in set 1
>> 0 12
>>  -----------end IS View----------
>>
>> But the call do ISViewGetLocalSize inside the DMPlexCreateSection is
>> saying object is in wrong state...
>>
>> [0]PETSC ERROR: --------------------- Error Message
>> ------------------------------------
>> [0]PETSC ERROR: Invalid argument!
>> [0]PETSC ERROR: Wrong type of object: Parameter # 1!
>> [0]PETSC ERROR:
>> ------------------------------------------------------------------------
>> [0]PETSC ERROR: Petsc Development GIT revision:
>> b6da085e934eddcf71be97425c4be8a7ff05e85d
>> GIT Date: 2013-04-15 22:47:22 -0500
>> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
>> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
>> [0]PETSC ERROR: See docs/index.html for manual pages.
>> [0]PETSC ERROR:
>> ------------------------------------------------------------------------
>> [0]PETSC ERROR: ./PoisTest on a mpi_rScalar_Debug named
>> login3.stampede.tacc.utexas.edu by
>>  Reddy135 Tue Apr 16 03:29:09 2013
>> [0]PETSC ERROR: Libraries linked from
>> /home1/00924/Reddy135/LocalApps/petsc/mpi_rScalar_De
>> bug/lib
>> [0]PETSC ERROR: Configure run at Tue Apr 16 01:38:29 2013
>> [0]PETSC ERROR: Configure options   --download-blacs=1
>> --download-ctetgen=1 --download-met
>> is=1 --download-mumps=1 --download-parmetis=1 --download-scalapack=1
>> --download-superlu_di
>> st=1 --download-triangle=1 --download-umfpack=1
>> --with-blas-lapack-dir=/opt/apps/intel/13/
>> composer_xe_2013.2.146/mkl/lib/intel64/ --with-debugging=1
>> --with-mpi-dir=/opt/apps/intel1
>> 3/mvapich2/1.9/ --with-petsc-arch=mpi_rScalar_Debug
>> --with-petsc-dir=/home1/00924/Reddy135
>> /LocalApps/petsc PETSC_ARCH=mpi_rScalar_Debug
>> [0]PETSC ERROR:
>> ------------------------------------------------------------------------
>> [0]PETSC ERROR: ISGetLocalSize() line 322 in
>> /home1/00924/Reddy135/LocalApps/petsc/src/vec
>> /is/is/interface/index.c
>> [0]PETSC ERROR: DMPlexCreateSectionBCDof() line 5937 in
>> /home1/00924/Reddy135/LocalApps/pe
>> tsc/src/dm/impls/plex/plex.c
>> [0]PETSC ERROR: DMPlexCreateSection() line 6149 in
>> /home1/00924/Reddy135/LocalApps/petsc/s
>> rc/dm/impls/plex/plex.c
>>
>>
>> On Tue, Apr 16, 2013 at 2:52 AM, Dharmendar Reddy <
>> dharmareddy84 at gmail.com> wrote:
>>
>>> Hello,
>>>          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 ?
>>> Here is the output from debugger:
>>> I print the variables passed to function before call and they seem
>>> consistent with the format required by the DMPlexCreateSectionF90 call...
>>>
>>> Breakpoint 1.1, FEMLIB_M::setupdefualtsection_dofmap (this=0x2781e28) at
>>> /home1/00924/R
>>> eddy135/projects/utgds/src/fem/VariationalProblemBoundProcedures.F90:197
>>> 197       call DMPlexCreateSectionF90(this%mdata%Meshdm,this%tdim,
>>> this%numField, &
>>> (idb) s
>>> 198            this%numComp,this%cellDofMap, this%numBC,
>>> this%bcFieldId,  &
>>> (idb) s
>>> 199            this%bcPointIS,section,ierr)
>>> (idb) print this%tdim
>>> $25 = 1
>>> (idb) print this%numField
>>> $26 = 1
>>> (idb) print this%numcomp
>>> $27 = 1
>>> (idb) print this%cellDofMap
>>> $28 = {1, 0}
>>> (idb) print this%numBC
>>> $29 = 2
>>> (idb) c
>>> Continuing.
>>>
>>> Breakpoint 1.2, FEMLIB_M::setupdefualtsection_dofmap (this=0x2781e28) at
>>> /home1/00924/R
>>> eddy135/projects/utgds/src/fem/VariationalProblemBoundProcedures.F90:197
>>> 197       call DMPlexCreateSectionF90(this%mdata%Meshdm,this%tdim,
>>> this%numField, &
>>> (idb) c
>>> Continuing.
>>>
>>> Breakpoint 1.3, FEMLIB_M::setupdefualtsection_dofmap (this=0x2781e28) at
>>> /home1/00924/R
>>> eddy135/projects/utgds/src/fem/VariationalProblemBoundProcedures.F90:197
>>> 197       call DMPlexCreateSectionF90(this%mdata%Meshdm,this%tdim,
>>> this%numField, &
>>> (idb) c
>>> Continuing.
>>>
>>> Now i see a segfault in inside the petsc call
>>>
>>> Program received signal SIGSEGV
>>> DMPlexCreateSectionInitial (dm=0x281cfa0, dim=1, numFields=1,
>>> numComp=0x43ce7cf20000000
>>> 1, numDof=0x1, section=0x7fffa07c8d28) at
>>> /home1/00924/Reddy135/LocalApps/petsc/src/dm/
>>> impls/plex/plex.c:5892
>>> 5892        for (f = 0; f < numFields; ++f) numDofTot[d] +=
>>> numDof[f*(dim+1)+d];
>>>
>>> why is the adress of numDof 0x1 ? some thing wrong in the FortranAddress
>>> conversion code in zplexf90 ?
>>>
>>> here is the backtrace
>>>
>>> #0  0x00002b79e6cec09a in DMPlexCreateSectionInitial (dm=0x281cfa0,
>>> dim=1, numFields=1,
>>>  numComp=0x43ce7cf200000001, numDof=0x1, section=0x7fffa07c8d28) at
>>> /home1/00924/Reddy1
>>> 35/LocalApps/petsc/src/dm/impls/plex/plex.c:5892
>>> #1  0x00002b79e6cf1038 in DMPlexCreateSection (dm=0x281cfa0, dim=1,
>>> numFields=1, numCom
>>> p=0x43ce7cf200000001, numDof=0x1, numBC=2, bcField=0xc420000000000000,
>>> bcPoints=0xc4200
>>> 00002a66e21, section=0x7fffa07c8d28) at
>>> /home1/00924/Reddy135/LocalApps/petsc/src/dm/im
>>> pls/plex/plex.c:6148
>>> #2  0x00002b79e6d9e571 in dmplexcreatesectionf90_ (dm=0x259bda8,
>>> dim=0x2781e8c, numFiel
>>> ds=0x2781e90, ptrC=0x25ed9e0, ptrD=0x28adf00, numBC=0x27820a0,
>>> ptrF=0x25eda00, ptrP=0x2
>>> 878900, section=0x7fffa07c8d28, __ierr=0x7fffa07c8c98) at
>>> /home1/00924/Reddy135/LocalAp
>>> ps/petsc/src/dm/impls/plex/f90-custom/zplexf90.c:221
>>>
>>> --
>>> -----------------------------------------------------
>>> Dharmendar Reddy Palle
>>> Graduate Student
>>> Microelectronics Research center,
>>> University of Texas at Austin,
>>> 10100 Burnet Road, Bldg. 160
>>> MER 2.608F, TX 78758-4445
>>> e-mail: dharmareddy84 at gmail.com
>>> Phone: +1-512-350-9082
>>> United States of America.
>>> Homepage: https://webspace.utexas.edu/~dpr342
>>>
>>
>>
>>
>> --
>> -----------------------------------------------------
>> Dharmendar Reddy Palle
>> Graduate Student
>> Microelectronics Research center,
>> University of Texas at Austin,
>> 10100 Burnet Road, Bldg. 160
>> MER 2.608F, TX 78758-4445
>> e-mail: dharmareddy84 at gmail.com
>> Phone: +1-512-350-9082
>> United States of America.
>> Homepage: https://webspace.utexas.edu/~dpr342
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>



-- 
-----------------------------------------------------
Dharmendar Reddy Palle
Graduate Student
Microelectronics Research center,
University of Texas at Austin,
10100 Burnet Road, Bldg. 160
MER 2.608F, TX 78758-4445
e-mail: dharmareddy84 at gmail.com
Phone: +1-512-350-9082
United States of America.
Homepage: https://webspace.utexas.edu/~dpr342
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130416/b5b9fd86/attachment-0001.html>


More information about the petsc-users mailing list