<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hello all,</p>
<p><br>
</p>
<p>I was hoping to get some advice on installing petsc4py. Hopefully this is an appropriate question as it's my first time emailing the list.</p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">I failed numerous times installing petsc4py on my personal laptop, so I decided to use a virtual machine with Ubuntu to try installing from a clean slate.</span></p>
<p><br>
</p>
<p>I followed the steps listed on this webpage: <a href="https://gist.github.com/mrosemeier/088115b2e34f319b913a" class="OWAAutoLink" id="LPlnk205403" previewremoved="true">https://gist.github.com/mrosemeier/088115b2e34f319b913a</a><br>
</p>
<ol style="margin-bottom: 0px; margin-top: 0px;">
<li>Install openmpi</li><li>Install anaconda-python</li><li>Install petsc</li><li>Install petsc4py</li></ol>
<p></p>
<div></div>
<div><br>
</div>
<div>After doing all this, I entered the petsc4py/demo folder and used <i>make</i> to see if all the tests passed. But several of the tests promptly failed. Below are some of the errors I received, but I also attached the full error output. Maybe I have forgotten
to assign some environment variable? </div>
<div><br>
</div>
<div>
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
Thank you,</div>
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
Nicholas Stegmeier</div>
<div style="font-weight: bold; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
<br>
</div>
</div>
<div><b>inside .bashrc:</b></div>
<div><b></b>
<div style="">export LD_LIBRARY_PATH=/home/nick/local/openmpi-1.10.5/lib:$LD_LIBRARY_PATH<br>
export PATH=/home/nick/local/openmpi-1.10.5/bin:$PATH<br>
export PATH="/home/nick/local/anaconda2/bin:$PATH"<br>
export PETSC_DIR=/home/nick/local/petsc.git<br>
export PETSC_ARCH=arch-python-linux-i686<br>
<br>
</div>
<b></b></div>
<div>
<div><b>nick@nick-VirtualBox:~/local/petsc.git/bin$ echo $PATH</b></div>
<div>/home/nick/local/anaconda2/bin:/home/nick/local/openmpi-1.10.5/bin:/home/nick/local/anaconda2/bin:/home/nick/local/openmpi-1.10.5/bin:/home/nick/bin:/home/nick/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin</div>
<div><b><br>
</b></div>
</div>
<div><b></b>
<div><b>nick@nick-VirtualBox:~/local/petsc.git/bin$ echo $PATH</b></div>
<div>/home/nick/local/anaconda2/bin:/home/nick/local/openmpi-1.10.5/bin:/home/nick/local/anaconda2/bin:/home/nick/local/openmpi-1.10.5/bin:/home/nick/bin:/home/nick/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin</div>
<div><br>
</div>
</div>
<div><b>sample error output:</b></div>
<div><br>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>
<div>make -f makefile.petsc \</div>
</div>
<div>
<div> PETSC_DIR=/home/nick/local/petsc.git PETSC_ARCH=arch-python-linux-i686</div>
</div>
<div>
<div>make[2]: Entering directory '/home/nick/local/petsc4py.git/demo/perftest'</div>
</div>
<div>
<div>c App.f90</div>
</div>
<div>
<div>make[2]: c: Command not found</div>
</div>
<div>
<div>makefile.petsc:15: recipe for target 'driver.exe' failed</div>
</div>
<div>
<div>make[2]: [driver.exe] Error 127 (ignored)</div>
</div>
<div>
<div>/home/nick/local/openmpi-1.10.5/bin/mpicc -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g -O -I/home/nick/local/petsc.git/include -I/home/nick/local/petsc.git/arch-python-linux-i686/include
`pwd`/driver.c</div>
</div>
<div>
<div>/home/nick/local/openmpi-1.10.5/bin/mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g -O -o driver.exe -Wl,-rpath,/home/nick/local/petsc.git/arch-python-linux-i686/lib -L/home/nick/local/petsc.git/arch-python-linux-i686/lib
-lpetsc -llapack -lblas -lm -ldl driver.o App.o</div>
</div>
<div>
<div>gcc: error: App.o: No such file or directory</div>
</div>
<div>
<div>makefile.petsc:15: recipe for target 'driver.exe' failed</div>
</div>
<div>
<div>make[2]: [driver.exe] Error 1 (ignored)</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>...</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div>./Bratu2D.F90:20:0:</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div> #include "petsc/finclude/petscdef.h"</div>
</div>
<div>
<div> ^</div>
</div>
<div>
<div>Fatal Error: petsc/finclude/petscdef.h: No such file or directory</div>
</div>
<div>
<div>compilation terminated.</div>
</div>
<div>
<div>./Bratu2D.F90:20:0:</div>
</div>
<div>
<div><br>
</div>
</div>
<div>
<div> #include "petsc/finclude/petscdef.h"</div>
</div>
<div>
<div> ^</div>
</div>
<div>
<div>Fatal Error: petsc/finclude/petscdef.h: No such file or directory</div>
</div>
<div>
<div>compilation terminated.</div>
</div>
<div>
<div>error: Command "/usr/bin/gfortran -Wall -g -fno-second-underscore -DF2PY_REPORT_ON_ARRAY_COPY=1 -I/home/nick/local/petsc.git/arch-python-linux-i686/include -I/home/nick/local/petsc.git/include -I/home/nick/local/anaconda2/lib/python2.7/site-packages/petsc4py/include
-I. -Ibuild/src.linux-i686-2.7/. -I/home/nick/local/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/home/nick/local/anaconda2/include/python2.7 -c -c ./Bratu2D.F90 -o build/temp.linux-i686-2.7/Bratu2D.o -Jbuild/temp.linux-i686-2.7/ -Ibuild/temp.linux-i686-2.7/"
failed with exit status 1</div>
</div>
<div>
<div>makefile:20: recipe for target 'Bratu2D.so' failed</div>
</div>
<div>
<div>make[1]: *** [Bratu2D.so] Error 1</div>
</div>
<div>
<div>make[1]: Leaving directory '/home/nick/local/petsc4py.git/demo/wrap-f2py'</div>
</div>
<div>
<div>makefile:3: recipe for target 'all' failed</div>
</div>
<div>
<div>make: [all] Error 2 (ignored)</div>
</div>
</blockquote>
<div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div><br>
</div>
</div>
<div>Thank you,</div>
<div>Nicholas Stegmeier</div>
</div>
</body>
</html>