Skip to content

Commit b7672e7

Browse files
committed
fix comments
1 parent ce0f5a5 commit b7672e7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

cscs-checks/apps/spark/spark_check.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ def __init__(self):
1212
self.descr = 'Simple calculation of pi with Spark'
1313
self.valid_systems = ['daint:gpu', 'daint:mc',
1414
'dom:gpu', 'dom:mc']
15-
self.valid_prog_environs = ['PrgEnv-cray']
15+
self.valid_prog_environs = ['PrgEnv-gnu']
1616
self.modules = ['Spark']
1717
self.sourcesdir = None
18-
self.variables = {
19-
'SPARK_WORKER_CORES': '36',
20-
'SPARK_LOCAL_DIRS': '"/tmp"',
21-
}
2218
# `SPARK_CONF` needs to be defined after running `start-all.sh`.
2319
self.pre_run = [
2420
'start-all.sh',
@@ -41,6 +37,15 @@ def __init__(self):
4137

4238
def setup(self, partition, environ, **job_opts):
4339
super().setup(partition, environ, **job_opts)
40+
if partition.name == 'gpu':
41+
num_workers = 12
42+
else:
43+
num_workers = 36
44+
45+
self.variables = {
46+
'SPARK_WORKER_CORES': '%s' % num_workers,
47+
'SPARK_LOCAL_DIRS': '"/tmp"',
48+
}
4449
# The job launcher has to be changed since the `start_analytics`
4550
# script is not used with srun.
4651
self.job.launcher = getlauncher('local')()

0 commit comments

Comments
 (0)