<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> Or, simpler, you can just use is() in lower case for the Fortran is.<div><br></div><div> Barry</div><div><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jan 26, 2025, at 7:11 PM, Barry Smith <bsmith@petsc.dev> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> Sorry for the delay in responding. <div><br></div><div> The easiest way is to simply skip the #include "petsc/finclude/petscksp.h" and use type(tIS) instead of IS. </div><div><br></div><div> Explanation: the #include "petsc/finclude/petscksp.h" defines a few macros to make the current PETSc Fortran API look like the old PETSc API. For example</div><div><br></div><div>#define IS type(tIS)</div><div><br></div><div> Barry</div><div><br><div><br><blockquote type="cite"><div>On Jan 23, 2025, at 3:16 AM, Klaij, Christiaan via petsc-users <petsc-users@mcs.anl.gov> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div><div>In fortran I'm using the following structure to check the type of<br>an incoming variable:<br><br> SELECT TYPE (myvar)<br> TYPE IS (mytype)<br> ...<br> END SELECT<br><br>Here IS is a fortan intrinsic, so far so good. However, when I<br>add a petsc index set as follows<br><br> #include "petsc/finclude/petscksp.h"<br><br> use petscksp, only: tIS<br><br> IS :: myIS<br><br>the compiler gets confused and thinks that the intrinsic fortran<br>IS is the petsc index set IS, and errors-out on the SELECT<br>TYPE: <br><br> error #8245: SELECT TYPE statement must be immediately followed by CLASS IS, TYPE IS, CLASS DEFAULT or END SELECT statement.<br> SELECT TYPE (myvar)<br> ----^<br> error #6410: This name has not been declared as an array or a function. [TYPE]<br> TYPE type(tIS) (mytype)<br> ---------^<br> compilation aborted<br><br>What would be the right way to deal with this problem?<br></div><div dir="ltr" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:100%;font-size:1px;direction:ltr;"><table dir="ltr" cellpadding="0" cellspacing="0" border="0" style="width:100%;direction:ltr;border-collapse:collapse;font-size:1px;"><tbody><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tbody><tr style="font-size:0;"><td align="left" style="padding:10px 0;vertical-align:top;"><div style="margin-top: 0px; margin-bottom: 0px;"><span id="cid:image870949.png@9BEC9255.0B0D42BA"><image870949.png></span></div></td></tr></tbody></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tbody><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><tbody><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">dr. ir.<span style="font-family:remialcxesans;font-size:1px;color:#FFFFFF;line-height:1px;"><span style="font-family:'template-A7LWMTpBEe2ifABQ8nUoZA';"></span><span style="font-family:'zone-1';"></span><span style="font-family:'zones-AQ';"></span></span> </div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">Christiaan</div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;"> Klaij</div></td></tr></tbody></table></td><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><tbody><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;"> | </div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">Senior Researcher</div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;"> | </div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">Research & Development</div></td><td align="left" style="vertical-align:top;font-size:0;"></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tbody><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><tbody><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">T <a href="tel:+31%20317%2049%2033%2044" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">+31 317 49 33 44</a></div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;"> | </div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;"> <a href="mailto:C.Klaij@marin.nl" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">C.Klaij@marin.nl</a> </div></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">| <a href="https://urldefense.us/v3/__https://www.marin.nl/__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMVdrITEk$" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">www.marin.nl</a></div></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tbody><tr style="font-size:0;"><td align="left" style="padding:5px 0 0;vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tbody><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tbody><tr style="font-size:0;"><td align="left" style="padding:0 3px 3px 0;vertical-align:top;"><div style="margin-top: 0px; margin-bottom: 0px;"><a href="https://urldefense.us/v3/__https://www.facebook.com/marin.wageningen__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMJEayozg$" target="_blank" id="LPlnk689713" style="text-decoration:none;"><span id="cid:image753651.png@774551B4.82D3CA8E"><image753651.png></span></a></div></td></tr></tbody></table></td><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tbody><tr style="font-size:0;"><td align="left" style="padding:0 3px 3px 0;vertical-align:top;"><div style="margin-top: 0px; margin-bottom: 0px;"><a href="https://urldefense.us/v3/__https://www.linkedin.com/company/marin__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMHWYJziY$" target="_blank" id="LPlnk689713" style="text-decoration:none;"><span id="cid:image316694.png@7CC98826.EB3BC7B6"><image316694.png></span></a></div></td></tr></tbody></table></td><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tbody><tr style="font-size:0;"><td align="left" style="padding:0 3px 3px 0;vertical-align:top;"><div style="margin-top: 0px; margin-bottom: 0px;"><a href="https://urldefense.us/v3/__https://www.youtube.com/marinmultimedia__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMGp7QgsM$" target="_blank" id="LPlnk689713" style="text-decoration:none;"><span id="cid:image966725.png@B6A67284.C0F468AD"><image966725.png></span></a></div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></body></html>