Re: [petsc-dev] broken options handling with intel 16.0 compilers on mac OS

2015-09-22 Thread Jed Brown
Satish Balay  writes:
> [Jed suggested we should 'always use FC as linker' and not do any such
> detection.  But then we still have to worry about C++. Previously we
> had machines where we had to use C++ linker - but perhaps such
> machines don't exist anymore]

We might only need to distinguish -lstdc++ and -lc++.  It's certainly
simpler and more consistent than finding Fortran run-time libraries.


signature.asc
Description: PGP signature


Re: [petsc-dev] broken options handling with intel 16.0 compilers on mac OS

2015-09-22 Thread Jed Brown
Satish Balay  writes:
> And then the MPI c++ libraries..

The current MPI standard does not contain C++ bindings.


signature.asc
Description: PGP signature


Re: [petsc-dev] broken options handling with intel 16.0 compilers on mac OS

2015-09-22 Thread Richard Mills
Blaise and Satish,

I'm a bit slow to pick up on this thread as I was busy traveling, but since
I use a Mac and work for Intel, I thought I should see if I could reproduce
the problems that Blaise is seeing.  I installed the 16.0 compilers and
built a simple configuration ('--with-debugging=1 COPTFLAGS="-g -O0"
FOPTFLAGS="-g -O0" CXXOPTFLAGS="-g -O0"
--with-blas-lapack-dir=/opt/intel/compilers_and_libraries_2016/mac/mkl
--with-mpi-dir=/Users/rtmills/packages/mpich-3.1.4-intel') using a very
recent revision of 'master' (09b4d96fa5749f82a0af9a914729f77a4ef2b2fd, Sun
Sep 20 22:51:31 2015 -0500).  When I try running SNES ex5f and passing
various command-line options, everything appears to work fine.  Any
suggestions for digging deeping into this to try to determine the
difference between what Blaise and I are seeing?

Best regards,
Richard

On Mon, Sep 21, 2015 at 10:21 AM, Blaise A Bourdin  wrote:

>
> > On Sep 20, 2015, at 9:04 AM, Satish Balay  wrote:
> >
> > Hm - I would suggest doing a minimal build build with:
> >
> > --with-cxx=0
> > --with-clib-autodetect=0 --with-fortranlib-autodetect=0
> LIBS="/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib/libifcore.a"
> >
> > And see if that makes a difference.
> Satish,
>
> It does help.
> Turning off auto detect leads to a functional build, turning it back on
> leads to a non-functioning one.
>
> The configure.log without auto detect is here:
>
> https://filestogeaux.lsu.edu/public/download.php?FILE=bourdin/61967j4XaVp
> The one with auto detect there:
>https://filestogeaux.lsu.edu/public/download.php?FILE=bourdin/691pPOSRU
>
> The petscconf.h are attached
>
>


[petsc-dev] including PETSc4py (and Tao4py) inside PETSc repository

2015-09-22 Thread Barry Smith

   Lisandro,

Now that everyone is using git and knows branches well can we move PETSc4py 
inside the PETSc repository as was done a couple of years ago with BuildSystem. 
Now when changes/additions are made to PETSc there is a slow inefficient, often 
forgotten manual process of bringing them over to petsc4py. If we put them all 
in one repository the updates happen quickly and far more efficiently, as would 
testing. We'll also get the ability to do bi-section.

   I realize you want a PETSc4py release to be compatible with previous 
versions of PETSc; this property could still remain and we could easily have a 
tool that "pulls out" the petsc4py release material from the petsc repository.

   I think once we make this change we'll wonder why we didn't do it log ago; 
just as when we changed BuildSystem.  Thoughts?

   Thanks

Barry



Re: [petsc-dev] broken options handling with intel 16.0 compilers on mac OS

2015-09-22 Thread Satish Balay
I'm not sure what to suggest.

Blaise gets a successful build with:

--with-cxx=0 --with-clib-autodetect=0 --with-fortranlib-autodetect=0 
LIBS="/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib/libifcore.a"

The next thing Blaise could try is:

--with-cxx=0 --with-clib-autodetect=0 --with-fortranlib-autodetect=0 
LIBS=-lifcore

[and if this fails - see which ifcore the binary is using - via 'otool -l 
petscbinary |grep ifore']

If not - what I would do - is try compiling an example with a petsc makefile.
[with the broken build]

And then copy/paste the link line - removing stuff - until the binary
created by that link line works. [and identify the linker option is
making the difference]. Again - this would be for Blaise to try.


Intel compilers (esp on Mac) had workarrounds to system issues encoded
in the link command. [I remember the first generation of intel
compilers on Mac had such issues]. And the way PETSc configure, and
checkFortranLibraries() process/use this 'ifort -v' info can break
these encoded workarrounds.. [Its a hacky piece of code - and not easy
to get right]

Ideally compilers should provide equivalent of 'mpicc -show' - so that
configure tools can grab and use this info for language interoperable
linking.

[Jed suggested we should 'always use FC as linker' and not do any such
detection.  But then we still have to worry about C++. Previously we
had machines where we had to use C++ linker - but perhaps such
machines don't exist anymore]

Satish


On Tue, 22 Sep 2015, Richard Mills wrote:

> Blaise and Satish,
> 
> I'm a bit slow to pick up on this thread as I was busy traveling, but since
> I use a Mac and work for Intel, I thought I should see if I could reproduce
> the problems that Blaise is seeing.  I installed the 16.0 compilers and
> built a simple configuration ('--with-debugging=1 COPTFLAGS="-g -O0"
> FOPTFLAGS="-g -O0" CXXOPTFLAGS="-g -O0"
> --with-blas-lapack-dir=/opt/intel/compilers_and_libraries_2016/mac/mkl
> --with-mpi-dir=/Users/rtmills/packages/mpich-3.1.4-intel') using a very
> recent revision of 'master' (09b4d96fa5749f82a0af9a914729f77a4ef2b2fd, Sun
> Sep 20 22:51:31 2015 -0500).  When I try running SNES ex5f and passing
> various command-line options, everything appears to work fine.  Any
> suggestions for digging deeping into this to try to determine the
> difference between what Blaise and I are seeing?
> 
> Best regards,
> Richard
> 
> On Mon, Sep 21, 2015 at 10:21 AM, Blaise A Bourdin  wrote:
> 
> >
> > > On Sep 20, 2015, at 9:04 AM, Satish Balay  wrote:
> > >
> > > Hm - I would suggest doing a minimal build build with:
> > >
> > > --with-cxx=0
> > > --with-clib-autodetect=0 --with-fortranlib-autodetect=0
> > LIBS="/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib/libifcore.a"
> > >
> > > And see if that makes a difference.
> > Satish,
> >
> > It does help.
> > Turning off auto detect leads to a functional build, turning it back on
> > leads to a non-functioning one.
> >
> > The configure.log without auto detect is here:
> >
> > https://filestogeaux.lsu.edu/public/download.php?FILE=bourdin/61967j4XaVp
> > The one with auto detect there:
> >https://filestogeaux.lsu.edu/public/download.php?FILE=bourdin/691pPOSRU
> >
> > The petscconf.h are attached
> >
> >
> 



Re: [petsc-dev] broken options handling with intel 16.0 compilers on mac OS

2015-09-22 Thread Satish Balay
On Tue, 22 Sep 2015, Blaise A Bourdin wrote:

> With the later configuration, it looks like what matters is the order in 
> which  -lmpifort and -lifcore are listed:
> This one works:
> mpif90 -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress 
> -Wl,-commons,use_dylibs -Wl,-search_paths_first   -g -O0  
> -I/opt/HPC/petsc-dev/include/petsc/finclude -o ex5f90 ex5f90.o 
> -Wl,-rpath,/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib 
> -L/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib  -lpetsc 
> -Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib
>  -L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
> -Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
> -lifcore -lmpifort
> 
> This one does not:
> mpif90 -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress 
> -Wl,-commons,use_dylibs -Wl,-search_paths_first   -g -O0  
> -I/opt/HPC/petsc-dev/include/petsc/finclude -o ex5f90 ex5f90.o 
> -Wl,-rpath,/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib 
> -L/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib  -lpetsc 
> -Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib
>  -L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
> -Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
> -lmpifort -lifcore

Does linking with -lifcore vs
/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib/libifcore.a
make a difference?

And what do you have for:

cd /opt/HPC/mpich-3.1.4-intel16.0/lib
ls
nm -Ao libmpiifort.* |grep get_command_argument

BTW: I'm assuming you have sept 20 or newer petsc master branch.

Satish


Re: [petsc-dev] broken options handling with intel 16.0 compilers on mac OS

2015-09-22 Thread Blaise A Bourdin

On Sep 22, 2015, at 3:50 PM, Satish Balay 
> wrote:

I'm not sure what to suggest.

Blaise gets a successful build with:

--with-cxx=0 --with-clib-autodetect=0 --with-fortranlib-autodetect=0 
LIBS="/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib/libifcore.a"

The next thing Blaise could try is:

--with-cxx=0 --with-clib-autodetect=0 --with-fortranlib-autodetect=0 
LIBS=-lifcore

This works.

bourdin@galerkin:tutorials (master)$  otool -l ex5f90 |grep ifor
 name /opt/HPC/mpich-3.1.4-intel16.0/lib/libmpifort.12.dylib (offset 24)

In contrast, with the build command suggested with richard, I get a 
non-functioning build:

bourdin@galerkin:petsc-dev (master)$ ./configure --with-debugging=1 
COPTFLAGS="-g -O0" FOPTFLAGS="-g -O0”
CXXOPTFLAGS="-g -O0" 
--with-blas-lapack-dir=/opt/intel-16.0/compilers_and_libraries_2016/mac/mkl 
--with-mpi-dir=$MPI_HOME

bourdin@galerkin:tutorials (master)$  otool -l ex5f90 |grep ifor
 name /opt/HPC/mpich-3.1.4-intel16.0/lib/libmpifort.12.dylib (offset 24)


[and if this fails - see which ifcore the binary is using - via 'otool -l 
petscbinary |grep ifore']

If not - what I would do - is try compiling an example with a petsc makefile.
[with the broken build]

And then copy/paste the link line - removing stuff - until the binary
created by that link line works. [and identify the linker option is
making the difference]. Again - this would be for Blaise to try.

With the later configuration, it looks like what matters is the order in which  
-lmpifort and -lifcore are listed:
This one works:
mpif90 -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress 
-Wl,-commons,use_dylibs -Wl,-search_paths_first   -g -O0  
-I/opt/HPC/petsc-dev/include/petsc/finclude -o ex5f90 ex5f90.o 
-Wl,-rpath,/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib 
-L/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib  -lpetsc 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
-lifcore -lmpifort

This one does not:
mpif90 -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress 
-Wl,-commons,use_dylibs -Wl,-search_paths_first   -g -O0  
-I/opt/HPC/petsc-dev/include/petsc/finclude -o ex5f90 ex5f90.o 
-Wl,-rpath,/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib 
-L/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib  -lpetsc 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
-lmpifort -lifcore

Same goes with the lengthy link line from the petsc makefile:
mpif90 -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress 
-Wl,-commons,use_dylibs -Wl,-search_paths_first   -g -O0  
-I/opt/HPC/petsc-dev/include/petsc/finclude -o ex5f90 ex5f90.o 
-Wl,-rpath,/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib 
-L/opt/HPC/petsc-dev/Darwin-intel16.0-g/lib  -lpetsc 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016/mac/mkl 
-L/opt/intel-16.0/compilers_and_libraries_2016/mac/mkl -lmkl_intel 
-lmkl_sequential -lmkl_core -lpthread -lm -Wl,-rpath,/opt/X11/lib 
-L/opt/X11/lib -lX11 -lssl -lcrypto 
-Wl,-rpath,/opt/HPC/mpich-3.1.4-intel16.0/lib 
-L/opt/HPC/mpich-3.1.4-intel16.0/lib 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
-L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
-Wl,-rpath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.1.0/lib/darwin
 
-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.1.0/lib/darwin
 -lifcore -lmpifort -lifport  -limf -lsvml -lipgo -lirc -lpthread 
-Wl,-rpath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/lib/darwin
 
-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/lib/darwin
 -lclang_rt.osx -limf -lsvml -lirng -lipgo -ldecimal -lirc -lclang_rt.osx 
-lmpicxx -limf -lsvml -lirng -lipgo -ldecimal -lirc -lclang_rt.osx -ldl 
-Wl,-rpath,/opt/HPC/mpich-3.1.4-intel16.0/lib 
-L/opt/HPC/mpich-3.1.4-intel16.0/lib -lmpi -lpmpi 
-Wl,-rpath,/opt/HPC/mpich-3.1.4-intel16.0/lib 
-L/opt/HPC/mpich-3.1.4-intel16.0/lib 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
-L/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/mkl/lib 
-Wl,-rpath,/opt/intel-16.0/compilers_and_libraries_2016.0.083/mac/compiler/lib