<div dir="ltr">To get this error i run the following commands:<br><br>1. 





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>➜<span class="gmail-Apple-converted-space"> </span></b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(57,192,38)"><b> </b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(56,185,199)"><b>petsc </b></span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(86,32,244)"><b>git:(</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>release</b></span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(86,32,244)"><b>)</b></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b> ✗ </b></span><span class="gmail-s6" style="font-variant-ligatures:no-common-ligatures">./configure --with-cc=gcc --with-cxx=g++ --with-petsc4py=1 --with-fc=gfortran --download-mpich --download-fblaslapack</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s6" style="font-variant-ligatures:no-common-ligatures">





</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>➜<span class="gmail-Apple-converted-space"> </span></b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(57,192,38)"><b> </b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(56,185,199)"><b>petsc </b></span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(86,32,244)"><b>git:(</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>release</b></span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(86,32,244)"><b>)</b></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b> ✗<span class="gmail-Apple-converted-space"> </span></b></span><span class="gmail-s6" style="font-variant-ligatures:no-common-ligatures"> <span class="gmail-Apple-converted-space">  </span>make PETSC_DIR=/Users/veronikaulanova/Documents/documents/Oxford_work/petsc PETSC_ARCH=arch-darwin-c-debug all <span class="gmail-Apple-converted-space">   </span></span></p></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 8, 2022 at 10:41 AM Veronika Ulanova <<a href="mailto:19veronika97@gmail.com">19veronika97@gmail.com</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"><div dir="ltr">I pulled the updated repo but now I get a different error also related to architecture:<br><br>





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">ld: file not found: @rpath/libgcc_s.1.1.dylib for architecture arm64</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">clang: error: linker command failed with exit code 1 (use -v to see invocation)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">error: command '/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/bin/mpicc' failed with exit code 1</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">**************************ERROR*************************************</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Error building petsc4py.</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">********************************************************************</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">make[2]: *** [petsc4pybuild] Error 1</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(202,51,35)"><span style="font-variant-ligatures:no-common-ligatures"><b>**************************ERROR*************************************</b></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(202,51,35)"><span style="font-variant-ligatures:no-common-ligatures"><b><span>  </span>Error during compile, check arch-darwin-c-debug/lib/petsc/conf/make.log</b></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(202,51,35)"><span style="font-variant-ligatures:no-common-ligatures"><b><span>  </span>Send it and arch-darwin-c-debug/lib/petsc/conf/configure.log to <a href="mailto:petsc-maint@mcs.anl.gov" target="_blank">petsc-maint@mcs.anl.gov</a></b></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(202,51,35)"><span style="font-variant-ligatures:no-common-ligatures"><b>********************************************************************</b></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(202,51,35)"><span style="font-variant-ligatures:no-common-ligatures"><b><br></b></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font color="#000000" face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures">Any idea about this one? Thank you</span></font></p></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 8, 2022 at 10:09 AM Veronika Ulanova <<a href="mailto:19veronika97@gmail.com" target="_blank">19veronika97@gmail.com</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"><div dir="ltr">Hello Satish,<br><br>By the repo you mean the main PETSc repository?<br><br>Thank you, Veronika</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 8, 2022 at 9:49 AM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</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">A fix for M1 was recently pushed to the git repo.<br>
<br>
Can you try using it [with either release or main branches] - and see if that works?<br>
<br>
Satish<br>
<br>
<br>
<br>
On Fri, 8 Apr 2022, Veronika Ulanova wrote:<br>
<br>
> Hi,<br>
> <br>
> I have been trying to configure the petsc4py package along with my PETSc<br>
> installation for my research. I have searched for solutions on the internet<br>
> but there was no luck, this is the error I get when I am trying to<br>
> configure PETSC and use it to run examples of code that utilise the<br>
> petsc4py package...<br>
> <br>
> <br>
> <br>
>  File<br>
> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/PETSc.py",<br>
> line 3, in <module><br>
> <br>
>     PETSc = ImportPETSc(ARCH)<br>
> <br>
>   File<br>
> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/__init__.py",<br>
> line 29, in ImportPETSc<br>
> <br>
>     return Import('petsc4py', 'PETSc', path, arch)<br>
> <br>
>   File<br>
> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/__init__.py",<br>
> line 73, in Import<br>
> <br>
>     module = import_module(pkg, name, path, arch)<br>
> <br>
>   File<br>
> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/__init__.py",<br>
> line 58, in import_module<br>
> <br>
>     with f: return imp.load_module(fullname, f, fn, info)<br>
> <br>
>   File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py",<br>
> line 242, in load_module<br>
> <br>
>     return load_dynamic(name, filename, file)<br>
> <br>
>   File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py",<br>
> line 342, in load_dynamic<br>
> <br>
>     return _load(spec)<br>
> <br>
> ImportError:<br>
> dlopen(/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/arch-darwin-c-debug/<br>
> <a href="http://PETSc.cpython-39-darwin.so" rel="noreferrer" target="_blank">PETSc.cpython-39-darwin.so</a> <<a href="http://petsc.cpython-39-darwin.so/" rel="noreferrer" target="_blank">http://petsc.cpython-39-darwin.so/</a>>, 2): no<br>
> suitable image found.  Did find:<br>
> <br>
> /Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/arch-darwin-c-debug/<br>
> <a href="http://PETSc.cpython-39-darwin.so" rel="noreferrer" target="_blank">PETSc.cpython-39-darwin.so</a> <<a href="http://petsc.cpython-39-darwin.so/" rel="noreferrer" target="_blank">http://petsc.cpython-39-darwin.so/</a>>: mach-o,<br>
> but wrong architecture<br>
> <br>
> /Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/arch-darwin-c-debug/<br>
> <a href="http://PETSc.cpython-39-darwin.so" rel="noreferrer" target="_blank">PETSc.cpython-39-darwin.so</a> <<a href="http://petsc.cpython-39-darwin.so/" rel="noreferrer" target="_blank">http://petsc.cpython-39-darwin.so/</a>>: stat()<br>
> failed with errno=25<br>
> <br>
> <br>
> As you can see I am using an M1 mac and therefore that causes the petsc4py<br>
> package to give me an error (highlighted above), but do you have any idea<br>
> of how I can solve it or why it is even there? I know that the new M1 has a<br>
> different architecture to intel macs but I have no idea of where to<br>
> start with fixing this or how to make it work. Any help would be much<br>
> appreciated, thank you in advance.<br>
> <br>
> Kind Regards, Veronika<br>
> <br>
<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>