Using extension modules

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Using extension modules

Boost - Build mailing list

Hi,

I just merged some GSoC work into Boost.uBLAS. This contains two Boost.Build "extension modules" ("opencl.jam" and "clblas.jam"), which are used in Jamfiles ("using clblas ;", for example in https://github.com/boostorg/ublas/blob/develop/test/opencl/Jamfile).

What is the proper way to

* point `b2` to  find these modules ? (I can of course set BOOST_BUILD_PATH, but I find that not very scalable. Should I ask all Boost users & testers to do that ? Isn't there a way to set this programmatically, from within the project's Jamfile ?)

* add a way to deal with the case where the modules aren't found. Right now `./b2` will abort with an error. I'd prefer to print a warning and then skip the parts that require it.


Thanks,


Stefan
--

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Using extension modules

Boost - Build mailing list
AMDG

On 10/29/2018 08:46 AM, Stefan Seefeld via Boost-build wrote:

>
> I just merged some GSoC work into Boost.uBLAS. This contains two
> Boost.Build "extension modules" ("opencl.jam" and "clblas.jam"), which
> are used in Jamfiles ("using clblas ;", for example in
> https://github.com/boostorg/ublas/blob/develop/test/opencl/Jamfile).
>
> What is the proper way to
>
> * point `b2` to  find these modules ? (I can of course set
> BOOST_BUILD_PATH, but I find that not very scalable. Should I ask all
> Boost users & testers to do that ? Isn't there a way to set this
> programmatically, from within the project's Jamfile ?)
>

using path/to/clblas ;
should work in the Jamfile.

There's no way to make `using clblas ;` in user-config.jam
work automatically because of the order of initialization.

> * add a way to deal with the case where the modules aren't found. Right
> now `./b2` will abort with an error. I'd prefer to print a warning and
> then skip the parts that require it.
>
I'm not sure that this is a good idea in general.
Since you're providing the modules, you should
always be able to find them.

Note: This would be easy if only Jam had exceptions...

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Using extension modules

Boost - Build mailing list
On 10/29/18 7:57 PM, Steven Watanabe via Boost-build wrote:
AMDG

On 10/29/2018 08:46 AM, Stefan Seefeld via Boost-build wrote:
I just merged some GSoC work into Boost.uBLAS. This contains two
Boost.Build "extension modules" ("opencl.jam" and "clblas.jam"), which
are used in Jamfiles ("using clblas ;", for example in
https://github.com/boostorg/ublas/blob/develop/test/opencl/Jamfile).

What is the proper way to

* point `b2` to  find these modules ? (I can of course set
BOOST_BUILD_PATH, but I find that not very scalable. Should I ask all
Boost users & testers to do that ? Isn't there a way to set this
programmatically, from within the project's Jamfile ?)

using path/to/clblas ;
should work in the Jamfile.


I tried

```
using ../../opencl ;
using ../../clblas ;

```

in test/opencl/Jamfile, which results in the error

ERROR: rule "../../opencl.init" unknown in module "toolset".

What am I doing wrong ?



Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Using extension modules

Boost - Build mailing list
AMDG

On 10/29/2018 09:51 PM, Stefan Seefeld via Boost-build wrote:

>
> I tried
>
> ```
> using ../../opencl ;
> using ../../clblas ;
>
> ```
>
> in test/opencl/Jamfile, which results in the error
>
> ERROR: rule "../../opencl.init" unknown in module "toolset".
>
> What am I doing wrong ?
>

Oh, I see.  It probably should work, but doesn't.
(`using` fails to strip off the path component when
calculating the module name.)

Try this as a workaround:
import ../../opencl ;
using opencl ;

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Using extension modules

Boost - Build mailing list
On 10/30/18 12:16 AM, Steven Watanabe via Boost-build wrote:
AMDG

On 10/29/2018 09:51 PM, Stefan Seefeld via Boost-build wrote:
I tried

```
using ../../opencl ;
using ../../clblas ;

```

in test/opencl/Jamfile, which results in the error

ERROR: rule "../../opencl.init" unknown in module "toolset".

What am I doing wrong ?

Oh, I see.  It probably should work, but doesn't.
(`using` fails to strip off the path component when
calculating the module name.)

OK. Should I file a bug report for this ?


Try this as a workaround:
import ../../opencl ;
using opencl ;

That works, thanks !

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build