[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using atlocal variables in autotest macros

From: Ralf Wildenhues
Subject: Re: using atlocal variables in autotest macros
Date: Tue, 3 Mar 2009 20:14:20 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* John Wohlbier wrote on Tue, Mar 03, 2009 at 05:13:17PM CET:
> I got the basic functionality to work with the following.
> m4_define([AT_MPIRUN_PROGRAM],
> [AT_BANNER([executing mpirun -n $2 $1])
>  AT_SETUP([$1])
>  AT_CHECK([test -n "$MPI_LIBS" || exit 77])
>  AT_TESTED([$1])
>  AT_CHECK([mpirun -n $2 $1],[0],[ignore],[ignore])
> ])
> [AT_BANNER([executing ./$1])
>  AT_SETUP([$1])
>  AT_CHECK([test -z "$MPI_LIBS" || exit 77])
>  AT_TESTED([$1])
>  AT_CHECK([$1],[0],[ignore],[ignore])
> ])
> I was surprised by the  AT_CHECK([test -z "$MPI_LIBS" || exit 77]) line
> (note it's different than what you suggested). I had to flip the -n and -z
> tests. I guess the double pipe (||) means that if the first argument is
> true, then take it, otherwise take exit 77.

`||' is like logical or.  If the left command exits successfully (0),
then the right argument is not evaluated.

BTW, if I were you, then I would do this differently: don't use separate
tests for parallel and serial, but just adjust the AT_CHECK within one

BTW2, a comment regarding portability.  The newer MPI standard specifies
mpiexec rather than mpirun; but in practice, there are still lots of
system differences regarding how to start MPI jobs, be that some flavor
of mpirun, mpprun, qsub, loadlever or so.  Further, on some of the big
iron systems, MPI is enabled and linked to by default (or even part of
"libc"), so MPI_LIBS may as well be empty for them.  They typically have
different program startup procedures, too.

> The last thing is asthetic. I would rather not have the "other" test(s)
> execute at all. When I build and test serial I see
> executing ./test_Cell_Field
>   1: test_Cell_Field                                 ok
> executing mpirun -n 1 test_Cell_Field
>   2: test_Cell_Field                                 skipped
> (

That would be obsolete with my first comment above.  But otherwise I can
understand your request.  You can limit the number of tests executed by
passing numbers or keywords
  ./testsuite 1-4 9-14 23-
  ./testsuite -k mpirun

Keywords are matched case-insensitively, matching full words, and both
against the test names and against additional keys registered with

Hope that helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]