<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Cannot reproduce this locally.<div class="">$ ./configure --with-cc=gcc --with-cxx=g++ --with-petsc4py=1 --with-fc=gfortran --download-mpich --download-fblaslapack PETSC_DIR=`pwd` </div><div class="">[…]</div><div class="">=====================================<br class="">To use petsc4py, add /tmp/petsc/arch-darwin-c-debug/lib to PYTHONPATH<br class="">=====================================<br class="">=========================================<br class="">Now to check if the libraries are working do:<br class="">make PETSC_DIR=/tmp/petsc PETSC_ARCH=arch-darwin-c-debug check<br class="">=========================================<br class=""></div><div class=""><br class=""><div class="">Probably you have an outdated brew installation, or there is something in your PATH making things harder than they need to be.</div><div class="">Please send your configure.log to <a href="mailto:petsc-maint@mcs.anl.gov" class="">petsc-maint@mcs.anl.gov</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Pierre<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 8 Apr 2022, at 11:42 AM, Veronika Ulanova <<a href="mailto:19veronika97@gmail.com" class="">19veronika97@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">To get this error i run the following commands:<br class=""><br class="">1. 





<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b class="">➜<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 class=""> </b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(56,185,199)"><b class="">petsc </b></span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(86,32,244)"><b class="">git:(</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b class="">release</b></span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(86,32,244)"><b class="">)</b></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b class=""> ✗ </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></div><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;"><span class="gmail-s6" style="font-variant-ligatures:no-common-ligatures">





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