File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff 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' )()
You can’t perform that action at this time.
0 commit comments