<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
  #pfptBannerc0b3tis { all: revert !important; display: block !important; 
    visibility: visible !important; opacity: 1 !important; 
    background-color: #D0D8DC !important; 
    max-width: none !important; max-height: none !important }
  .pfptPrimaryButtonc0b3tis:hover, .pfptPrimaryButtonc0b3tis:focus {
    background-color: #b4c1c7 !important; }
  .pfptPrimaryButtonc0b3tis:active {
    background-color: #90a4ae !important; }
</style>

<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
 > It was a version incompatibility issue, resolved by configuring it with petsc. Note that "configuring with PETSc" is not a standard Python installation procedure. You should be able to install it in your virtual environment by
</div>
<!-- Preheader Text : END -->

<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>

<!--[if ((ie)|(mso))]>
  <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
    <table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
      <table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
        <tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
          This Message Is From an External Sender
        </td></tr>
        <tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
          This message came from outside your organization.
        </td></tr>

      </table>

    </td></tr></table>
  </td></tr></table>
<![endif]-->

<![if !((ie)|(mso))]>
  <div dir="ltr"  id="pfptBannerc0b3tis" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
    <div id="pfptBannerc0b3tis" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
      <div id="pfptBannerc0b3tis" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
        This Message Is From an External Sender
      </div>
      <div id="pfptBannerc0b3tis" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
      </div>

    </div>

    <div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
  </div>
<![endif]>

<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->

<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="ltr">> It was a version incompatibility issue, resolved by configuring it with petsc. <div><br></div><div>Note that "configuring with PETSc" is not a standard Python installation procedure.</div><div>You should be able to install it in your virtual environment by just doing</div><div><br></div><div>$ ... activate venv ....</div><div>$ cd src/binding/petsc4py</div><div>$ PETSC_DIR=... ; PETSC_ARCH=....; pip install .</div><div> </div><div>see also <a href="https://urldefense.us/v3/__https://petsc.org/release/petsc4py/install.html__;!!G_uCfscf7eWS!YOhounZLijkMQ6SoKMm5OyCugdS8yKtXQk2bpNiYOjsdPUTHQ3ceL1eZnBJM23hEv1qL6F9eyGtWgoGV_Gqu4mZKXuJJWGQ$">https://petsc.org/release/petsc4py/install.html</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 26 giu 2024 alle ore 14:30 maitri ksh <<a href="mailto:maitri.ksh@gmail.com">maitri.ksh@gmail.com</a>> ha scritto:<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 class="msg-8038094417060676717">





<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;display:none">
 It was a version incompatibility issue, resolved by configuring it with petsc. Thank you stefano & satish. On Wed, Jun 26, 2024 at 12: 34 AM Satish Balay <balay. anl@ fastmail. org> wrote: Best to get latest petsc and build petsc4py along
</div>



<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;display:none">ZjQcmQRYFpfptBannerStart</div>



<u></u>
  <div dir="ltr" id="m_-8038094417060676717pfptBanner9h2t58z" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top:4px solid rgb(144,164,174)">
    <div id="m_-8038094417060676717pfptBanner9h2t58z" style="float:left;display:block;margin:0px 0px 1px;max-width:600px">
      <div id="m_-8038094417060676717pfptBanner9h2t58z" style="display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
        This Message Is From an External Sender
      </div>
      <div id="m_-8038094417060676717pfptBanner9h2t58z" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
This message came from outside your organization.
      </div>

    </div>

    <div style="height:0px;clear:both;display:block;line-height:0;font-size:0.01px"> </div>
  </div>
<u></u>

<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;display:none">ZjQcmQRYFpfptBannerEnd</div>



<div dir="ltr">It was a version incompatibility issue, resolved by configuring it with petsc. Thank you stefano & satish.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 26, 2024 at 12:34 AM Satish Balay <<a href="mailto:balay.anl@fastmail.org" target="_blank">balay.anl@fastmail.org</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">Best to get latest petsc and build petsc4py along with petsc:<br>
<br>
For example:<br>
<br>
balay@petsc-gpu-02:/scratch/balay$ wget -q <a href="https://urldefense.us/v3/__https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.21.2.tar.gz__;!!G_uCfscf7eWS!ZtQZK7hSb7b0O7qL1NxuDxYo3aNcfvkMEs6i_bMC-NNUYojWqG8zVItjnY-Kvihf1GDSMdRoUuj7yOs32AUG7ysB$" rel="noreferrer" target="_blank">https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.21.2.tar.gz</a><br>
balay@petsc-gpu-02:/scratch/balay$ tar -xf petsc-3.21.2.tar.gz <br>
balay@petsc-gpu-02:/scratch/balay$ cd petsc-3.21.2/<br>
balay@petsc-gpu-02:/scratch/balay/petsc-3.21.2$ ./configure --download-mpich --download-fblaslapack --download-mpi4py --with-petsc4py=1 && make && make check && make petsc4pytest<br>
=============================================================================================<br>
                         Configuring PETSc to compile on your system<br>
=============================================================================================<br>
<snip><br>
testPlaceArray (test_vec.TestVecShared) ... ok<br>
testPlaceArray (test_vec.TestVecShared) ... ok<br>
<snip><br>
Ran 6154 tests in 134.314s<br>
OK<br>
=====================================<br>
balay@petsc-gpu-02:/scratch/balay/petsc-3.21.2$ <br>
<br>
<br>
Satish<br>
<br>
On Tue, 25 Jun 2024, Stefano Zampini wrote:<br>
<br>
> Which version of petsc4py is it?<br>
> <br>
> Il giorno mar 25 giu 2024 alle ore 20:35 maitri ksh <<a href="mailto:maitri.ksh@gmail.com" target="_blank">maitri.ksh@gmail.com</a>><br>
> ha scritto:<br>
> <br>
> > I am currently working on integrating petsc4py, but I am encountering<br>
> > persistent compilation issues related to Cython. Below are the details of<br>
> > my setup and the errors I am facing. I would greatly appreciate any<br>
> > assistance or guidance on how<br>
> > ZjQcmQRYFpfptBannerStart<br>
> > This Message Is From an External Sender<br>
> > This message came from outside your organization.<br>
> ><br>
> > ZjQcmQRYFpfptBannerEnd<br>
> ><br>
> > I am currently working on integrating petsc4py, but I am encountering<br>
> > persistent compilation issues related to Cython. Below are the details of<br>
> > my setup and the errors I am facing. I would greatly appreciate any<br>
> > assistance or guidance on how to resolve these issues.<br>
> > System Configuration:<br>
> ><br>
> >    - *PETSc Architecture*: linux-gnu-c-debug<br>
> >    - *Python Environment*: Python 3.6 (virtual environment)<br>
> >    - *Cython Version*: 3.0.10<br>
> >    - *Compiler*: /gcc11.2/bin/gcc<br>
> ><br>
> >  During the build process, I received multiple warnings and errors related<br>
> > to the use of noexcept, nogil, and except in function declarations. Here<br>
> > are some of the specific errors:<br>
> ><br>
> > cythonizing 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'<br>
> > warning: petsc4py.PETSc.pyx:1:0: Dotted filenames ('petsc4py.PETSc.pyx')<br>
> > are deprecated. Please use the normal Python package directory layout.<br>
> > /home/maitri.ksh/Maitri/petsc/petsc4py/myenv/lib64/python3.6/site-packages/Cython/Compiler/Main.py:381:<br>
> > FutureWarning: Cython directive 'language_level' not set, using '3str' for<br>
> > now (Py3). This has changed from earlier releases! File:<br>
> > include/petsc4py/PETSc.pxd<br>
> >   tree = Parsing.p_module(s, pxd, full_module_name)<br>
> > warning: PETSc/PETSc.pyx:53:48: The keyword 'nogil' should appear at the<br>
> > end of the function signature line. Placing it before 'except' or<br>
> > 'noexcept' will be disallowed in a future version of Cython.<br>
> > warning: PETSc/petscvec.pxi:406:79: The keyword 'nogil' should appear at<br>
> > the end of the function signature line. Placing it before 'except' or<br>
> > 'noexcept' will be disallowed in a future version of Cython.<br>
> > warning: PETSc/petscvec.pxi:411:79: The keyword 'nogil' should appear at<br>
> > the end of the function signature line. Placing it before 'except' or<br>
> > 'noexcept' will be disallowed in a future version of Cython.<br>
> > ...<br>
> ><br>
> > Error compiling Cython file:<br>
> > ...<br>
> > PETSc/petscobj.pxi:91:29: Cannot assign type 'int (void *) except? -1<br>
> > nogil' to 'int (*)(void *) noexcept'. Exception values are incompatible.<br>
> > Suggest adding 'noexcept' to the type of 'PetscDelPyDict'.<br>
> > ...<br>
> > PETSc/cyclicgc.pxi:34:20: Cannot assign type 'int (PyObject *, visitproc,<br>
> > void *) except? -1' to 'traverseproc *'. Exception values are incompatible.<br>
> > Suggest adding 'noexcept' to the type of 'tp_traverse'.<br>
> > ...<br>
> > PETSc/cyclicgc.pxi:35:20: Cannot assign type 'int (PyObject *) except? -1'<br>
> > to 'inquiry *'. Exception values are incompatible. Suggest adding<br>
> > 'noexcept' to the type of 'tp_clear'.<br>
> > ...<br>
> > PETSc/PETSc.pyx:351:17: Cannot assign type 'void (void) except * nogil' to<br>
> > 'void (*)(void) noexcept'. Exception values are incompatible. Suggest<br>
> > adding 'noexcept' to the type of 'finalize'.<br>
> > error: Cython failure: 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'<br>
> ><br>
> > Any advice on building petsc4py in environments similar to mine would be<br>
> > greatly appreciated.<br>
> > Thanks,<br>
> > Maitri<br>
> ><br>
> <br>
> <br>
> <br>
<br>
</blockquote></div>
</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Stefano</div>