[OMPI users] Redefining MPI_BOOL depending of sizeof(bool)

2018-03-29 Thread Florian Lindner
Hello,

in a code that I am currently reading I have found that code:


template 
struct MPI_Select_unsigned_integer_datatype;

template <>
struct MPI_Select_unsigned_integer_datatype<1> {
  static MPI_Datatype datatype;
};
MPI_Datatype MPI_Select_unsigned_integer_datatype<1>::datatype = 
MPI_UNSIGNED_CHAR;

template <>
struct MPI_Select_unsigned_integer_datatype<2> {
  static MPI_Datatype datatype;
};
MPI_Datatype MPI_Select_unsigned_integer_datatype<2>::datatype = 
MPI_UNSIGNED_SHORT;

template <>
struct MPI_Select_unsigned_integer_datatype<4> {
  static MPI_Datatype datatype;
};
MPI_Datatype MPI_Select_unsigned_integer_datatype<4>::datatype = MPI_UNSIGNED;

template <>
struct MPI_Select_unsigned_integer_datatype<8> {
  static MPI_Datatype datatype;
};
MPI_Datatype MPI_Select_unsigned_integer_datatype<8>::datatype = 
MPI_UNSIGNED_LONG;

#define MPI_BOOL MPI_Select_unsigned_integer_datatype::datatype


It redefines MPI_BOOL based on the size of bool. I wonder if this is needed and 
why?

I was speculating that the compiler could pack multiple bools in one word, when 
used as a array. But the code above is a
compile time specialization and won't help there.

Best Thanks,
Florian
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] Redefining MPI_BOOL depending of sizeof(bool)

2018-03-29 Thread Florian Lindner


Am 29.03.2018 um 09:58 schrieb Florian Lindner:
> #define MPI_BOOL MPI_Select_unsigned_integer_datatype::datatype
> 
> 
> It redefines MPI_BOOL based on the size of bool. I wonder if this is needed 
> and why?
> 
> I was speculating that the compiler could pack multiple bools in one word, 
> when used as a array. But the code above is a
> compile time specialization and won't help there.

Ok, I just discovered that MPI has no MPI_BOOL type. According to the standard, 
there is a MPI_CXX_BOOL and MPI_C_BOOL
(pp. 26).

Since I use C++ I tend to use MPI_CXX_BOOL, which also seems to be present when 
no CXX bindings are compiled.

Best,
Florian
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] libmpi_cxx

2018-03-29 Thread Jeff Squyres (jsquyres)
You need to configure with --enable-mpi-cxx -- the Open MPI C++ bindings are 
not built by default.

Can I ask what software you are using that requires the MPI C++ bindings?

I ask because the MPI C++ bindings were deprecated in the MPI-2.2 standard in 
2009, and were formally deleted from the MPI 3.0 standard in 2012.  Open MPI 
stopped building the C++ bindings by default in Open MPI v2.0.0 in July of 2016.

The C++ bindings were deprecated and eventually deleted from the MPI standard 
for a few reasons:

1. The MPI Forum (the standards body that maintains the MPI standard document) 
was not able to find many real-world applications that used them.
2. There wasn't a lot of C++ expertise on the MPI Forum -- e.g., there were at 
least a few cases of changes made to the C++ bindings in the late 90s/early 
2000s that were incorrect.
3. The C++ bindings were intended to be a baseline for more complex C++ 
behavior (e.g., class libraries).  This never materialized.  Indeed, there were 
some high-profile C++ applications that simply used the MPI C bindings.

As such, the Forum decided that the C++ bindings were not worth the continued 
effort.

The Open MPI developer community literally just started discussing when we 
should finally actually delete the MPI C++ bindings from Open MPI just the 
other day.  As part of this, we wanted to ask the user community: who is still 
using the MPI C++ bindings? For example, if we removed the MPI C++ bindings in 
Open MPI v4.0, would you be ok still using Open MPI <=v3.x for your C++ 
bindings-enabled application(s)?



> On Mar 28, 2018, at 11:32 PM, Arthur H. Edwards  
> wrote:
> 
> I have built openmpi 3.0 on an ubuntu 16.04 system I have used --with-cuda. 
> There is no libmpi_cxx.so generated, yet the code I'm using requires it.  
> There is a libmpi_cxx.so in the ubuntu installed version. Any insight, or 
> instruction on how to configure so that the build generates this library 
> would be greatly  appreciated.
> 
> Art Edwards
> 
> -- 
>  Arthur H. Edwards
>  edwards...@fastmail.fm
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users


-- 
Jeff Squyres
jsquy...@cisco.com

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] Redefining MPI_BOOL depending of sizeof(bool)

2018-03-29 Thread Jeff Squyres (jsquyres)
> Am 29.03.2018 um 09:58 schrieb Florian Lindner:
>> #define MPI_BOOL MPI_Select_unsigned_integer_datatype::datatype
>> 
>> It redefines MPI_BOOL based on the size of bool. I wonder if this is needed 
>> and why?
>> 
>> I was speculating that the compiler could pack multiple bools in one word, 
>> when used as a array. But the code above is a
>> compile time specialization and won't help there.
> 
> Ok, I just discovered that MPI has no MPI_BOOL type. According to the 
> standard, there is a MPI_CXX_BOOL and MPI_C_BOOL (pp. 26).

I'm not sure why that software is defining MPI_BOOL -- that's bad form.  MPI 
reserves the "namespace" prefix of MPI_ -- middleware and applications should 
not be defining new symbols with an MPI_ prefix (to prevent exactly this kind 
of confusion).

-- 
Jeff Squyres
jsquy...@cisco.com

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] Old version openmpi 1.2 support infiniband?

2018-03-29 Thread Dave Love
Kaiming Ouyang  writes:

> Hi Jeff,
> Thank you for your advice. I will contact the author for some suggestions.
> I also notice I may port this old version library to new openmpi 3.0. I
> will work on this soon. Thank you.

I haven't used them, but at least the profiling part, and possibly
control, should be covered by plugins at .
(Score-P is the replacement for the vampirtrace instrumentation included
with openmpi until recently; I think the vampirtrace plugin interface is
compatible with score-p's.)
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] libmpi_cxx

2018-03-29 Thread Maxime Boissonneault

Hi Durga,
This is only my interpretation, but they were never that appealing, nor 
very C++-like, and people mostly kept using the C interface.


If you want to have a real C++ interface for MPI, have a look at Boost 
MPI (http://www.boost.org/doc/libs/1_64_0/doc/html/mpi.html )
If the C++ MPI bindings had been similar to Boost MPI, they would 
probably have been adopted more widely and may still be alive.



--
-
Maxime Boissonneault
Analyste de calcul - Calcul Québec, Université Laval
Président - Comité de coordination du soutien à la recherche de Calcul Québec
Team lead - Research Support National Team, Compute Canada
Instructeur Software Carpentry
Ph. D. en physique



On 18-03-29 01:08, dpchoudh . wrote:

Hello Gilles and all

Sorry if this is a bit off topic, but I am curious as to why
C++bindings were dropped? Any pointers would be appreciated.

Best regards
Durga

$man why dump woman?
man: too many arguments


On Wed, Mar 28, 2018 at 11:43 PM, Gilles Gouaillardet
 wrote:

Arthur,

Try to
configure --enable-mpi-xxx

Note c++ bindings have been removed from the MPI standard long time ago, so you 
might want to consider modernizing your app.

Cheers,

Gilles

"Arthur H. Edwards"  wrote:

I have built openmpi 3.0 on an ubuntu 16.04 system I have used --with-cuda. 
There is no libmpi_cxx.so generated, yet the code I'm using requires it.  There 
is a libmpi_cxx.so in the ubuntu installed version. Any insight, or instruction 
on how to configure so that the build generates this library would be greatly  
appreciated.

Art Edwards

--
  Arthur H. Edwards
  edwards...@fastmail.fm
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

[OMPI users] Linkage problem

2018-03-29 Thread Quentin Faure
Hello,

I would like to use openmpi with a software called LAMMPS. I know it is 
possible when compiling the software to indicate it to use it with openmpi. 
However when I do that I have a warning message telling me that the linkage 
could not have been done (I specified the path for openmpi library and name 
like it is done in LAMMPS manual). I tried to reinstall openmpi in two 
different ways (following the advices of people that had LAMMPS and openmpi 
works together) but it still does not work. Also I don’t know if this is part 
of my problem or not but, the option —showme does not work (command: mpicc 
—showme). I looked at many forums and could not find anything to solve my 
problem and this is the reason why I am using this email list. The computer I 
am using have Ubuntu  on it. Does anyone have idea how to solve my problem?

Quentin
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] libmpi_cxx

2018-03-29 Thread Jeff Squyres (jsquyres)
On Mar 29, 2018, at 7:14 AM, Maxime Boissonneault 
 wrote:
> 
> If the C++ MPI bindings had been similar to Boost MPI, they would probably 
> have been adopted more widely and may still be alive.

FYI: the initial C++ bindings that were proposed (by me!) to the MPI Forum were 
a full-blown class library called OOMPI (Object Oriented MPI).  After much 
debate, the MPI Fourm decided (rightfully, IMNSHO) that standardizing on a 
class library would basically be a whole new specification -- the C++ behaviors 
were quite different than the C/Fortran behaviors.  Indeed, OOMPI was not so 
much *bindings* as they were *new functionality*.

Ultimately, this is why the "minimal" C++ bindings were adopted: they provided 
very little additional behavior compared to the C or Fortran bindings.  The 
idea was that using the few native-language features that the C++ bindings 
provided would allow 3rd parties to create more interesting / useful / 
C++-natural functionality (such as class libraries).

This obviously didn't happen.  

When each of Boost and other C++ MPI applications opted to use the underlying C 
bindings, these were nails in the coffin for the MPI C++ bindings.  Hence the 
deprecation in 2009 and the removal in 2012.

-- 
Jeff Squyres
jsquy...@cisco.com

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] libmpi_cxx

2018-03-29 Thread Jeff Hammond
Elemental has very nice C++ wrappers to MPI features.  If C++ is your
thing, you may want to take a look (https://github.com/elemental/Elemental/
)

There are a few other good projects you can find on GitHub that wrap MPI in
modern C++ syntax. None are complete AFAIK but I don’t think that matters
to most apps.

There is essentially no advantage to C++ bindings over C ones in C++. The
real benefit would come from integration in the guts, which isn’t possible
since MPI libraries are written in C.

Once the networking TS is approved, we may see more interesting things
happen in this space. The OFI group is trying to make the networking TS
better in the direction of HPC features, too.

Jeff

On Thu, Mar 29, 2018 at 8:28 AM Jeff Squyres (jsquyres) 
wrote:

> On Mar 29, 2018, at 7:14 AM, Maxime Boissonneault <
> maxime.boissonnea...@calculquebec.ca> wrote:
> >
> > If the C++ MPI bindings had been similar to Boost MPI, they would
> probably have been adopted more widely and may still be alive.
>
> FYI: the initial C++ bindings that were proposed (by me!) to the MPI Forum
> were a full-blown class library called OOMPI (Object Oriented MPI).  After
> much debate, the MPI Fourm decided (rightfully, IMNSHO) that standardizing
> on a class library would basically be a whole new specification -- the C++
> behaviors were quite different than the C/Fortran behaviors.  Indeed, OOMPI
> was not so much *bindings* as they were *new functionality*.
>
> Ultimately, this is why the "minimal" C++ bindings were adopted: they
> provided very little additional behavior compared to the C or Fortran
> bindings.  The idea was that using the few native-language features that
> the C++ bindings provided would allow 3rd parties to create more
> interesting / useful / C++-natural functionality (such as class libraries).
>
> This obviously didn't happen.
>
> When each of Boost and other C++ MPI applications opted to use the
> underlying C bindings, these were nails in the coffin for the MPI C++
> bindings.  Hence the deprecation in 2009 and the removal in 2012.
>
> --
> Jeff Squyres
> jsquy...@cisco.com
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
-- 
Jeff Hammond
jeff.scie...@gmail.com
http://jeffhammond.github.io/
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users