[petsc-users] Compile petsc using intel mpi

Matthew Overholt overholt at capesim.com
Thu Nov 29 09:18:31 CST 2018


Hi Edoardo,

I also have the Intel Parallel Studio XE compilers and MPI installed, and I
use it to build PETSc as follows.

# Either add these to your .bashrc or run them on the command line before
beginning the PETSc installation
source /opt/intel/parallel_studio_xe_2018/bin/psxevars.sh intel64
export PETSC_DIR=/opt/petsc/petsc-3.10.2
export PETSC_ARCH=arch-intel-opt
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PETSC_DIR/$PETSC_ARCH/lib

# Next I create a configure script file in the PETSc directory,
/opt/petsc/petsc-3.10.2/config-3.10.2opt
echo
echo Optimized Configure with Intel 2018 compilers, MKL PARDISO-CPARDISO,
and Intel MPI
echo No need to edit .bashrc except for PETSC_DIR and PETSC_ARCH
echo Run psxevars first
echo
./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

# Then I run this configure script as a regular user. I make and check it
as a regular user as well.
./config-3.10.2opt
make all
make check

# My suggestion would be to completely delete your failed build, extract
fresh source files from the downloaded tarfile, then try the above.
Good luck,
Matt Overholt
CapeSym, Inc.
(508) 653-7100 x204
overholt at capesim.com


On Thu, Nov 29, 2018 at 8:19 AM Matthew Knepley via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> On Thu, Nov 29, 2018 at 8:17 AM Edoardo alinovi <edoardo.alinovi at gmail.com>
> wrote:
>
>> Ok, this makes sense, but the reason to use sudo was this one:
>>
>
> sudo rm RDict.log
>
>   Matt
>
>
>> [Errno 13] Permission denied: 'RDict.log'
>>   File "./config/configure.py", line 391, in petsc_configure
>>     framework =
>> config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
>> loadArgDB = 0)
>>   File
>> "/home/edo/software/petsc_intel/config/BuildSystem/config/framework.py",
>> line 80, in __init__
>>     argDB = RDict.RDict(load = loadArgDB)
>>   File "/home/edo/software/petsc_intel/config/BuildSystem/RDict.py", line
>> 90, in __init__
>>     self.setupLogFile()
>>   File "/home/edo/software/petsc_intel/config/BuildSystem/RDict.py", line
>> 145, in setupLogFile
>>     self.logFile = file(filename, 'a')
>>
>> ------
>>
>> Edoardo Alinovi, Ph.D.
>>
>> DICCA, Scuola Politecnica,
>> Universita' degli Studi di Genova,
>> 1, via Montallegro,
>> 16145 Genova, Italy
>>
>>
>> Il giorno gio 29 nov 2018 alle ore 14:10 Matthew Knepley <
>> knepley at gmail.com> ha scritto:
>>
>>> On Thu, Nov 29, 2018 at 4:23 AM Edoardo alinovi <
>>> edoardo.alinovi at gmail.com> wrote:
>>>
>>>> Hello guys,
>>>>
>>>> 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.
>>>>
>>>> Here my command:
>>>>
>>>
>>> Do NOT sudo the configure. This is really dangerous, and as you see
>>> 'root' has a different path than you do. Run configure normally
>>> and make, and only use 'sudo' for 'make install'.
>>>
>>>   Thanks,
>>>
>>>      Matt
>>>
>>>
>>>> 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
>>>>
>>>> The log file states that:
>>>>
>>>> ------------------ LOG ------------------
>>>>
>>>> TEST checkCCompiler from
>>>> config.setCompilers(/home/edo/software/petsc_intel/config/BuildSystem/config/setCompilers.py:587)
>>>> TESTING: checkCCompiler from
>>>> config.setCompilers(config/BuildSystem/config/setCompilerspy:587)
>>>>   Locate a functional C compiler
>>>> Checking for program /usr/sbin/mpiicc...not found
>>>> Checking for program /usr/bin/mpiicc...not found
>>>> Checking for program /sbin/mpiicc...not found
>>>> Checking for program /bin/mpiicc...not found
>>>> Checking for program
>>>> /home/edo/software/petsc_intel/lib/petsc/bin/win32fe/mpiicc...not found
>>>>
>>>> *******************************************************************************
>>>>          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log
>>>> for details):
>>>>
>>>> -------------------------------------------------------------------------------
>>>> C compiler you provided with -with-cc=mpiicc does not work.
>>>>
>>>> ------------------------------------
>>>>
>>>> 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.
>>>>
>>>> if I put the full path in --with-cc= ...  then I get:
>>>>
>>>> ------------------ LOG ------------------
>>>>
>>>> TEST checkCCompiler from
>>>> config.setCompilers(/home/edo/software/petsc_intel/config/BuildSystem/config/setCompilers.py:587)
>>>> TESTING: checkCCompiler from
>>>> config.setCompilers(config/BuildSystem/config/setCompilers.py:587)
>>>>   Locate a functional C compiler
>>>> Checking for program
>>>> /home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc...found
>>>>                 Defined make macro "CC" to
>>>> "/home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc"
>>>>                 Pushing language C
>>>>                             All intermediate test results are stored in
>>>> /tmp/petsc-ZLGfap
>>>>                           All intermediate test results are stored in
>>>> /tmp/petsc-ZLGfap/config.setCompilers
>>>> 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
>>>> Possible ERROR while running compiler: exit code 32512
>>>> stderr:
>>>> /home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc:
>>>> line 557: icc: command not found
>>>> Source:
>>>> #include "confdefs.h"
>>>> #include "conffix.h"
>>>>
>>>> int main() {
>>>> ;
>>>>   return 0;
>>>> }
>>>>                 Popping language C
>>>>             Error testing C compiler: Cannot compile C with
>>>> /home/edo/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc.
>>>>               Deleting "CC"
>>>>
>>>> ------------------------------------
>>>>
>>>> Do you see any error in my setup?
>>>>
>>>> Thank you very much!
>>>>
>>>> ------
>>>>
>>>> Edoardo Alinovi, Ph.D.
>>>>
>>>> DICCA, Scuola Politecnica,
>>>> Universita' degli Studi di Genova,
>>>> 1, via Montallegro,
>>>> 16145 Genova, Italy
>>>>
>>>>
>>>> Il giorno mar 27 nov 2018 alle ore 17:16 Matthew Knepley <
>>>> knepley at gmail.com> ha scritto:
>>>>
>>>>> On Tue, Nov 27, 2018 at 6:25 AM Edoardo alinovi via petsc-users <
>>>>> petsc-users at mcs.anl.gov> wrote:
>>>>>
>>>>>> Dear users,
>>>>>>
>>>>>> I have installed intel parallel studio on my workstation and  thus I
>>>>>> would like to take advantage of intel compiler.
>>>>>>
>>>>>> 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:
>>>>>>
>>>>>> --with-cc=icc --with-fc=ifort --with-mpi-include=/path-to-intel
>>>>>> --with-mpi-lib=/path-to-intel
>>>>>>
>>>>>
>>>>> Yes, this looks right.
>>>>>
>>>>>
>>>>>> Are they correct?
>>>>>>
>>>>>> 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?
>>>>>>
>>>>>
>>>>> When you do the Intel configuration, use a different name like
>>>>> --PETSC_ARCH=arch-intelps-opt
>>>>>
>>>>>   Thanks,
>>>>>
>>>>>     Matt
>>>>>
>>>>>
>>>>>> I will never stop to say thank you for your precious support!
>>>>>>
>>>>>> Edoardo
>>>>>>
>>>>>> ------
>>>>>>
>>>>>> Edoardo Alinovi, Ph.D.
>>>>>>
>>>>>> DICCA, Scuola Politecnica,
>>>>>> Universita' degli Studi di Genova,
>>>>>> 1, via Montallegro,
>>>>>> 16145 Genova, Italy
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> What most experimenters take for granted before they begin their
>>>>> experiments is infinitely more interesting than any results to which their
>>>>> experiments lead.
>>>>> -- Norbert Wiener
>>>>>
>>>>> https://www.cse.buffalo.edu/~knepley/
>>>>> <http://www.cse.buffalo.edu/~knepley/>
>>>>>
>>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their
>>> experiments is infinitely more interesting than any results to which their
>>> experiments lead.
>>> -- Norbert Wiener
>>>
>>> https://www.cse.buffalo.edu/~knepley/
>>> <http://www.cse.buffalo.edu/~knepley/>
>>>
>>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181129/f3dd7d7d/attachment.html>


More information about the petsc-users mailing list