<div dir="ltr"><div dir="ltr">Hi Edoardo,<div><br></div><div>I also have the Intel Parallel Studio XE compilers and MPI installed, and I use it to build PETSc as follows.</div><div><br></div><div><div># Either add these to your .bashrc or run them on the command line before beginning the PETSc installation</div><div>source /opt/intel/parallel_studio_xe_2018/bin/psxevars.sh intel64</div><div>export PETSC_DIR=/opt/petsc/petsc-3.10.2</div><div>export PETSC_ARCH=arch-intel-opt</div><div>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PETSC_DIR/$PETSC_ARCH/lib</div><div><br></div><div># Next I create a configure script file in the PETSc directory, /opt/petsc/petsc-3.10.2/config-3.10.2opt</div><div>echo</div><div>echo Optimized Configure with Intel 2018 compilers, MKL PARDISO-CPARDISO, and Intel MPI</div><div>echo No need to edit .bashrc except for PETSC_DIR and PETSC_ARCH</div><div>echo Run psxevars first</div><div>echo</div><div>./configure PETSC_ARCH=arch-intel-opt --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-clanguage=cxx --with-debugging=0 COPTFLAGS='-ipo -03 -xHost' CXXOPTFLAGS='-ipo -03 -xHost' FOPTFLAGS='-ipo -03 -xHost' --download-scalapack=yes --with-blas-lapack-dir=/opt/intel/mkl --with-mkl_pardiso-dir=/opt/intel/mkl --with-mkl_cpardiso-dir=/opt/intel/mkl</div><div><br></div><div># Then I run this configure script as a regular user. I make and check it as a regular user as well.</div><div>./config-3.10.2opt</div><div>make all</div><div>make check</div><div><br></div><div># My suggestion would be to completely delete your failed build, extract fresh source files from the downloaded tarfile, then try the above.</div><div>Good luck,</div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Matt Overholt</span><br></div><div dir="ltr"><div>CapeSym, Inc.</div><div>(508) 653-7100 x204</div><div><a href="mailto:overholt@capesim.com" target="_blank">overholt@capesim.com<br></a></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 29, 2018 at 8:19 AM Matthew Knepley via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Nov 29, 2018 at 8:17 AM Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com" target="_blank">edoardo.alinovi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Ok, this makes sense, but the reason to use sudo was this one:</div></div></blockquote><div><br></div><div>sudo rm RDict.log</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><div>[Errno 13] Permission denied: 'RDict.log'</div><div> File "./config/configure.py", line 391, in petsc_configure</div><div> framework = config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:], loadArgDB = 0)</div><div> File "/home/edo/software/petsc_intel/config/BuildSystem/config/framework.py", line 80, in __init__</div><div> argDB = RDict.RDict(load = loadArgDB)</div><div> File "/home/edo/software/petsc_intel/config/BuildSystem/RDict.py", line 90, in __init__</div><div> self.setupLogFile()</div><div> File "/home/edo/software/petsc_intel/config/BuildSystem/RDict.py", line 145, in setupLogFile</div><div> self.logFile = file(filename, 'a')</div></div><div><br></div><div><div><div dir="ltr" class="m_-4456115137946420389m_-2568379248870608801gmail_signature"><div dir="ltr"><div><div dir="ltr">------<div><br></div><div>Edoardo Alinovi, Ph.D.</div><div><br></div><div>DICCA, Scuola Politecnica,<br>Universita' degli Studi di Genova,<br>1, via Montallegro,<br>16145 Genova, Italy<br></div><div><br></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno gio 29 nov 2018 alle ore 14:10 Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Nov 29, 2018 at 4:23 AM Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com" target="_blank">edoardo.alinovi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello guys,<div><br></div><div>thank you very much for you suggestions and sorry for getting back you late. Unfortunately, actually my attempts to compile with intel are not successful. </div><div><br></div><div>Here my command:</div></div></div></div></div></div></blockquote><div><br></div><div>Do NOT sudo the configure. This is really dangerous, and as you see 'root' has a different path than you do. Run configure normally</div><div>and make, and only use 'sudo' for 'make install'.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>sudo ./configure --prefix=/home/edo/software/petsc-3.10.2 PETSC_ARCH=arch-intel-opt --with-cc=mpiicc --with-cxx=mpiiccp --with-fc=mpiifort FOPTFLAGS='-O3' COPTFLAGS='-O3' CXXOPTFLAGS='-O3' --with-blas-lapack-dir=/home/edo/intel/mkl/lib/intel64/ --with-debugging=no --download-fblaslapack=1 --download-superlu_dist --download-mumps --download-hypre --download-metis --download-parmetis </div></div><div><br></div><div>The log file states that:</div><div><br></div><div><div>------------------ LOG ------------------ </div></div><div><br></div><div><div>TEST checkCCompiler from config.setCompilers(/home/edo/software/petsc_intel/config/BuildSystem/config/setCompilers.py:587)</div><div>TESTING: checkCCompiler from config.setCompilers(config/BuildSystem/config/setCompilerspy:587)</div><div> Locate a functional C compiler</div><div>Checking for program /usr/sbin/mpiicc...not found</div><div>Checking for program /usr/bin/mpiicc...not found</div><div>Checking for program /sbin/mpiicc...not found</div><div>Checking for program /bin/mpiicc...not found</div><div>Checking for program /home/edo/software/petsc_intel/lib/petsc/bin/win32fe/mpiicc...not found</div><div>*******************************************************************************</div><div> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):</div><div>-------------------------------------------------------------------------------</div><div>C compiler you provided with -with-cc=mpiicc does not work.</div></div><div><br></div><div><div>------------------------------------ <br></div></div><div><br></div><div>It seems that petsc is not able to find mpiicc. However, the path to intel is well defined in my .bashrc and I can easily compile a test file with those compiler. </div><div><br></div><div>if I put the full path in --with-cc= ... then I get:</div><div><br></div><div>------------------ LOG ------------------ <br></div><div><br></div><div><div>TEST checkCCompiler from config.setCompilers(/home/edo/software/petsc_intel/config/BuildSystem/config/setCompilers.py:587)</div><div>TESTING: checkCCompiler from config.setCompilers(config/BuildSystem/config/setCompilers.py:587)</div><div> Locate a functional C compiler</div><div>Checking for program /home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc...found</div><div> Defined make macro "CC" to "/home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc"</div><div> Pushing language C</div><div> All intermediate test results are stored in /tmp/petsc-ZLGfap</div><div> All intermediate test results are stored in /tmp/petsc-ZLGfap/config.setCompilers</div><div>Executing: /home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc -c -o /tmp/petsc-ZLGfap/config.setCompilers/conftest.o -I/tmp/petsc-ZLGfap/config.setCompilers /tmp/petsc-ZLGfap/config.setCompilers/conftest.c</div><div>Possible ERROR while running compiler: exit code 32512</div><div>stderr:</div><div>/home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc: line 557: icc: command not found</div><div>Source:</div><div>#include "confdefs.h"</div><div>#include "conffix.h"</div><div><br></div><div>int main() {</div><div>;</div><div> return 0;</div><div>}</div><div> Popping language C</div><div> Error testing C compiler: Cannot compile C with /home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc.</div><div> Deleting "CC"</div></div><div><br></div><div>------------------------------------ <br><br></div><div>Do you see any error in my setup? </div><div><br></div><div>Thank you very much! </div><div><br></div><div><div><div dir="ltr" class="m_-4456115137946420389m_-2568379248870608801m_-418183426629302705m_-1395133502145518588gmail_signature"><div dir="ltr"><div><div dir="ltr">------<div><br></div><div>Edoardo Alinovi, Ph.D.</div><div><br></div><div>DICCA, Scuola Politecnica,<br>Universita' degli Studi di Genova,<br>1, via Montallegro,<br>16145 Genova, Italy<br></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mar 27 nov 2018 alle ore 17:16 Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 6:25 AM Edoardo alinovi via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear users,<div><br></div><div>I have installed intel parallel studio on my workstation and thus I would like to take advantage of intel compiler. </div><div><br></div><div>Before messing up my installation, have you got some guidelines to survive at this attempt? I have found here in the mailing list the following instructions:</div><div><br></div><div>--with-cc=icc --with-fc=ifort --with-mpi-include=/path-to-intel --with-mpi-lib=/path-to-intel </div></div></div></div></blockquote><div><br></div><div>Yes, this looks right.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Are they correct?<br></div><div><br></div><div>Also I have an already existing and clean installation of petsc using openmpi. I would like to retain this installtion since it is working very well and switching between the two somehow. Any tips on this? </div></div></div></div></blockquote><div><br></div><div>When you do the Intel configuration, use a different name like --PETSC_ARCH=arch-intelps-opt</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I will never stop to say thank you for your precious support! </div><div><br></div><div>Edoardo</div><div> </div><div><div><div dir="ltr" class="m_-4456115137946420389m_-2568379248870608801m_-418183426629302705m_-1395133502145518588m_3162600564752772889m_-1277170562129731602gmail_signature"><div dir="ltr"><div><div dir="ltr">------<div><br></div><div>Edoardo Alinovi, Ph.D.</div><div><br></div><div>DICCA, Scuola Politecnica,<br>Universita' degli Studi di Genova,<br>1, via Montallegro,<br>16145 Genova, Italy<br></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-4456115137946420389m_-2568379248870608801m_-418183426629302705m_-1395133502145518588m_3162600564752772889gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-4456115137946420389m_-2568379248870608801m_-418183426629302705gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-4456115137946420389gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div></div>