<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">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>