Hi Ward,
> Op 28 okt. 2015, om 15:01 heeft Ward Poelmans <[email protected]> het
> volgende geschreven:
>
> On 28-10-15 14:36, Backeljauw Franky wrote:
>> Hello all,
>>
>> Just a small question: in several Easyblock files there are tests for mpi,
>> as in:
>>
>> if self.toolchain.options.get('usempi', None):
>>
>> This actually implies that you don’t have to specify “usempi:True” in your
>> Easyconfig since it is implied to be the default.
>>
>> In other words: does Easybuild build with mpi as a default? (That is, unless
>> you explicitly specify “usempi:False” in your Easyconfig file?)
>
> If you don't specify anything, `usempi` will be False and $CC and
> friends will be set to the compiler directly. If you put `usempi` to
> True, they will be set to mpicc etc.
>
> So by default EB does not use mpi and hence the if's in the easyblocks.
So do I get it right that EB explicitly sets ‘usempi: False’ somewhere?
Let’s look at the Easyblock for MUMPS (mumps.py), this contains:
# pick a Makefile.inc template based on compiler family and MPI enabled
if self.toolchain.options.get('usempi', None):
make_inc_suff = 'PAR'
else:
make_inc_suff = 'SEQ'
If EB would not set `usempi:False` explicitly, then the test get(‘usempi’,None)
results in None which implies True so the parallel build will be made :-(
If on the other hand EB explicitly sets ‘usempi:False’, then wouldn’t it be
better to change this test to “if self.toolchain.options[‘usempi’] = False”
instead?
Furthermore, is there a check to make sure ‘usempi’ is either False or True (or
None)?
— Regards,
Franky