Skip to content

Commit bad02c0

Browse files
committed
fix(Server.PyFR): Save number of GPUs in launch config
This is needed by PyFR workflow
1 parent f844289 commit bad02c0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

server/taskflows/hpccloud/taskflow/pyfr.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ def setup_input(task, *args, **kwargs):
295295

296296
# If we are running in the cloud determine backend to use
297297
if kwargs['cluster']['type'] == 'ec2':
298-
machine_spec = kwargs.get('machine')
299298
# If we have GPUs use cuda
300-
if int(machine_spec['gpu']) == 1:
299+
gpu = parse('cluster.config.launch.gpu').find(kwargs)
300+
if gpu and int(gpu[0].value) > 1:
301301
backend = {
302302
'type': 'cuda',
303303
'device-id': 'round-robin'

server/taskflows/hpccloud/taskflow/utility/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def create_ec2_cluster(task, cluster, profile, ami):
5050
'master_instance_ami': ami,
5151
'node_instance_count': nodeCount,
5252
'node_instance_type': machine_type,
53-
'node_instance_ami': ami
53+
'node_instance_ami': ami,
54+
'gpu': cluster['machine']['gpu']
5455
}
5556
provision_spec = 'gridengine/site'
5657
provision_params = {

0 commit comments

Comments
 (0)