Boost logo

Boost-Build :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2005-12-12 12:51:52


On Dec 12, 2005, at 12:01 PM, Rene Rivera wrote:
>> Does anyone know how I can achieve this functionality in BBv1's
>> testing
>> environment?
>
> The easiest way is close to (2). If you create a "lib" with most of
> the
> sources of the test and link that into each "exe" you'll save the
> compilation time at least.

Okay. I have some vague recollection that some platforms don't link
executables properly when main() is stored in a library, but it's too
vague a recollection to worry about. But, I'll try it out. Worst
case, I pull main out into stub .cpp file.

> Other than that it would require some internal hacking/kludging to/
> with
> testing.jam. I'd need to know what the MPI_RUN code is doing to really
> answer entertain this route.

Definitely not worth it, then. However, I'll describe what's
happening in case we want to think about it for BBv2.
I'm building programs using MPI (the Message Passing Interface).
These programs cannot typically be run standalone. For instance, if I
build all_gather_test.exe, I can't just run it by itself. Instead, I
need to run it through an auxiliary program called "mpirun", like this:

        mpirun -np 7 all_gather_test.exe

The "-np 7" tells mpirun to launch 7 separate processes, each of
which will run a unique copy of all_gather_test.exe. Then the MPI
library that all_gather_test.exe will allow them to communicate.

For proper testing of all_gather_test.exe, we can't just fix the
number of processors and run it once. We really need to run on
several different configurations (one node, powers-of-two, powers-of-
three, prime numbers, and one less than powers-of-two are typical).
So, for instance, we'd like to run all of these as separate tests:

        mpirun -np 1 all_gather_test.exe
        mpirun -np 2 all_gather_test.exe
        mpirun -np 7 all_gather_test.exe
        mpirun -np 8 all_gather_test.exe
        mpirun -np 9 all_gather_test.exe
        mpirun -np 17 all_gather_test.exe

Thanks for your help!

        Doug


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk