Completed
Pull Request — master (#166)
by
unknown
41s
created

VerifyGrahamCluster.get_arguments()   A

Complexity

Conditions 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
1
import sys
2
3
from verify_slurm_cluster import VerifySlurmCluster, set_defaults
4
5
6
class VerifyGrahamCluster(VerifySlurmCluster):
7
8
    WALLTIME = 60
9
    CORES_PER_NODE = 32
10
    GPUS_PER_NODE = 2
11
12
    def get_arguments(self, **kwargs):
13
14
        set_defaults(
15
            kwargs,
16
            coresPerCommand=1,
17
            gpusPerCommand=0,
18
            walltime=self.WALLTIME,
19
            coresPerNode=self.CORES_PER_NODE,
20
            gpusPerNode=self.GPUS_PER_NODE,
21
            sbatchFlags="--account=rpp-bengioy")
22
23
        return kwargs
24
25
26
if __name__ == "__main__":
27
    verifications = filter(lambda o: not o.startswith("--"), sys.argv[1:])
28
    VerifyGrahamCluster(debug="--debug" in sys.argv[1:],
29
                        no_fork="--no-fork" in sys.argv[1:]).run_verifications(
30
        filtered_by=verifications)
31