Re: [MTT devel] GSOC application

2009-03-12 Thread Josh Hursey

Jeff is going to take the first pass at the application.

I am going to go through the Idea page on the wiki and polish a bit:
  https://svn.open-mpi.org/trac/mtt/wiki/MttNewFeaturesIdeas

I'll let folks know when I'm done, and we can start iterating on drafts.

Cheers,
Josh

On Mar 12, 2009, at 4:08 PM, Jeff Squyres wrote:

I've created a quick-n-dirty hg to collaborate on the GSOC  
application.  There's a web form to fill out to apply, so let's work  
on a .txt file in the hg to get it right.


We have until 3pm US Eastern time tomorrow to submit.  Here's the HG:

   ssh://www.open-mpi.org/~jsquyres/hg/gsoc/

I've put the PDF there for now; I'll kruft up a quick .txt shortly  
and push it there as well.


--
Jeff Squyres
Cisco Systems

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




[MTT devel] GSOC application

2009-03-12 Thread Jeff Squyres
I've created a quick-n-dirty hg to collaborate on the GSOC  
application.  There's a web form to fill out to apply, so let's work  
on a .txt file in the hg to get it right.


We have until 3pm US Eastern time tomorrow to submit.  Here's the HG:

ssh://www.open-mpi.org/~jsquyres/hg/gsoc/

I've put the PDF there for now; I'll kruft up a quick .txt shortly and  
push it there as well.


--
Jeff Squyres
Cisco Systems



Re: [MTT devel] MTT on Windows

2009-03-12 Thread Shiqing Fan

Hi Jeff,

Thanks a lot.

I'm waiting for reply from the CPAN author.


Cheers,
Shiqing


Jeff Squyres wrote:

Applied.

https://svn.open-mpi.org/trac/mtt/changeset/1272

You should probably push your patch to Filesys::Diskfree upstream to 
the CPAN author:


http://search.cpan.org/~abarclay/Filesys-DiskFree-0.06/DiskFree.pm

(i.e., we wholly imported this module into MTT; we didn't write it)


On Mar 12, 2009, at 9:24 AM, Shiqing Fan wrote:


Hi Jeff,

No problem. I made a tarball for you. :-)


Thanks,
Shiqing

Jeff Squyres wrote:
> This could be an artifact of the new SVN manager system that IU
> installed yesterday; I've sent a mail to the admin asking about it.
> Sorry!  :-(
>
> If you could send me your patch as an attachment, I can commit it (OS
> X Mail.app does weird things with the spacing of inlined patches 
:-( ).

>
>
> On Mar 12, 2009, at 7:00 AM, Shiqing Fan wrote:
>
>> Here is some output of 'svn info':
>>
>> Path: .
>> URL: https://svn.open-mpi.org/svn/mtt/trunk
>> Repository Root: https://svn.open-mpi.org/svn/mtt
>> Repository UUID: 3a00f1f0-e206-0410-aee5-9638c71ae14b
>> Revision: 1271
>> Node Kind: directory
>> Schedule: normal
>> Last Changed Author: emallove
>> Last Changed Rev: 1271
>> Last Changed Date: 2009-02-05 18:22:38 +0100 (Thu, 05 Feb 2009)
>>
>>
>> Is that ok, if someone else commits the patch instead of me? I don't
>> mind actually. :-)
>>
>>
>> Thanks,
>> Shiqing









Re: [MTT devel] MTT on Windows

2009-03-12 Thread Jeff Squyres

Applied.

https://svn.open-mpi.org/trac/mtt/changeset/1272

You should probably push your patch to Filesys::Diskfree upstream to  
the CPAN author:


http://search.cpan.org/~abarclay/Filesys-DiskFree-0.06/DiskFree.pm

(i.e., we wholly imported this module into MTT; we didn't write it)


On Mar 12, 2009, at 9:24 AM, Shiqing Fan wrote:


Hi Jeff,

No problem. I made a tarball for you. :-)


Thanks,
Shiqing

Jeff Squyres wrote:
> This could be an artifact of the new SVN manager system that IU
> installed yesterday; I've sent a mail to the admin asking about it.
> Sorry!  :-(
>
> If you could send me your patch as an attachment, I can commit it  
(OS
> X Mail.app does weird things with the spacing of inlined patches :- 
( ).

>
>
> On Mar 12, 2009, at 7:00 AM, Shiqing Fan wrote:
>
>> Here is some output of 'svn info':
>>
>> Path: .
>> URL: https://svn.open-mpi.org/svn/mtt/trunk
>> Repository Root: https://svn.open-mpi.org/svn/mtt
>> Repository UUID: 3a00f1f0-e206-0410-aee5-9638c71ae14b
>> Revision: 1271
>> Node Kind: directory
>> Schedule: normal
>> Last Changed Author: emallove
>> Last Changed Rev: 1271
>> Last Changed Date: 2009-02-05 18:22:38 +0100 (Thu, 05 Feb 2009)
>>
>>
>> Is that ok, if someone else commits the patch instead of me? I  
don't

>> mind actually. :-)
>>
>>
>> Thanks,
>> Shiqing





--
Jeff Squyres
Cisco Systems



Re: [MTT devel] MTT on Windows

2009-03-12 Thread Shiqing Fan

Hi Jeff,

No problem. I made a tarball for you. :-)


Thanks,
Shiqing

Jeff Squyres wrote:
This could be an artifact of the new SVN manager system that IU 
installed yesterday; I've sent a mail to the admin asking about it.  
Sorry!  :-(


If you could send me your patch as an attachment, I can commit it (OS 
X Mail.app does weird things with the spacing of inlined patches :-( ).



On Mar 12, 2009, at 7:00 AM, Shiqing Fan wrote:


Here is some output of 'svn info':

Path: .
URL: https://svn.open-mpi.org/svn/mtt/trunk
Repository Root: https://svn.open-mpi.org/svn/mtt
Repository UUID: 3a00f1f0-e206-0410-aee5-9638c71ae14b
Revision: 1271
Node Kind: directory
Schedule: normal
Last Changed Author: emallove
Last Changed Rev: 1271
Last Changed Date: 2009-02-05 18:22:38 +0100 (Thu, 05 Feb 2009)


Is that ok, if someone else commits the patch instead of me? I don't
mind actually. :-)


Thanks,
Shiqing




mtt-windows.tar.gz
Description: GNU Zip compressed data


Re: [MTT devel] 1.3.1?

2009-03-12 Thread Jeff Squyres

On Mar 12, 2009, at 8:35 AM, Jeff Squyres wrote:

So -- RM's -- can we release 1.3.1?  The tarball is ready (it's made  
at the same time as RC tarballs to guarantee that it's the same).   
All that's necessary is posting it to the web site and sending out  
the announcement.


Wow; that went to the wrong list -- sorry about that... (stupid mail  
client email address auto-complete!)


:-)

--
Jeff Squyres
Cisco Systems



[MTT devel] 1.3.1?

2009-03-12 Thread Jeff Squyres
So -- RM's -- can we release 1.3.1?  The tarball is ready (it's made  
at the same time as RC tarballs to guarantee that it's the same).  All  
that's necessary is posting it to the web site and sending out the  
announcement.


--
Jeff Squyres
Cisco Systems



Re: [MTT devel] MTT on Windows

2009-03-12 Thread Jeff Squyres
This could be an artifact of the new SVN manager system that IU  
installed yesterday; I've sent a mail to the admin asking about it.   
Sorry!  :-(


If you could send me your patch as an attachment, I can commit it (OS  
X Mail.app does weird things with the spacing of inlined patches :-( ).



On Mar 12, 2009, at 7:00 AM, Shiqing Fan wrote:


Here is some output of 'svn info':

Path: .
URL: https://svn.open-mpi.org/svn/mtt/trunk
Repository Root: https://svn.open-mpi.org/svn/mtt
Repository UUID: 3a00f1f0-e206-0410-aee5-9638c71ae14b
Revision: 1271
Node Kind: directory
Schedule: normal
Last Changed Author: emallove
Last Changed Rev: 1271
Last Changed Date: 2009-02-05 18:22:38 +0100 (Thu, 05 Feb 2009)


Is that ok, if someone else commits the patch instead of me? I don't
mind actually. :-)


Thanks,
Shiqing


Jeff Squyres wrote:
> Did you check out via https?  We only allow commits to all OMPI SVN
> repositories via https.
>
> On Mar 12, 2009, at 5:10 AM, Shiqing Fan wrote:
>
>> Hi Ethan and Jeff,
>>
>> Thanks for all your help. Now it's been fixed and tested.
>>
>> But it seems that I don't have permission to commit the patch ( I  
got

>> 403 forbidden ). Any idea?
>>
>>
>> Thanks,
>> Shiqing
>>
>>
>>

Index: lib/Filesys/DiskFree.pm
===
--- lib/Filesys/DiskFree.pm (revision 1271)
+++ lib/Filesys/DiskFree.pm (working copy)
@@ -29,6 +29,16 @@
'inodes' => "df -Pi",
'format' => "linuxish",
},
+'cygwin' => {
+   'blocks' => "df -P",
+   'inodes' => "df -Pi",
+   'format' => "linuxish",
+},
+'msys' => {
+   'blocks' => "df -P",
+   'inodes' => "df -Pi",
+   'format' => "linuxish",
+},
'solaris' =>  {
'blocks' => "df -k",
'inodes' => "df -k -o i -F ufs",
Index: lib/MTT/Common/Cmake.pm
===
--- lib/MTT/Common/Cmake.pm (revision 0)
+++ lib/MTT/Common/Cmake.pm (revision 0)
@@ -0,0 +1,77 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2005-2006 The Trustees of Indiana University.
+# All rights reserved.
+# Copyright (c) 2006-2008 Cisco Systems, Inc.  All rights reserved.
+# Copyright (c) 2007-2008 Sun Microsystems, Inc.  All rights  
reserved.
+# Copyright (c) 2009  High Performance Computing Center  
Stuttgart,
+# University of Stuttgart.  All rights  
reserved.

+# $COPYRIGHT$
+#
+# Additional copyrights may follow
+#
+# $HEADER$
+#
+
+package MTT::Common::Cmake;
+my $package = ModuleName(__PACKAGE__);
+
+use strict;
+use MTT::Messages;
+use MTT::Values;
+use MTT::Common::Do_step;
+
+ 
#--

+
+# Do the following steps:
+#   [ ] cmake -G "generator" -D configure_arguments source_path
+#   [ ] devenv OpenMPI.sln /build
+sub Install {
+my ($config) = @_;
+
+my $x;
+my $result_stdout;
+my $result_stderr;
+
+# Prepare $ret
+my $ret;
+$ret->{test_result} = MTT::Values::FAIL;
+$ret->{exit_status} = 0;
+
+# On windows, do the following steps:
+
+# prepare the windows style prefix.
+# replace '/cygdrive/x/' with 'x:/'
+my $win_prefix = substr ($config->{installdir},10,1) . ":" .  
substr ($config->{installdir},11);

+
+# generate Visual Studio solution files
+# use 'script' to redirect MS command output
+$x = MTT::Common::Do_step::do_step($config,
+"script -a -c \"cmake  
$config->{configure_arguments} -D CMAKE_INSTALL_PREFIX:PATH= 
$win_prefix .\" -f temp.txt",
+$config- 
>{merge_stdout_stderr});

+
+# Overlapping keys in $x override $ret
+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# compile the whole solution
+$x = MTT::Common::Do_step::do_step($config, "script -a -c  
\"devenv.com *.sln /build debug\" -f temp.txt",
+$config- 
>{merge_stdout_stderr});

+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# install to the prefix dir
+$x = MTT::Common::Do_step::do_step($config, "script -a -c  
\"devenv.com *.sln /project INSTALL.vcproj /build\" -f temp.txt",
+$config- 
>{merge_stdout_stderr});

+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# All done!
+$ret->{test_result} = MTT::Values::PASS;
+$ret->{result_message} = "Success";
+Debug("Build was a success\n");
+
+return $ret;
+}
+
+1;
Index: lib/MTT/Common/Do_step.pm
===
--- lib/MTT/Common/Do_step.pm   (revision 0)
+++ lib/MTT/Common/Do_step.pm   (revision 0)
@@ -0,0 +1,139 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2005-2006 The Trustees of Indiana University.
+

Re: [MTT devel] MTT on Windows

2009-03-12 Thread Shiqing Fan

Here is some output of 'svn info':

Path: .
URL: https://svn.open-mpi.org/svn/mtt/trunk
Repository Root: https://svn.open-mpi.org/svn/mtt
Repository UUID: 3a00f1f0-e206-0410-aee5-9638c71ae14b
Revision: 1271
Node Kind: directory
Schedule: normal
Last Changed Author: emallove
Last Changed Rev: 1271
Last Changed Date: 2009-02-05 18:22:38 +0100 (Thu, 05 Feb 2009)


Is that ok, if someone else commits the patch instead of me? I don't 
mind actually. :-)



Thanks,
Shiqing


Jeff Squyres wrote:
Did you check out via https?  We only allow commits to all OMPI SVN 
repositories via https.


On Mar 12, 2009, at 5:10 AM, Shiqing Fan wrote:


Hi Ethan and Jeff,

Thanks for all your help. Now it's been fixed and tested.

But it seems that I don't have permission to commit the patch ( I got
403 forbidden ). Any idea?


Thanks,
Shiqing





Index: lib/Filesys/DiskFree.pm
===
--- lib/Filesys/DiskFree.pm (revision 1271)
+++ lib/Filesys/DiskFree.pm (working copy)
@@ -29,6 +29,16 @@
'inodes' => "df -Pi",
'format' => "linuxish",
 },
+'cygwin' => {
+   'blocks' => "df -P",
+   'inodes' => "df -Pi",
+   'format' => "linuxish",
+},
+'msys' => {
+   'blocks' => "df -P",
+   'inodes' => "df -Pi",
+   'format' => "linuxish",
+},
 'solaris' =>  {
'blocks' => "df -k",
'inodes' => "df -k -o i -F ufs",
Index: lib/MTT/Common/Cmake.pm
===
--- lib/MTT/Common/Cmake.pm (revision 0)
+++ lib/MTT/Common/Cmake.pm (revision 0)
@@ -0,0 +1,77 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2005-2006 The Trustees of Indiana University.
+# All rights reserved.
+# Copyright (c) 2006-2008 Cisco Systems, Inc.  All rights reserved.
+# Copyright (c) 2007-2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright (c) 2009  High Performance Computing Center Stuttgart, 
+# University of Stuttgart.  All rights reserved.
+# $COPYRIGHT$
+#
+# Additional copyrights may follow
+#
+# $HEADER$
+#
+
+package MTT::Common::Cmake;
+my $package = ModuleName(__PACKAGE__);
+
+use strict;
+use MTT::Messages;
+use MTT::Values;
+use MTT::Common::Do_step;
+
+#--
+
+# Do the following steps:
+#   [ ] cmake -G "generator" -D configure_arguments source_path
+#   [ ] devenv OpenMPI.sln /build
+sub Install {
+my ($config) = @_;
+
+my $x;
+my $result_stdout;
+my $result_stderr;
+
+# Prepare $ret
+my $ret;
+$ret->{test_result} = MTT::Values::FAIL;
+$ret->{exit_status} = 0;
+
+# On windows, do the following steps:
+
+# prepare the windows style prefix.
+# replace '/cygdrive/x/' with 'x:/'
+my $win_prefix = substr ($config->{installdir},10,1) . ":" . substr 
($config->{installdir},11);
+
+# generate Visual Studio solution files
+# use 'script' to redirect MS command output
+$x = MTT::Common::Do_step::do_step($config,
+"script -a -c \"cmake 
$config->{configure_arguments} -D CMAKE_INSTALL_PREFIX:PATH=$win_prefix .\" -f 
temp.txt", 
+$config->{merge_stdout_stderr});
+
+# Overlapping keys in $x override $ret
+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# compile the whole solution
+$x = MTT::Common::Do_step::do_step($config, "script -a -c \"devenv.com 
*.sln /build debug\" -f temp.txt",
+$config->{merge_stdout_stderr});
+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# install to the prefix dir
+$x = MTT::Common::Do_step::do_step($config, "script -a -c \"devenv.com 
*.sln /project INSTALL.vcproj /build\" -f temp.txt",
+$config->{merge_stdout_stderr});
+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# All done!
+$ret->{test_result} = MTT::Values::PASS;
+$ret->{result_message} = "Success";
+Debug("Build was a success\n");
+
+return $ret;
+}
+
+1;
Index: lib/MTT/Common/Do_step.pm
===
--- lib/MTT/Common/Do_step.pm   (revision 0)
+++ lib/MTT/Common/Do_step.pm   (revision 0)
@@ -0,0 +1,139 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2005-2006 The Trustees of Indiana University.
+# All rights reserved.
+# Copyright (c) 2006-2008 Cisco Systems, Inc.  All rights reserved.
+# Copyright (c) 2007-2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright (c) 2009  High Performance Computing Center Stuttgart, 
+# University of Stuttgart.  All rights reserved.
+# $COPYRIGHT$
+#
+# Additional copyrights may follow
+#
+# $HEADER$
+

Re: [MTT devel] MTT on Windows

2009-03-12 Thread Shiqing Fan

Hi Jeff,

Yes, I tried also via https and the same account/passwort as I use for 
OMPI repository, but it's not working.



Thanks,
Shiqing


Jeff Squyres wrote:
Did you check out via https?  We only allow commits to all OMPI SVN 
repositories via https.


On Mar 12, 2009, at 5:10 AM, Shiqing Fan wrote:


Hi Ethan and Jeff,

Thanks for all your help. Now it's been fixed and tested.

But it seems that I don't have permission to commit the patch ( I got
403 forbidden ). Any idea?


Thanks,
Shiqing





Ethan Mallove wrote:
> On Wed, Mar/11/2009 03:47:22PM, Jeff Squyres wrote:
>
>> Thanks for your patience!  Yes, this looks good to me with one 
minor nit:

>>
>>
>>> +if(($sys_type == "Cygwin" || $sys_type == "Msys") &&
>>> +$config->{compiler_name} == "microsoft") {
>>>
>> should be
>>
>>
>>> +if(($sys_type eq "Cygwin" || $sys_type eq "Msys") &&
>>> +$config->{compiler_name} eq "microsoft") {
>>>
>> Josh / Ethan -- got any comments for Shiqing?
>>
>
> I just noticed last night's CYGWIN results. Nice!
>
> Should a regexp (see below) be used in case the sys_type comes back 
as, e.g.,

> "cygwin", "CYGWIN", "cygwin-2.0", etc.?
>
>   $sys_type =~ /cygwin/i
>
> Other than that, it looks good to me.
>
> -Ethan
>
>
>>
>>
>> On Mar 11, 2009, at 2:58 PM, Shiqing Fan wrote:
>>
>>
>>> Hi Jeff,
>>>
>>>
>>> Sorry for the carelessness. This time it looks better? :-)
>>>
>>>
>>> Thanks,
>>> Shiqing
>>>
 Can you double check your cr / cr/lf settings?  It looks like 
you're
 committing in the windows format -- can you convert and commit 
in the

 unix format?  That way, it wouldn't look like the entire
 GNU_Install.pm file is being replaced, for example.

 I forgot to mention in my last mail -- since cmake *only* works on
 Windows and our Autotools system *doesn't* work on Windows, I 
retract
 my earlier statement: don't bother with an ompi_cmake parameter 
in the
 .ini file.  Just have OMPI.pm figure out if you're on cygwin or 
mingw

 and call the right back-end building function.

 Also, in Do_Step.pm, you might want to remove the "_" prefix 
from the

 sub names.  "_" as a prefix in perl is meant to imply that it's a
 private variable/method.

 Finally, in Do_Step.pm, do you have two _do_step() functions?


>>> Index: lib/Filesys/DiskFree.pm
>>> ===
>>> --- lib/Filesys/DiskFree.pm (revision 1271)
>>> +++ lib/Filesys/DiskFree.pm (working copy)
>>> @@ -29,6 +29,16 @@
>>> 'inodes' => "df -Pi",
>>> 'format' => "linuxish",
>>> },
>>> +'cygwin' => {
>>> +   'blocks' => "df -P",
>>> +   'inodes' => "df -Pi",
>>> +   'format' => "linuxish",
>>> +},
>>> +'msys' => {
>>> +   'blocks' => "df -P",
>>> +   'inodes' => "df -Pi",
>>> +   'format' => "linuxish",
>>> +},
>>> 'solaris' =>  {
>>> 'blocks' => "df -k",
>>> 'inodes' => "df -k -o i -F ufs",
>>> Index: lib/MTT/Common/Cmake.pm
>>> ===
>>> --- lib/MTT/Common/Cmake.pm (revision 0)
>>> +++ lib/MTT/Common/Cmake.pm (revision 0)
>>> @@ -0,0 +1,77 @@
>>> +#!/usr/bin/env perl
>>> +#
>>> +# Copyright (c) 2005-2006 The Trustees of Indiana University.
>>> +# All rights reserved.
>>> +# Copyright (c) 2006-2008 Cisco Systems, Inc.  All rights reserved.
>>> +# Copyright (c) 2007-2008 Sun Microsystems, Inc.  All rights 
reserved.
>>> +# Copyright (c) 2009  High Performance Computing Center 
Stuttgart,
>>> +# University of Stuttgart.  All rights 
reserved.

>>> +# $COPYRIGHT$
>>> +#
>>> +# Additional copyrights may follow
>>> +#
>>> +# $HEADER$
>>> +#
>>> +
>>> +package MTT::Common::Cmake;
>>> +my $package = ModuleName(__PACKAGE__);
>>> +
>>> +use strict;
>>> +use MTT::Messages;
>>> +use MTT::Values;
>>> +use MTT::Common::Do_step;
>>> +
>>> 
+#-- 


>>> +
>>> +# Do the following steps:
>>> +#   [ ] cmake -G "generator" -D configure_arguments source_path
>>> +#   [ ] devenv OpenMPI.sln /build
>>> +sub Install {
>>> +my ($config) = @_;
>>> +
>>> +my $x;
>>> +my $result_stdout;
>>> +my $result_stderr;
>>> +
>>> +# Prepare $ret
>>> +my $ret;
>>> +$ret->{test_result} = MTT::Values::FAIL;
>>> +$ret->{exit_status} = 0;
>>> +
>>> +# On windows, do the following steps:
>>> +
>>> +# prepare the windows style prefix.
>>> +# replace '/cygdrive/x/' with 'x:/'
>>> +my $win_prefix = substr ($config->{installdir},10,1) . ":" . 
substr

>>> ($config->{installdir},11);
>>> +
>>> +# generate Visual Studio solution files
>>> +# use 'script' to redirect MS command output
>>> +$x = MTT::Common::Do_step::do_step($config,
>>> +"script -a -c \"cmake
>>> $config->{configure_arguments} -D 
CMAKE_INSTALL_PREFIX:PATH=$win_prefix

>>> .\" -f tem

Re: [MTT devel] MTT on Windows

2009-03-12 Thread Jeff Squyres
Did you check out via https?  We only allow commits to all OMPI SVN  
repositories via https.


On Mar 12, 2009, at 5:10 AM, Shiqing Fan wrote:


Hi Ethan and Jeff,

Thanks for all your help. Now it's been fixed and tested.

But it seems that I don't have permission to commit the patch ( I got
403 forbidden ). Any idea?


Thanks,
Shiqing





Ethan Mallove wrote:
> On Wed, Mar/11/2009 03:47:22PM, Jeff Squyres wrote:
>
>> Thanks for your patience!  Yes, this looks good to me with one  
minor nit:

>>
>>
>>> +if(($sys_type == "Cygwin" || $sys_type == "Msys") &&
>>> +$config->{compiler_name} == "microsoft") {
>>>
>> should be
>>
>>
>>> +if(($sys_type eq "Cygwin" || $sys_type eq "Msys") &&
>>> +$config->{compiler_name} eq "microsoft") {
>>>
>> Josh / Ethan -- got any comments for Shiqing?
>>
>
> I just noticed last night's CYGWIN results. Nice!
>
> Should a regexp (see below) be used in case the sys_type comes  
back as, e.g.,

> "cygwin", "CYGWIN", "cygwin-2.0", etc.?
>
>   $sys_type =~ /cygwin/i
>
> Other than that, it looks good to me.
>
> -Ethan
>
>
>>
>>
>> On Mar 11, 2009, at 2:58 PM, Shiqing Fan wrote:
>>
>>
>>> Hi Jeff,
>>>
>>>
>>> Sorry for the carelessness. This time it looks better? :-)
>>>
>>>
>>> Thanks,
>>> Shiqing
>>>
 Can you double check your cr / cr/lf settings?  It looks like  
you're
 committing in the windows format -- can you convert and commit  
in the

 unix format?  That way, it wouldn't look like the entire
 GNU_Install.pm file is being replaced, for example.

 I forgot to mention in my last mail -- since cmake *only* works  
on
 Windows and our Autotools system *doesn't* work on Windows, I  
retract
 my earlier statement: don't bother with an ompi_cmake parameter  
in the
 .ini file.  Just have OMPI.pm figure out if you're on cygwin or  
mingw

 and call the right back-end building function.

 Also, in Do_Step.pm, you might want to remove the "_" prefix  
from the

 sub names.  "_" as a prefix in perl is meant to imply that it's a
 private variable/method.

 Finally, in Do_Step.pm, do you have two _do_step() functions?


>>> Index: lib/Filesys/DiskFree.pm
>>>  
===

>>> --- lib/Filesys/DiskFree.pm (revision 1271)
>>> +++ lib/Filesys/DiskFree.pm (working copy)
>>> @@ -29,6 +29,16 @@
>>> 'inodes' => "df -Pi",
>>> 'format' => "linuxish",
>>> },
>>> +'cygwin' => {
>>> +   'blocks' => "df -P",
>>> +   'inodes' => "df -Pi",
>>> +   'format' => "linuxish",
>>> +},
>>> +'msys' => {
>>> +   'blocks' => "df -P",
>>> +   'inodes' => "df -Pi",
>>> +   'format' => "linuxish",
>>> +},
>>> 'solaris' =>  {
>>> 'blocks' => "df -k",
>>> 'inodes' => "df -k -o i -F ufs",
>>> Index: lib/MTT/Common/Cmake.pm
>>>  
===

>>> --- lib/MTT/Common/Cmake.pm (revision 0)
>>> +++ lib/MTT/Common/Cmake.pm (revision 0)
>>> @@ -0,0 +1,77 @@
>>> +#!/usr/bin/env perl
>>> +#
>>> +# Copyright (c) 2005-2006 The Trustees of Indiana University.
>>> +# All rights reserved.
>>> +# Copyright (c) 2006-2008 Cisco Systems, Inc.  All rights  
reserved.
>>> +# Copyright (c) 2007-2008 Sun Microsystems, Inc.  All rights  
reserved.
>>> +# Copyright (c) 2009  High Performance Computing Center  
Stuttgart,
>>> +# University of Stuttgart.  All rights  
reserved.

>>> +# $COPYRIGHT$
>>> +#
>>> +# Additional copyrights may follow
>>> +#
>>> +# $HEADER$
>>> +#
>>> +
>>> +package MTT::Common::Cmake;
>>> +my $package = ModuleName(__PACKAGE__);
>>> +
>>> +use strict;
>>> +use MTT::Messages;
>>> +use MTT::Values;
>>> +use MTT::Common::Do_step;
>>> +
>>>  
+ 
#--

>>> +
>>> +# Do the following steps:
>>> +#   [ ] cmake -G "generator" -D configure_arguments source_path
>>> +#   [ ] devenv OpenMPI.sln /build
>>> +sub Install {
>>> +my ($config) = @_;
>>> +
>>> +my $x;
>>> +my $result_stdout;
>>> +my $result_stderr;
>>> +
>>> +# Prepare $ret
>>> +my $ret;
>>> +$ret->{test_result} = MTT::Values::FAIL;
>>> +$ret->{exit_status} = 0;
>>> +
>>> +# On windows, do the following steps:
>>> +
>>> +# prepare the windows style prefix.
>>> +# replace '/cygdrive/x/' with 'x:/'
>>> +my $win_prefix = substr ($config->{installdir},10,1) .  
":" . substr

>>> ($config->{installdir},11);
>>> +
>>> +# generate Visual Studio solution files
>>> +# use 'script' to redirect MS command output
>>> +$x = MTT::Common::Do_step::do_step($config,
>>> +"script -a -c \"cmake
>>> $config->{configure_arguments} -D CMAKE_INSTALL_PREFIX:PATH= 
$win_prefix

>>> .\" -f temp.txt",
>>> +$config- 
>{merge_stdout_stderr});

>>> +
>>> +# Overlapping keys in $x override 

Re: [MTT devel] MTT on Windows

2009-03-12 Thread Shiqing Fan

Hi Ethan and Jeff,

Thanks for all your help. Now it's been fixed and tested.

But it seems that I don't have permission to commit the patch ( I got 
403 forbidden ). Any idea?



Thanks,
Shiqing





Ethan Mallove wrote:

On Wed, Mar/11/2009 03:47:22PM, Jeff Squyres wrote:
  

Thanks for your patience!  Yes, this looks good to me with one minor nit:



+if(($sys_type == "Cygwin" || $sys_type == "Msys") &&
+$config->{compiler_name} == "microsoft") {
  

should be



+if(($sys_type eq "Cygwin" || $sys_type eq "Msys") &&
+$config->{compiler_name} eq "microsoft") {
  

Josh / Ethan -- got any comments for Shiqing?



I just noticed last night's CYGWIN results. Nice!

Should a regexp (see below) be used in case the sys_type comes back as, e.g.,
"cygwin", "CYGWIN", "cygwin-2.0", etc.?

  $sys_type =~ /cygwin/i

Other than that, it looks good to me.

-Ethan

  



On Mar 11, 2009, at 2:58 PM, Shiqing Fan wrote:



Hi Jeff,


Sorry for the carelessness. This time it looks better? :-)


Thanks,
Shiqing
  

Can you double check your cr / cr/lf settings?  It looks like you're
committing in the windows format -- can you convert and commit in the
unix format?  That way, it wouldn't look like the entire
GNU_Install.pm file is being replaced, for example.

I forgot to mention in my last mail -- since cmake *only* works on
Windows and our Autotools system *doesn't* work on Windows, I retract
my earlier statement: don't bother with an ompi_cmake parameter in the
.ini file.  Just have OMPI.pm figure out if you're on cygwin or mingw
and call the right back-end building function.

Also, in Do_Step.pm, you might want to remove the "_" prefix from the
sub names.  "_" as a prefix in perl is meant to imply that it's a
private variable/method.

Finally, in Do_Step.pm, do you have two _do_step() functions?



Index: lib/Filesys/DiskFree.pm
===
--- lib/Filesys/DiskFree.pm (revision 1271)
+++ lib/Filesys/DiskFree.pm (working copy)
@@ -29,6 +29,16 @@
'inodes' => "df -Pi",
'format' => "linuxish",
},
+'cygwin' => {
+   'blocks' => "df -P",
+   'inodes' => "df -Pi",
+   'format' => "linuxish",
+},
+'msys' => {
+   'blocks' => "df -P",
+   'inodes' => "df -Pi",
+   'format' => "linuxish",
+},
'solaris' =>  {
'blocks' => "df -k",
'inodes' => "df -k -o i -F ufs",
Index: lib/MTT/Common/Cmake.pm
===
--- lib/MTT/Common/Cmake.pm (revision 0)
+++ lib/MTT/Common/Cmake.pm (revision 0)
@@ -0,0 +1,77 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2005-2006 The Trustees of Indiana University.
+# All rights reserved.
+# Copyright (c) 2006-2008 Cisco Systems, Inc.  All rights reserved.
+# Copyright (c) 2007-2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright (c) 2009  High Performance Computing Center Stuttgart,
+# University of Stuttgart.  All rights reserved.
+# $COPYRIGHT$
+#
+# Additional copyrights may follow
+#
+# $HEADER$
+#
+
+package MTT::Common::Cmake;
+my $package = ModuleName(__PACKAGE__);
+
+use strict;
+use MTT::Messages;
+use MTT::Values;
+use MTT::Common::Do_step;
+
+#--
+
+# Do the following steps:
+#   [ ] cmake -G "generator" -D configure_arguments source_path
+#   [ ] devenv OpenMPI.sln /build
+sub Install {
+my ($config) = @_;
+
+my $x;
+my $result_stdout;
+my $result_stderr;
+
+# Prepare $ret
+my $ret;
+$ret->{test_result} = MTT::Values::FAIL;
+$ret->{exit_status} = 0;
+
+# On windows, do the following steps:
+
+# prepare the windows style prefix.
+# replace '/cygdrive/x/' with 'x:/'
+my $win_prefix = substr ($config->{installdir},10,1) . ":" . substr 
($config->{installdir},11);

+
+# generate Visual Studio solution files
+# use 'script' to redirect MS command output
+$x = MTT::Common::Do_step::do_step($config,
+"script -a -c \"cmake 
$config->{configure_arguments} -D CMAKE_INSTALL_PREFIX:PATH=$win_prefix 
.\" -f temp.txt",

+$config->{merge_stdout_stderr});
+
+# Overlapping keys in $x override $ret
+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# compile the whole solution
+$x = MTT::Common::Do_step::do_step($config, "script -a -c 
\"devenv.com *.sln /build debug\" -f temp.txt",

+$config->{merge_stdout_stderr});
+%$ret = (%$ret, %$x);
+return $ret if (!MTT::DoCommand::wsuccess($ret->{exit_status}));
+
+# install to the prefix dir
+$x = MTT::Common::Do_step::do_step($config, "script -a -c 
\"devenv.com *.sln /project INSTALL.vcproj /build\" -f temp.txt",

+