Re: [petsc-users] Compile petsc using intel mpi

2018-11-29 Thread Matthew Overholt via petsc-users
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
overh...@capesim.com


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

> On Thu, Nov 29, 2018 at 8:17 AM Edoardo alinovi 
> 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 <
>> knep...@gmail.com> ha scritto:
>>
>>> On Thu, Nov 29, 2018 at 4:23 AM Edoardo alinovi <
>>> edoardo.alin...@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 

Re: [petsc-users] Compile petsc using intel mpi

2018-11-27 Thread Balay, Satish via petsc-users
If you already have MPI from intel - use the MPI compiler wrappers instead of 
icc etc.

./configure --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort 
PETSC_ARCH=arch-intel-mpi

Satish


On Tue, 27 Nov 2018, Zhang, Junchao via petsc-users wrote:

> 
> 
> On Tue, Nov 27, 2018 at 5:25 AM Edoardo alinovi via petsc-users 
> mailto:petsc-users@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
> 
> Are they correct?
> I think so. But you may also add PETSC_DIR=/path-to-petsc 
> PETSC_ARCH=name-for-this-build
> 
> 
> 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?
> Use PETSC_ARCH in PETSc configure to differentiate different builds, and 
> export PETSC_ARCH in your environment to select the one you want to use. See 
> more at https://www.mcs.anl.gov/petsc/documentation/installation.html
> 
> 
> 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
> 
> 
> 



Re: [petsc-users] Compile petsc using intel mpi

2018-11-27 Thread Zhang, Junchao via petsc-users


On Tue, Nov 27, 2018 at 5:25 AM Edoardo alinovi via petsc-users 
mailto:petsc-users@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

Are they correct?
I think so. But you may also add PETSC_DIR=/path-to-petsc 
PETSC_ARCH=name-for-this-build


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?
Use PETSC_ARCH in PETSc configure to differentiate different builds, and export 
PETSC_ARCH in your environment to select the one you want to use. See more at 
https://www.mcs.anl.gov/petsc/documentation/installation.html


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