Skip to content

Commit f58882e

Browse files
committed
Merge pull request #1 from boegel/gc3pie
flesh out ideas to restructure --job support to add GC3Pie backend
2 parents f862853 + 263621e commit f58882e

6 files changed

Lines changed: 67 additions & 4 deletions

File tree

easybuild/tools/job/__init__.py

Whitespace-only changes.

easybuild/tools/job/gc3pie.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
##
2+
# Copyright 2015-2015 Ghent University
3+
#
4+
# This file is part of EasyBuild,
5+
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6+
# with support of Ghent University (http://ugent.be/hpc),
7+
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
8+
# the Hercules foundation (http://www.herculesstichting.be/in_English)
9+
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10+
#
11+
# http://github.com/hpcugent/easybuild
12+
#
13+
# EasyBuild is free software: you can redistribute it and/or modify
14+
# it under the terms of the GNU General Public License as published by
15+
# the Free Software Foundation v2.
16+
#
17+
# EasyBuild is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
24+
##
25+
"""Interface for submitting jobs via gc3pie"""
26+
27+
from easybuild.tools.job.job import Job
28+
29+
30+
# eb --job=GC3Pie
31+
class GC3Pie(Job):
32+
pass

easybuild/tools/job/job.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
##
2+
# Copyright 2015-2015 Ghent University
3+
#
4+
# This file is part of EasyBuild,
5+
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6+
# with support of Ghent University (http://ugent.be/hpc),
7+
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
8+
# the Hercules foundation (http://www.herculesstichting.be/in_English)
9+
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10+
#
11+
# http://github.com/hpcugent/easybuild
12+
#
13+
# EasyBuild is free software: you can redistribute it and/or modify
14+
# it under the terms of the GNU General Public License as published by
15+
# the Free Software Foundation v2.
16+
#
17+
# EasyBuild is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
24+
##
25+
"""Abstract interface for submitting jobs"""
26+
27+
28+
class Job(object):
29+
pass
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import time
3636
from vsc.utils import fancylogger
3737

38+
from easybuild.tools.job.job import Job
39+
3840

3941
_log = fancylogger.getLogger('pbs_job', fname=False)
4042

@@ -122,7 +124,7 @@ def make_job(self, script, name, env_vars=None, resources={}):
122124
conn=self.conn, ppn=self.ppn)
123125

124126

125-
class PbsJob(object):
127+
class Pbs_python(Job):
126128
"""Interaction with TORQUE"""
127129

128130
def __init__(self, script, name, env_vars=None, resources={}, conn=None, ppn=None):

easybuild/tools/parallelbuild.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from easybuild.tools.build_log import EasyBuildError
4343
from easybuild.tools.config import get_repository, get_repositorypath
4444
from easybuild.tools.module_naming_scheme.utilities import det_full_ec_version
45-
from easybuild.tools.pbs_job import PbsJobFactory
45+
from easybuild.tools.job.job import job_factory
4646
#from easybuild.tools.gc3pie_job import GC3PieJobFactory
4747
from easybuild.tools.repository.repository import init_repository
4848
from vsc.utils import fancylogger
@@ -78,7 +78,7 @@ def build_easyconfigs_in_parallel(backend, build_command, easyconfigs, output_di
7878

7979
assert backend in _job_submission_backends
8080
try:
81-
job_factory = _job_submission_backends[backend]()
81+
job_factory = GC3PieFactory() #job_factory()
8282
job_factory.connect_to_server()
8383
except RuntimeError, err:
8484
_log.error("connection to server failed (%s: %s), can't submit jobs."

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def find_rel_test():
7272
"easybuild", "easybuild.framework", "easybuild.framework.easyconfig", "easybuild.framework.easyconfig.format",
7373
"easybuild.toolchains", "easybuild.toolchains.compiler", "easybuild.toolchains.mpi",
7474
"easybuild.toolchains.fft", "easybuild.toolchains.linalg", "easybuild.tools", "easybuild.tools.deprecated",
75-
"easybuild.tools.toolchain", "easybuild.tools.module_naming_scheme", "easybuild.tools.repository",
75+
"easybuild.tools.job", "easybuild.tools.toolchain", "easybuild.tools.module_naming_scheme", "easybuild.tools.repository",
7676
"test.framework", "test",
7777
"vsc", "vsc.utils",
7878
]

0 commit comments

Comments
 (0)