[OMPI devel] RFC: use ISO C99 style struct initialization

2011-01-19 Thread Nathan Hjelm

I don't know if this has been discussed before or if this will break Windows 
(or some obscure platform) support but I would like to start using the ISO C99 
style for struct initialization (see section 6.7.8, example 10 in 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf). Using this style 
would make mca code much easier to read. Any thoughts? Would this break 
something?

Example:
struct module_foo {
   char *bar;
   int   baz;
};

struct foo foobar = {
   .bar = "foobar",
   .baz = 1
};

-Nathan
HPC-3, LANL


Re: [OMPI devel] RFC: use ISO C99 style struct initialization

2011-01-19 Thread George Bosilca
I'm with you on that. Let's create a fake module using the ISO C99 naming 
scheme, and leave it to MTT to figure out where is breaks!

  george.

On Jan 19, 2011, at 14:23 , Nathan Hjelm wrote:

> I don't know if this has been discussed before or if this will break Windows 
> (or some obscure platform) support but I would like to start using the ISO 
> C99 style for struct initialization (see section 6.7.8, example 10 in 
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf). Using this style 
> would make mca code much easier to read. Any thoughts? Would this break 
> something?
> 
> Example:
> struct module_foo {
>   char *bar;
>   int   baz;
> };
> 
> struct foo foobar = {
>   .bar = "foobar",
>   .baz = 1
> };
> 
> -Nathan
> HPC-3, LANL
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel




[OMPI devel] Building Open MPI components outside of the source tree

2011-01-19 Thread Jeff Squyres
Over the years, a few parties have wanted to be able to build Open MPI 
components outside of the official source tree (e.g., they are developing their 
own components outside of OMPI's SVN).  We've typically said "use 
--with-devel-headers", but a) never really provided a full example of how to do 
this, and b) never acknowledged that using --with-devel-headers is somewhat of 
a pain.

That ends now.  :-)

I am publishing a bitbucket repo of three example "tcp2" BTL components.  They 
are almost exact copies of the real TCP BTL component, but have had their 
configury updated to enable them to be built outside of the Open MPI source 
tree:

 1. A component for the v1.4 Open MPI tree
 2. A component for the v1.5/v1.6 Open MPI tree
 3. A component for the trunk/v1.7 (as of r24265) Open MPI tree

Each of these example components support the --with-devel-headers method as 
well as a new method: --with-openmpi-source=DIR (i.e., where you specify the 
corresponding Open MPI source directory, and the component builds against 
that).  

There are three different components because the configury between each of them 
are a bit different.  Look at the configure.ac in the version that you care 
about to see examples of how to get the relevant CPPFLAGS / CFLAGS that you 
need to build your component.

Here's the bitbucket repo:

  https://bitbucket.org/jsquyres/build-ompi-components-outside-of-source-tree

There's a top-level README.txt file in the repo that explains a bit more.

Enjoy!

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI devel] RFC: use ISO C99 style struct initialization

2011-01-19 Thread Ralph Castain
I believe the majority of structs used in OMPI are actually declared to be opal 
objects of some flavor, so I'm not sure how much this will actually accomplish. 
Other than that, I have no real objection - either way works fine for me.


On Jan 19, 2011, at 12:29 PM, George Bosilca wrote:

> I'm with you on that. Let's create a fake module using the ISO C99 naming 
> scheme, and leave it to MTT to figure out where is breaks!
> 
>  george.
> 
> On Jan 19, 2011, at 14:23 , Nathan Hjelm wrote:
> 
>> I don't know if this has been discussed before or if this will break Windows 
>> (or some obscure platform) support but I would like to start using the ISO 
>> C99 style for struct initialization (see section 6.7.8, example 10 in 
>> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf). Using this style 
>> would make mca code much easier to read. Any thoughts? Would this break 
>> something?
>> 
>> Example:
>> struct module_foo {
>>  char *bar;
>>  int   baz;
>> };
>> 
>> struct foo foobar = {
>>  .bar = "foobar",
>>  .baz = 1
>> };
>> 
>> -Nathan
>> HPC-3, LANL
>> ___
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> 
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel




Re: [OMPI devel] RFC: use ISO C99 style struct initialization

2011-01-19 Thread Jeff Squyres
+1 on Ralph and George's comments.

Want to make a dummy component somewhere that uses this kind of initialization 
and see what happens?  Put a test for the C99 initialization style in 
configure.m4 to see if it works or not; MTT will then check this for all the 
compilers that we care about.


On Jan 19, 2011, at 3:58 PM, Ralph Castain wrote:

> I believe the majority of structs used in OMPI are actually declared to be 
> opal objects of some flavor, so I'm not sure how much this will actually 
> accomplish. Other than that, I have no real objection - either way works fine 
> for me.
> 
> 
> On Jan 19, 2011, at 12:29 PM, George Bosilca wrote:
> 
>> I'm with you on that. Let's create a fake module using the ISO C99 naming 
>> scheme, and leave it to MTT to figure out where is breaks!
>> 
>> george.
>> 
>> On Jan 19, 2011, at 14:23 , Nathan Hjelm wrote:
>> 
>>> I don't know if this has been discussed before or if this will break 
>>> Windows (or some obscure platform) support but I would like to start using 
>>> the ISO C99 style for struct initialization (see section 6.7.8, example 10 
>>> in http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf). Using this 
>>> style would make mca code much easier to read. Any thoughts? Would this 
>>> break something?
>>> 
>>> Example:
>>> struct module_foo {
>>> char *bar;
>>> int   baz;
>>> };
>>> 
>>> struct foo foobar = {
>>> .bar = "foobar",
>>> .baz = 1
>>> };
>>> 
>>> -Nathan
>>> HPC-3, LANL
>>> ___
>>> devel mailing list
>>> de...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> 
>> 
>> ___
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> 
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI devel] Building Open MPI components outside of the source tree

2011-01-19 Thread George Bosilca
This stuff should be directly on the main Open MPI website. Not as a link to 
bitbucket, but as a webpage and 3 tars.

  george.

On Jan 19, 2011, at 15:43 , Jeff Squyres wrote:

> Over the years, a few parties have wanted to be able to build Open MPI 
> components outside of the official source tree (e.g., they are developing 
> their own components outside of OMPI's SVN).  We've typically said "use 
> --with-devel-headers", but a) never really provided a full example of how to 
> do this, and b) never acknowledged that using --with-devel-headers is 
> somewhat of a pain.
> 
> That ends now.  :-)
> 
> I am publishing a bitbucket repo of three example "tcp2" BTL components.  
> They are almost exact copies of the real TCP BTL component, but have had 
> their configury updated to enable them to be built outside of the Open MPI 
> source tree:
> 
> 1. A component for the v1.4 Open MPI tree
> 2. A component for the v1.5/v1.6 Open MPI tree
> 3. A component for the trunk/v1.7 (as of r24265) Open MPI tree
> 
> Each of these example components support the --with-devel-headers method as 
> well as a new method: --with-openmpi-source=DIR (i.e., where you specify the 
> corresponding Open MPI source directory, and the component builds against 
> that).  
> 
> There are three different components because the configury between each of 
> them are a bit different.  Look at the configure.ac in the version that you 
> care about to see examples of how to get the relevant CPPFLAGS / CFLAGS that 
> you need to build your component.
> 
> Here's the bitbucket repo:
> 
>  https://bitbucket.org/jsquyres/build-ompi-components-outside-of-source-tree
> 
> There's a top-level README.txt file in the repo that explains a bit more.
> 
> Enjoy!
> 
> -- 
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> 
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel




Re: [OMPI devel] Building Open MPI components outside of the source tree

2011-01-19 Thread Jeff Squyres
Where should it be on the main web site?  It needs to be in a repo somewhere; 
it may change over time.


On Jan 19, 2011, at 4:38 PM, George Bosilca wrote:

> This stuff should be directly on the main Open MPI website. Not as a link to 
> bitbucket, but as a webpage and 3 tars.
> 
>  george.
> 
> On Jan 19, 2011, at 15:43 , Jeff Squyres wrote:
> 
>> Over the years, a few parties have wanted to be able to build Open MPI 
>> components outside of the official source tree (e.g., they are developing 
>> their own components outside of OMPI's SVN).  We've typically said "use 
>> --with-devel-headers", but a) never really provided a full example of how to 
>> do this, and b) never acknowledged that using --with-devel-headers is 
>> somewhat of a pain.
>> 
>> That ends now.  :-)
>> 
>> I am publishing a bitbucket repo of three example "tcp2" BTL components.  
>> They are almost exact copies of the real TCP BTL component, but have had 
>> their configury updated to enable them to be built outside of the Open MPI 
>> source tree:
>> 
>> 1. A component for the v1.4 Open MPI tree
>> 2. A component for the v1.5/v1.6 Open MPI tree
>> 3. A component for the trunk/v1.7 (as of r24265) Open MPI tree
>> 
>> Each of these example components support the --with-devel-headers method as 
>> well as a new method: --with-openmpi-source=DIR (i.e., where you specify the 
>> corresponding Open MPI source directory, and the component builds against 
>> that).  
>> 
>> There are three different components because the configury between each of 
>> them are a bit different.  Look at the configure.ac in the version that you 
>> care about to see examples of how to get the relevant CPPFLAGS / CFLAGS that 
>> you need to build your component.
>> 
>> Here's the bitbucket repo:
>> 
>> https://bitbucket.org/jsquyres/build-ompi-components-outside-of-source-tree
>> 
>> There's a top-level README.txt file in the repo that explains a bit more.
>> 
>> Enjoy!
>> 
>> -- 
>> Jeff Squyres
>> jsquy...@cisco.com
>> For corporate legal information go to:
>> http://www.cisco.com/web/about/doing_business/legal/cri/
>> 
>> 
>> ___
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> 
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI devel] Building Open MPI components outside of the source tree

2011-01-19 Thread George Bosilca

On Jan 19, 2011, at 16:44 , Jeff Squyres wrote:

> Where should it be on the main web site?  

The Documentation section look like a good place to me.

> It needs to be in a repo somewhere; it may change over time.

The source code can be hosted at Indiana in the same way ompi-tests and 
ompi-docs are hosted. However, I don't expect this code to drastically change 
every other day, so providing a tar on a webpage should be good enough. To be 
more precise on this point, as we only allow big modification of the build 
system between major releases I expect to only maintain 3 template (stable, 
unstable and trunk).

  george.

> 
> 
> On Jan 19, 2011, at 4:38 PM, George Bosilca wrote:
> 
>> This stuff should be directly on the main Open MPI website. Not as a link to 
>> bitbucket, but as a webpage and 3 tars.
>> 
>> george.
>> 
>> On Jan 19, 2011, at 15:43 , Jeff Squyres wrote:
>> 
>>> Over the years, a few parties have wanted to be able to build Open MPI 
>>> components outside of the official source tree (e.g., they are developing 
>>> their own components outside of OMPI's SVN).  We've typically said "use 
>>> --with-devel-headers", but a) never really provided a full example of how 
>>> to do this, and b) never acknowledged that using --with-devel-headers is 
>>> somewhat of a pain.
>>> 
>>> That ends now.  :-)
>>> 
>>> I am publishing a bitbucket repo of three example "tcp2" BTL components.  
>>> They are almost exact copies of the real TCP BTL component, but have had 
>>> their configury updated to enable them to be built outside of the Open MPI 
>>> source tree:
>>> 
>>> 1. A component for the v1.4 Open MPI tree
>>> 2. A component for the v1.5/v1.6 Open MPI tree
>>> 3. A component for the trunk/v1.7 (as of r24265) Open MPI tree
>>> 
>>> Each of these example components support the --with-devel-headers method as 
>>> well as a new method: --with-openmpi-source=DIR (i.e., where you specify 
>>> the corresponding Open MPI source directory, and the component builds 
>>> against that).  
>>> 
>>> There are three different components because the configury between each of 
>>> them are a bit different.  Look at the configure.ac in the version that you 
>>> care about to see examples of how to get the relevant CPPFLAGS / CFLAGS 
>>> that you need to build your component.
>>> 
>>> Here's the bitbucket repo:
>>> 
>>> https://bitbucket.org/jsquyres/build-ompi-components-outside-of-source-tree
>>> 
>>> There's a top-level README.txt file in the repo that explains a bit more.
>>> 
>>> Enjoy!
>>> 
>>> -- 
>>> Jeff Squyres
>>> jsquy...@cisco.com
>>> For corporate legal information go to:
>>> http://www.cisco.com/web/about/doing_business/legal/cri/
>>> 
>>> 
>>> ___
>>> devel mailing list
>>> de...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> 
>> 
>> ___
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> 
> -- 
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> 
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel




Re: [OMPI devel] RFC: use ISO C99 style struct initialization

2011-01-19 Thread Nathan Hjelm

Done. I added the module orte/mca/debugger/dummy and I will remove it tomorrow.

-Nathan
HPC-3, LANL

On Wed, 19 Jan 2011, Jeff Squyres wrote:


+1 on Ralph and George's comments.

Want to make a dummy component somewhere that uses this kind of initialization 
and see what happens?  Put a test for the C99 initialization style in 
configure.m4 to see if it works or not; MTT will then check this for all the 
compilers that we care about.


On Jan 19, 2011, at 3:58 PM, Ralph Castain wrote:


I believe the majority of structs used in OMPI are actually declared to be opal 
objects of some flavor, so I'm not sure how much this will actually accomplish. 
Other than that, I have no real objection - either way works fine for me.


On Jan 19, 2011, at 12:29 PM, George Bosilca wrote:


I'm with you on that. Let's create a fake module using the ISO C99 naming 
scheme, and leave it to MTT to figure out where is breaks!

george.

On Jan 19, 2011, at 14:23 , Nathan Hjelm wrote:


I don't know if this has been discussed before or if this will break Windows 
(or some obscure platform) support but I would like to start using the ISO C99 
style for struct initialization (see section 6.7.8, example 10 in 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf). Using this style 
would make mca code much easier to read. Any thoughts? Would this break 
something?

Example:
struct module_foo {
char *bar;
int   baz;
};

struct foo foobar = {
.bar = "foobar",
.baz = 1
};

-Nathan
HPC-3, LANL
___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



--
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



Re: [OMPI devel] Building Open MPI components outside of the sourcetree

2011-01-19 Thread Jeff Squyres (jsquyres)
I'd rather not setup another SVN repo. Where should it go in the current OMPI 
SVN?

Sent from my PDA. No type good. 

On Jan 19, 2011, at 5:01 PM, "George Bosilca"  wrote:

> 
> On Jan 19, 2011, at 16:44 , Jeff Squyres wrote:
> 
>> Where should it be on the main web site?  
> 
> The Documentation section look like a good place to me.
> 
>> It needs to be in a repo somewhere; it may change over time.
> 
> The source code can be hosted at Indiana in the same way ompi-tests and 
> ompi-docs are hosted. However, I don't expect this code to drastically change 
> every other day, so providing a tar on a webpage should be good enough. To be 
> more precise on this point, as we only allow big modification of the build 
> system between major releases I expect to only maintain 3 template (stable, 
> unstable and trunk).
> 
>  george.
> 
>> 
>> 
>> On Jan 19, 2011, at 4:38 PM, George Bosilca wrote:
>> 
>>> This stuff should be directly on the main Open MPI website. Not as a link 
>>> to bitbucket, but as a webpage and 3 tars.
>>> 
>>> george.
>>> 
>>> On Jan 19, 2011, at 15:43 , Jeff Squyres wrote:
>>> 
 Over the years, a few parties have wanted to be able to build Open MPI 
 components outside of the official source tree (e.g., they are developing 
 their own components outside of OMPI's SVN).  We've typically said "use 
 --with-devel-headers", but a) never really provided a full example of how 
 to do this, and b) never acknowledged that using --with-devel-headers is 
 somewhat of a pain.
 
 That ends now.  :-)
 
 I am publishing a bitbucket repo of three example "tcp2" BTL components.  
 They are almost exact copies of the real TCP BTL component, but have had 
 their configury updated to enable them to be built outside of the Open MPI 
 source tree:
 
 1. A component for the v1.4 Open MPI tree
 2. A component for the v1.5/v1.6 Open MPI tree
 3. A component for the trunk/v1.7 (as of r24265) Open MPI tree
 
 Each of these example components support the --with-devel-headers method 
 as well as a new method: --with-openmpi-source=DIR (i.e., where you 
 specify the corresponding Open MPI source directory, and the component 
 builds against that).  
 
 There are three different components because the configury between each of 
 them are a bit different.  Look at the configure.ac in the version that 
 you care about to see examples of how to get the relevant CPPFLAGS / 
 CFLAGS that you need to build your component.
 
 Here's the bitbucket repo:
 
 https://bitbucket.org/jsquyres/build-ompi-components-outside-of-source-tree
 
 There's a top-level README.txt file in the repo that explains a bit more.
 
 Enjoy!
 
 -- 
 Jeff Squyres
 jsquy...@cisco.com
 For corporate legal information go to:
 http://www.cisco.com/web/about/doing_business/legal/cri/
 
 
 ___
 devel mailing list
 de...@open-mpi.org
 http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>> 
>>> 
>>> ___
>>> devel mailing list
>>> de...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> 
>> 
>> -- 
>> Jeff Squyres
>> jsquy...@cisco.com
>> For corporate legal information go to:
>> http://www.cisco.com/web/about/doing_business/legal/cri/
>> 
>> 
>> ___
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> 
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel



Re: [OMPI devel] RFC: use ISO C99 style struct initialization

2011-01-19 Thread Terry Dontje
Hopefully we'll find out tomorrow but I think I vaguely remember an 
issue with the Studio compilers and this type of initialization style.


--td

On 01/19/2011 05:22 PM, Nathan Hjelm wrote:
Done. I added the module orte/mca/debugger/dummy and I will remove it 
tomorrow.


-Nathan
HPC-3, LANL

On Wed, 19 Jan 2011, Jeff Squyres wrote:


+1 on Ralph and George's comments.

Want to make a dummy component somewhere that uses this kind of 
initialization and see what happens?  Put a test for the C99 
initialization style in configure.m4 to see if it works or not; MTT 
will then check this for all the compilers that we care about.



On Jan 19, 2011, at 3:58 PM, Ralph Castain wrote:

I believe the majority of structs used in OMPI are actually declared 
to be opal objects of some flavor, so I'm not sure how much this 
will actually accomplish. Other than that, I have no real objection 
- either way works fine for me.



On Jan 19, 2011, at 12:29 PM, George Bosilca wrote:

I'm with you on that. Let's create a fake module using the ISO C99 
naming scheme, and leave it to MTT to figure out where is breaks!


george.

On Jan 19, 2011, at 14:23 , Nathan Hjelm wrote:

I don't know if this has been discussed before or if this will 
break Windows (or some obscure platform) support but I would like 
to start using the ISO C99 style for struct initialization (see 
section 6.7.8, example 10 in 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf). Using 
this style would make mca code much easier to read. Any thoughts? 
Would this break something?


Example:
struct module_foo {
char *bar;
int   baz;
};

struct foo foobar = {
.bar = "foobar",
.baz = 1
};

-Nathan
HPC-3, LANL
___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



--
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel


___
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel



--
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.don...@oracle.com