Boost logo

Boost-Build :

From: Robert Langlois (ezralanglois_at_[hidden])
Date: 2008-06-12 18:51:07


Hi,

I thought I would include an update. I was unable to get the path to the
target in spite of the useful suggestions. However, I found that MPICH2
(which uses a python version of mpiexec) does not have a problem; LAM,
however, does with its bourne shell script.

Best Regards,
Rob

On Thu, Jun 12, 2008 at 11:56 AM, Robert Langlois <ezralanglois_at_[hidden]>
wrote:

> Hi Volodya,
>
> I am creating a shared python library that handles MPI functionality. The
> library compiles fine and seems to run but I want to add unit testing to my
> Jamfile.
>
> So I do the following:
>
> python-extension foo : bar.cpp ;
> # Since the compiling works fine, I left out the mpi specific
> requirements.
>
> make-test run-pyd : foo foobar.py
> : <testing.arg>-lib=?? <python.interpreter>mpiexec
> : test-foo ;
>
> For the above test, I added "<python.interpreter>mpiexec", which prefixes
> mpiexec on the command line like so:
> mpiexec python foobar.py
>
> This all works properly (at least on linux). The problem is that before
> "mpiexec python foobar.py" is executed, PYTHONPATH is exported to the system
> but for some reason, this exporting does not work when I add
> <python.interpreter>mpiexec. If I remove <python.interpreter>mpiexec, it
> works fine but I need mpiexec in the test.
>
> So to work around this, I added <testing.arg>-lib=?? where ?? will be the
> path of the shared library created by "python-extension foo", but I cant
> seem to get the path in a straightforward manner.
>
> Best Regards,
> Rob
>
>
> On Thu, Jun 12, 2008 at 11:41 AM, Vladimir Prus <ghost_at_[hidden]> wrote:
>
>> On Thursday 12 June 2008 19:51:41 Robert Langlois wrote:
>> > Hi Everyone,
>> >
>> > How can I get the build path of a target? For example, say I create a
>> > target:
>> >
>> > python-extension test-lib ;
>> >
>> > This file ends up in the following path:
>> > bin/programs/learn/python/gcc-4.0.2/debug/threading-multi
>> >
>> > I wanted to know if there is a rule that already exists to get this path
>> in
>> > a platform independent way.
>> >
>> > The reason I need this path is that I am trying to prefix the python
>> > interpretor with another command (mpiexec) and the PYTHONPATH
>> environment
>> > variable is nullified in some way when I do this. So, I propose to pass
>> the
>> > path of the shared file to a python script to get around this problem.
>>
>> Your email is a little bit obscure as to what you're trying to do. To
>> answer
>> your question -- during Jamfile parsing, it's not possible to get the path
>> of the target, because you cna build your project with 10 different
>> property
>> sets. Inside a generator, you have a specific property set, and can get a
>> path for a target (see virtual-target.path method). Inside an rule/action
>> pair you also can get a path to the target.
>>
>> I suggest you describe your use-case more concretely.
>>
>> - Volodya
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>>
>
>
>
> --
> Robert Langlois

-- 
Robert Langlois, Ph.D.
Instructor/PostDoc
University of Illinois at Chicago
Department of Bioengineering
Bioinformatics Program
835 S. Wolcott,
Suite W103
Room 164B, M/C 563
Chicago, IL 60612-7340
(312) 996-6514
ezra_at_[hidden]


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