Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Matthew Knepley writes: > If we were in charge of all dependencies, that would be true. However, > packages can dump in things that need to link with. if we could > require that all dependencies be specified through our system, then we > could topologically sort and put out all the link libs. Thi

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Éric Chamberland writes: > Le 18-02-10 à 16:49, Jed Brown a écrit : >> Éric Chamberland writes: >> >>> oh my, looks like "-lpetsc -lmpi" works for us!!! >>> >>> (sounds of head banging on desk) >> This should work any time libpetsc is a shared library. You'll need the >> whole grotesque link li

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Le 18-02-10 à 17:44, Jeff Hammond a écrit : Indeed, everybody should compiler MPI codes with "-DMPICH_SKIP_MPICXX=1 -DOMPI_SKIP_MPICXX=1" now. I'll ask MPICH and Open-MPI to switch the default to exclude C++ bindings. Will definitely switch my default compiling options right now. And I a

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Le 18-02-10 à 16:48, Jed Brown a écrit : That's sad, but is this not avoided by defining OMPI_SKIP_MPICXX before including mpi.h? (There is also MPICH_SKIP_MPICXX if you want.) This is done by default in petscsys.h, but you might not include it in that file or don't include it before mpi.h is

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Le 18-02-10 à 16:49, Jed Brown a écrit : Éric Chamberland writes: oh my, looks like "-lpetsc -lmpi" works for us!!! (sounds of head banging on desk) This should work any time libpetsc is a shared library. You'll need the whole grotesque link line if you need to link statically. Doh!  ok, th

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Matthew Knepley
On Sat, Feb 10, 2018 at 2:34 PM, Jed Brown wrote: > Matthew Knepley writes: > > >> Note that PETSc's own dependency management is messy because someone in > >> the early days of BuildSystem thought that concatenating strings was > >> sufficient, instead of maintaining a structured dependency gra

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jeff Hammond
On Sat, Feb 10, 2018 at 1:48 PM, Jed Brown wrote: > Éric Chamberland writes: > > > ok, let put our in-house code away, simply try this simple example: > > > > -- > > > > #include > > > > int main() { > > /*empty!! let's see the .o */ > > > > return 1; > > > > } > > - > > > > the

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Éric Chamberland writes: > oh my, looks like "-lpetsc -lmpi" works for us!!! > > (sounds of head banging on desk) This should work any time libpetsc is a shared library. You'll need the whole grotesque link line if you need to link statically.

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Éric Chamberland writes: > ok, let put our in-house code away, simply try this simple example: > > -- > > #include > > int main() { > /*empty!! let's see the .o */ > > return 1; > > } > - > > then: > > g++ -c test.cc -I/opt/openmpi-1.10.2/include -o test.o > > nm -C test.o | grep

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
oh my, looks like "-lpetsc -lmpi" works for us!!! (sounds of head banging on desk) ;) thanks!!! Eric Le 18-02-10 à 15:29, Éric Chamberland a écrit : oh my god, if -lpetsc -lmpi works for me you make my day!!! :) really! I will try it for sure!!! I tried to maintain a very long linking l

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
oh my god, if -lpetsc -lmpi works for me you make my day!!! :) really! I will try it for sure!!! I tried to maintain a very long linking line since sooo many years, if I can get ride of it, I will be happy! Thanks, Eric Le 18-02-10 à 13:44, Jed Brown a écrit : Éric Chamberland writes:

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
Eric, Ok thanks for the update, and for not requiring us to undo recent "improvements" to our handling of compiler libraries. Barry > On Feb 10, 2018, at 2:25 PM, Éric Chamberland > wrote: > > ok, let put our in-house code away, simply try this simple example: > > -- > >

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
ok, let put our in-house code away, simply try this simple example: -- #include int main() { /*empty!! let's see the .o */ return 1; } - then: g++ -c test.cc -I/opt/openmpi-1.10.2/include -o test.o nm -C test.o | grep "MPI::" | grep " U " U MPI::Win::Free

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jeff Hammond
On Sat, Feb 10, 2018 at 9:29 AM Éric Chamberland < eric.chamberl...@giref.ulaval.ca> wrote: > Hi Matthew, > > Yes, I heard that the MPI C++ API has been deprecated. > It was *deprecated* in 2.2 and *deleted* in 3.0. Implementations may not delete the code but there is absolutely no expectation th

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
"Smith, Barry F." writes: >Then the testing is more involved, need to first check if C++ bindings > exist and then check if supplied automatically by compilers (like on Cray). > Annoying, I'd prefer to avoid but I still don't have the definitive word if > C++ bindings are the issue from Er

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Matthew Knepley writes: >> Note that PETSc's own dependency management is messy because someone in >> the early days of BuildSystem thought that concatenating strings was >> sufficient, instead of maintaining a structured dependency graph to be >> topologically sorted at the final stage (pkg-conf

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
> On Feb 10, 2018, at 1:18 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >> Do all MPI's still provide the C++ bindings and will they >> forever so I can just directly put in an MPI C++ function call >> in the test? > > I would not count on that. Then the testing is

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
"Smith, Barry F." writes: > Do all MPI's still provide the C++ bindings and will they > forever so I can just directly put in an MPI C++ function call > in the test? I would not count on that.

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Matthew Knepley
On Sat, Feb 10, 2018 at 1:44 PM, Jed Brown wrote: > Éric Chamberland writes: > > > Le 18-02-10 à 12:38, Jed Brown a écrit : > >> Éric Chamberland writes: > >> > >>> > >>> and into this block there was the "-lmpi_cxx" that we need... > >> The point is that if you are linking C++ code that calls

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
> On Feb 10, 2018, at 12:23 PM, Éric Chamberland > wrote: > > > Ok, but have you tested with openmpi 1.10.x? > > Maybe this is the offending library, since we do not use the MPI C++ API...??? Now I don't understand. Do you use the MPI C++ bindings or not? If you do not use the bindings

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Éric Chamberland writes: >> WOW. You are lucky this worked for you. I don't think missing C++ >> compilers/linkers is ever safe? > Honestly, I think yes it is safe under some constraints (not too > different compilers). C++ compilers on a given platform usually specify binary compatibility

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Éric Chamberland writes: > Le 18-02-10 à 12:38, Jed Brown a écrit : >> Éric Chamberland writes: >> >>> >>> and into this block there was the "-lmpi_cxx" that we need... >> The point is that if you are linking C++ code that calls the MPI C++ >> interface, then *you* should link with mpicxx or equ

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Le 18-02-10 à 12:58, Smith, Barry F. a écrit : On Feb 10, 2018, at 11:51 AM, Éric Chamberland wrote: Ok guys! You found it (again...). We are no using mpic++ to link!!! We are not always using the same compiler that we used to compile petsc+mpi, so we do not use mpic++ to compile (exce

Re: [petsc-dev] MPI_Attr_get test fails

2018-02-10 Thread Mark Adams
On Sat, Feb 10, 2018 at 12:54 PM, Jed Brown wrote: > Mark Adams writes: > > > On Fri, Feb 9, 2018 at 9:39 PM, Jeff Hammond > wrote: > > > >> https://msdn.microsoft.com/en-us/library/dn473234(v=vs.85).aspx > >> > >> This function name is archaic and removed in MPI-3. Use the new name. > >> > >>

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Le 18-02-10 à 12:38, Jed Brown a écrit : Éric Chamberland writes: and into this block there was the "-lmpi_cxx" that we need... The point is that if you are linking C++ code that calls the MPI C++ interface, then *you* should link with mpicxx or equivalent. The funny thing, is that we are

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
Eric, How difficult would it be for you guys to switch to doing things "correctly" and not mixing up C++ compilers/linkers? Barry > On Feb 10, 2018, at 11:51 AM, Éric Chamberland > wrote: > > Ok guys! > > You found it (again...). We are no using mpic++ to link!!! > > We are not

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
> On Feb 10, 2018, at 11:51 AM, Éric Chamberland > wrote: > > Ok guys! > > You found it (again...). We are no using mpic++ to link!!! > > We are not always using the same compiler that we used to compile petsc+mpi, > so we do not use mpic++ to compile (excepted for intelmpi). > > For exam

Re: [petsc-dev] MPI_Attr_get test fails

2018-02-10 Thread Jed Brown
Mark Adams writes: > On Fri, Feb 9, 2018 at 9:39 PM, Jeff Hammond wrote: > >> https://msdn.microsoft.com/en-us/library/dn473234(v=vs.85).aspx >> >> This function name is archaic and removed in MPI-3. Use the new name. >> >> > OK, Jed did this a few months ago. > > It still fails because my code

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
ok, here are the logs from this night and yesterday: this night: - http://www.giref.ulaval.ca/~cmpgiref/petsc-master-debug/2018.02.10.02h00m01s_configure.log http://www.giref.ulaval.ca/~cmpgiref/petsc-master-debug/2018.02.10.02h00m01s_make.log a day before: http://www.gi

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
Eric, Please send configure.log > On Feb 10, 2018, at 11:44 AM, Jed Brown wrote: > > "Smith, Barry F." writes: > >> Eric, >> >> We need the entire link line. >> >> What linker are you using C, or C++? This is important. >> >> Do you have dependencies on MPI C++ symbols? In

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Ok guys! You found it (again...).  We are no using mpic++ to link!!! We are not always using the same compiler that we used to compile petsc+mpi, so we do not use mpic++ to compile (excepted for intelmpi). For example, I compile MPI+Petsc with g++, but I am working with clang++ and may switc

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
"Smith, Barry F." writes: > Eric, > >We need the entire link line. > >What linker are you using C, or C++? This is important. > >Do you have dependencies on MPI C++ symbols? In other words, are you using > C++ MPI bindings? > > I cannot explain why all the libraries you listed

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
Eric Is your main program C, C++ or Fortran? > On Feb 10, 2018, at 11:37 AM, Smith, Barry F. wrote: > > > Eric, > > We need the entire link line. > > What linker are you using C, or C++? This is important. > > Do you have dependencies on MPI C++ symbols? In other words, are y

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Jed Brown
Éric Chamberland writes: > Hi Matthew, > > Yes, I heard that the MPI C++ API has been deprecated. > > Yes, the mpi_cxx is now missing.  Our link line is formed mainly with > PETSC_WITH_EXTERNAL_LIB variable that is now: > > PETSC_WITH_EXTERNAL_LIB = -L/opt/petsc-master_debug/lib > -Wl,-rpath,/o

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Matthew Knepley
On Sat, Feb 10, 2018 at 12:29 PM, Éric Chamberland < eric.chamberl...@giref.ulaval.ca> wrote: > Hi Matthew, > > Yes, I heard that the MPI C++ API has been deprecated. > > Yes, the mpi_cxx is now missing. Our link line is formed mainly with > PETSC_WITH_EXTERNAL_LIB variable that is now: > > PETSC

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Smith, Barry F.
Eric, We need the entire link line. What linker are you using C, or C++? This is important. Do you have dependencies on MPI C++ symbols? In other words, are you using C++ MPI bindings? I cannot explain why all the libraries you listed would disappear from PETSC_WITH_EXTERNAL_

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Hi Matthew, Yes, I heard that the MPI C++ API has been deprecated. Yes, the mpi_cxx is now missing.  Our link line is formed mainly with PETSC_WITH_EXTERNAL_LIB variable that is now: PETSC_WITH_EXTERNAL_LIB = -L/opt/petsc-master_debug/lib -Wl,-rpath,/opt/petsc-master_debug/lib -L/opt/petsc-m

Re: [petsc-dev] MPI_Attr_get test fails

2018-02-10 Thread Mark Adams
On Fri, Feb 9, 2018 at 9:39 PM, Jeff Hammond wrote: > https://msdn.microsoft.com/en-us/library/dn473234(v=vs.85).aspx > > This function name is archaic and removed in MPI-3. Use the new name. > > OK, Jed did this a few months ago. It still fails because my code uses PETSC_COMM_WORLD. I guess I n

Re: [petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Matthew Knepley
On Sat, Feb 10, 2018 at 9:42 AM, Éric Chamberland < eric.chamberl...@giref.ulaval.ca> wrote: > Hi, > > we used to link our c++ code with PETSc using PETSC_WITH_EXTERNAL_LIB > variable defined in $PETSC_DIR/lib/petsc/conf/petscvariables and > everything was fine until this night. > > It seems some

[petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

2018-02-10 Thread Éric Chamberland
Hi, we used to link our c++ code with PETSc using PETSC_WITH_EXTERNAL_LIB variable defined in $PETSC_DIR/lib/petsc/conf/petscvariables and everything was fine until this night. It seems some libs have vanished from this variable, see the diff here: -lptscotcherr -lesmumps -lscotch -lscot