Open MPI logo

MTT Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all MTT Devel mailing list

Subject: Re: [MTT devel] [MTT svn] svn:mtt-svn r1163
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-03-17 11:01:11


Ethan --

Was there a case where the trivial plugin was not correctly detecting
what language bindings to compile against?

(don't forget to add the new fields to the wiki)

On Mar 17, 2008, at 10:55 AM, emallove_at_[hidden] wrote:

> Author: emallove
> Date: 2008-03-17 10:55:36 EDT (Mon, 17 Mar 2008)
> New Revision: 1163
> URL: https://svn.open-mpi.org/trac/mtt/changeset/1163
>
> Log:
> * Added `trivial_tests_languages` to `Build/Trivial.pm`
> * Added `clustertools_package_basedir` to
> `Install/ClusterTools.pm`
> * Need to add whitespace to command in `Common/SCM.pm`
>
> Text files modified:
> trunk/CHANGES | 3 +++
> trunk/lib/MTT/Common/SCM.pm | 10 +++++-----
> trunk/lib/MTT/MPI/Install/ClusterTools.pm | 9 ++++++---
> trunk/lib/MTT/Test/Build/Trivial.pm | 22 +++++++++++++++++
> +----
> 4 files changed, 32 insertions(+), 12 deletions(-)
>
> Modified: trunk/CHANGES
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/CHANGES (original)
> +++ trunk/CHANGES 2008-03-17 10:55:36 EDT (Mon, 17 Mar 2008)
> @@ -169,3 +169,6 @@
> - after_make_install
>
> - include_file(s) INI parameter - just like pre-processor "#include"
> directives
> +
> +- trivial_tests_languages - comma separated list of languages to
> use for trivial
> + tests (default: "c,c++,f77,f90").
>
> Modified: trunk/lib/MTT/Common/SCM.pm
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/lib/MTT/Common/SCM.pm (original)
> +++ trunk/lib/MTT/Common/SCM.pm 2008-03-17 10:55:36 EDT (Mon, 17 Mar
> 2008)
> @@ -266,11 +266,11 @@
>
> # Append arguments to commands
> # EAM: move to SVN.pm
> - $command .= " $command_arguments " if ($command_arguments);
> - $command .= "-r $r " if ($r);
> - $command .= "--username $username " if ($username);
> - $command .= "--password $password " if ($password);
> - $command .= "--no-auth-cache " if ("0" eq $password_cache);
> + $command .= " $command_arguments " if ($command_arguments);
> + $command .= " -r $r " if ($r);
> + $command .= " --username $username " if ($username);
> + $command .= " --password $password " if ($password);
> + $command .= " --no-auth-cache " if ("0" eq $password_cache);
>
> $subcommand .= " $subcommand_arguments "
> if ($subcommand_arguments);
>
> Modified: trunk/lib/MTT/MPI/Install/ClusterTools.pm
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/lib/MTT/MPI/Install/ClusterTools.pm (original)
> +++ trunk/lib/MTT/MPI/Install/ClusterTools.pm 2008-03-17 10:55:36
> EDT (Mon, 17 Mar 2008)
> @@ -31,6 +31,7 @@
> my $release_number;
> my $product_version;
> my $package_name_prefix;
> +my $package_basedir;
>
> sub Install {
> my ($ini, $section, $config) = @_;
> @@ -74,6 +75,8 @@
> $release_number = Value($ini, $section, "clustertools_release");
> $product_version = Value($ini, $section,
> "clustertools_product_version");
> $package_name_prefix = Value($ini, $section,
> "clustertools_package_name_prefix");
> + $package_basedir = Value($ini, $section,
> "clustertools_package_basedir");
> + $package_basedir = $package_basedir ? $package_basedir : "/opt";
>
> # Grab the internal repository revision number
> my $internal_r_number = $config->{module_data}->{r};
> @@ -218,11 +221,11 @@
>
> # Setup the Installer, if we pointed at one
> my $installer_dir;
> - my $installer_dir_src = basename($installer_hg_url);
> if ($installer_hg_url) {
>
> MTT::Module::Run("MTT::Common::SCM::Mercurial", "Checkout",
> "hg clone $installer_hg_url", $installer_hg_url);
>
> + my $installer_dir_src = basename($installer_hg_url);
> MTT::DoCommand::Pushdir($installer_dir_src);
>
> # Build the Install_Utilities (OMPIompiat package)
> @@ -667,7 +670,7 @@
> # Write a pkginfo file for the specified package.
> # To be passed to the prototype file.
> sub _write_pkginfo_file {
> - my ($name, $short_name, $desc) = @_;
> + my ($name, $short_name, $desc, $package_basedir) = @_;
> Debug("_write_pkginfo_file: got @_\n");
>
> my $pkgvers;
> @@ -699,7 +702,7 @@
> PKG=\"$name\"
> NAME=\"$short_name\"
> VERSION=\"$release_number\"
> -BASEDIR=\"/opt\"
> +BASEDIR=\"$package_basedir\"
> ARCH=\"ISA\"
> SUNW_PRODVERS=\"$product_version\"
> SUNW_PRODNAME=\"Open MPI\"
>
> Modified: trunk/lib/MTT/Test/Build/Trivial.pm
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/lib/MTT/Test/Build/Trivial.pm (original)
> +++ trunk/lib/MTT/Test/Build/Trivial.pm 2008-03-17 10:55:36 EDT
> (Mon, 17 Mar 2008)
> @@ -55,10 +55,24 @@
> "trivial_tests_cflags");
> my $fflags = Value($ini, $config->{full_section_name},
> "trivial_tests_fflags");
> + my $languages = Value($ini, $config->{full_section_name},
> + "trivial_tests_languages");
> +
> + # Default to running *all* flavors of trivial tests
> + if (!$languages) {
> + $languages = "c,c++,f77,f90";
> + }
> +
> + my $languages_hash;
> + my @arr = split(/,|\s+/, $languages);
> + foreach my $lang (@arr) {
> + $lang = lc($lang);
> + $languages_hash->{"$lang"} = 1;
> + }
>
> # Try compiling and linking a simple C application
>
> - if ($mpi_install->{c_bindings}) {
> + if ($mpi_install->{c_bindings} and $languages_hash->{"c"}) {
> Debug("Test compile/link sample C MPI application\n");
> $x = _do_compile("mpicc $cflags", "hello.c", "c_hello");
> return $x
> @@ -73,7 +87,7 @@
> # If we have the C++ MPI bindings, try and compile and link a
> # simple C++ application
>
> - if ($mpi_install->{cxx_bindings}) {
> + if ($mpi_install->{cxx_bindings} and $languages_hash->{"c++"}) {
> Debug("Test compile/link sample C++ MPI application\n");
> $x = _do_compile("mpic++ $cflags", "hello.cc", "cxx_hello");
> return $x
> @@ -88,7 +102,7 @@
> # If we have the F77 MPI bindings, try compiling and linking a
> # simple F77 application
>
> - if ($mpi_install->{f77_bindings}) {
> + if ($mpi_install->{f77_bindings} and $languages_hash->{"f77"}) {
> Debug("Test compile/link sample F77 MPI application\n");
> $x = _do_compile("mpif77 $fflags", "hello.f", "f77_hello");
> return $x
> @@ -103,7 +117,7 @@
> # If we have the F90 MPI bindings, try compiling and linking a
> # simple F90 application
>
> - if ($mpi_install->{f90_bindings}) {
> + if ($mpi_install->{f90_bindings} and $languages_hash->{"f90"}) {
> Debug("Test compile/link sample F90 MPI application\n");
> $x = _do_compile("mpif90 $fflags", "hello.f90", "f90_hello");
> return $x
> _______________________________________________
> mtt-svn mailing list
> mtt-svn_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-svn

-- 
Jeff Squyres
Cisco Systems