Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion easybuild/framework/easyconfig/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
BUILD],
'hidden': [False, "Install module file as 'hidden' by prefixing its version with '.'", BUILD],
'installopts': ['', 'Extra options for installation', BUILD],
'maxparallel': [None, 'Max degree of parallelism', BUILD],
'maxparallel': [16, 'Max degree of parallelism', BUILD],
'module_only': [False, 'Only generate module file', BUILD],
'parallel': [None, ('Degree of parallelism for e.g. make (default: based on the number of '
'cores, active cpuset and restrictions in ulimit)'), BUILD],
Expand Down
12 changes: 6 additions & 6 deletions test/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,7 @@ def test_parallel(self):

handle, toy_ec1 = tempfile.mkstemp(prefix='easyblock_test_file_', suffix='.eb')
os.close(handle)
write_file(toy_ec1, toytxt + "\nparallel = 123")
write_file(toy_ec1, toytxt + "\nparallel = 13")

handle, toy_ec2 = tempfile.mkstemp(prefix='easyblock_test_file_', suffix='.eb')
os.close(handle)
Expand All @@ -2202,7 +2202,7 @@ def test_parallel(self):
# only 'parallel' easyconfig parameter specified (no 'parallel' build option)
test_eb = EasyBlock(EasyConfig(toy_ec1))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 123)
self.assertEqual(test_eb.cfg['parallel'], 13)

# both 'parallel' and 'maxparallel' easyconfig parameters specified (no 'parallel' build option)
test_eb = EasyBlock(EasyConfig(toy_ec2))
Expand All @@ -2215,20 +2215,20 @@ def test_parallel(self):
self.assertEqual(test_eb.cfg['parallel'], False)

# only 'parallel' build option specified
init_config(build_options={'parallel': '97', 'validate': False})
init_config(build_options={'parallel': '9', 'validate': False})
test_eb = EasyBlock(EasyConfig(toy_ec))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 97)
self.assertEqual(test_eb.cfg['parallel'], 9)

# both 'parallel' build option and easyconfig parameter specified (no 'maxparallel')
test_eb = EasyBlock(EasyConfig(toy_ec1))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 97)
self.assertEqual(test_eb.cfg['parallel'], 9)

# both 'parallel' and 'maxparallel' easyconfig parameters specified + 'parallel' build option
test_eb = EasyBlock(EasyConfig(toy_ec2))
test_eb.check_readiness_step()
self.assertEqual(test_eb.cfg['parallel'], 67)
self.assertEqual(test_eb.cfg['parallel'], 9)

# make sure 'parallel = False' is not overriden (with 'parallel' build option)
test_eb = EasyBlock(EasyConfig(toy_ec3))
Expand Down
4 changes: 2 additions & 2 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -3476,7 +3476,7 @@ def test_template_constant_dict(self):
except AttributeError:
pass # Ignore if not present
orig_get_avail_core_count = st.get_avail_core_count
st.get_avail_core_count = lambda: 42
st.get_avail_core_count = lambda: 12

# also check template values after running check_readiness_step (which runs set_parallel)
eb = EasyBlock(ec)
Expand All @@ -3487,7 +3487,7 @@ def test_template_constant_dict(self):

res = template_constant_dict(ec)
res.pop('arch')
expected['parallel'] = 42
expected['parallel'] = 12
self.assertEqual(res, expected)

toy_ec = os.path.join(test_ecs_dir, 't', 'toy', 'toy-0.0-deps.eb')
Expand Down