<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Got it. It works.
<div class=""><br class="">
</div>
<div class="">While you are at it, would you minding adding the binding for PetscOptionsLeft. </div>
<div class="">I am attaching the patch, </div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">diff --git a/src/sys/objects/ftn-custom/zoptionsf.c b/src/sys/objects/ftn-custom/zoptionsf.c</b></span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">index 65d64b1580..9d36bc2d4d 100644</b></span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">--- a/src/sys/objects/ftn-custom/zoptionsf.c</b></span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">+++ b/src/sys/objects/ftn-custom/zoptionsf.c</b></span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(51, 187, 200); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">@@ -24,6 +24,7 @@</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscoptionsclear_                 PETSCOPTIONSCLEAR</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscoptionsinsertstring_          PETSCOPTIONSINSERTSTRING</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscoptionsview_                  PETSCOPTIONSVIEW</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+#define petscoptionsleft_                  PETSCOPTIONSLEFT</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscobjectviewfromoptions_        PETSCOBJECTVIEWFROMOPTIONS</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscoptionsgetenumprivate_        petscoptionsgetenumprivate</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(51, 187, 200); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">@@ -42,6 +43,7 @@</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscoptionsclear_                 petscoptionsclear</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscoptionsinsertstring_          petscoptionsinsertstring</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscoptionsview_                  petscoptionsview</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+#define petscoptionsleft_                  petscoptionsleft</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #define petscobjectviewfromoptions_        petscobjectviewfromoptions</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> #endif</span></div>
<p style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255); min-height: 15px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #33bbc8" class="">@@ -254,6 +256,12 @@</span><span style="font-variant-ligatures: no-common-ligatures" class=""> PETSC_EXTERN void PETSC_STDCALL petscoptionsview_(PetscOptions *options,PetscVie</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">   *ierr = PetscOptionsView(*options,v);</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> }</span></div>
<p style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255); min-height: 15px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+PETSC_EXTERN void PETSC_STDCALL petscoptionsleft_(PetscOptions *options,PetscErrorCode *ierr)</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+{</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+ CHKFORTRANNULLOBJECTDEREFERENCE(options);</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+  *ierr = PetscOptionsLeft(*options);</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+}</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">+</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> PETSC_EXTERN void PETSC_STDCALL petscobjectviewfromoptions_(PetscObject *obj,PetscObject *bobj,char* option PETSC_MIXED_LEN(loption),PetscErrorCode *ierr  PETSC_END_LEN(loption))</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div>
<div style="margin: 0px; line-height: normal; font-family: 'Source Code Pro'; background-color: rgb(255, 255, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">   char *o;</span></div>
</div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div class="">Blaise</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 14, 2017, at 3:54 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" class="">balay@mcs.anl.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">include/petscsys.h:PETSC_EXTERN PetscErrorCode PetscDataTypeGetSize(PetscDataType,size_t*);<br class="">
<br class="">
Looks like this needs a custom stub due to 'size_t' parameter.<br class="">
<br class="">
I've aded the custom interface to balay/add-ftn-PetscDataTypeGetSize. Can you give it a try?<br class="">
<br class="">
You would have to use a datatype that matches 'size_t' on the fortran size - i.e PetscSizeT.<br class="">
<br class="">
Satish<br class="">
<br class="">
On Fri, 14 Jul 2017, Blaise A Bourdin wrote:<br class="">
<br class="">
<blockquote type="cite" class="">Hi,<br class="">
<br class="">
It looks like the fortran binding for PetscDataTypeGetSize was removed a while ago. Evidently, auto generated binding won’t work here.<br class="">
I’m a bit out of sync with the recent fortran changes, but why are automatically generated binding not working anymore, and what should the proper binding look like?<br class="">
<br class="">
Alternatively, is there a new recommended way to query the size of a Petsc type from fortran?<br class="">
<br class="">
Blaise<br class="">
<br class="">
<br class="">
<br class="">
</blockquote>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class=""><span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">
<span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
-- </div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
Department of Mathematics and Center for Computation & Technology</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
Louisiana State University, Baton Rouge, LA 70803, USA</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 <a href="http://www.math.lsu.edu/~bourdin" class="">
http://www.math.lsu.edu/~bourdin</a></div>
<div class=""><br class="khtml-block-placeholder">
</div>
<div class=""><br class="khtml-block-placeholder">
</div>
<br class="Apple-interchange-newline">
</div>
</span></div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</span><br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>