Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions compass/landice/tests/antarctica/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def __init__(self, test_case):
The test case this step belongs to

"""
super().__init__(test_case=test_case, name='mesh', cpus_per_task=128,
min_cpus_per_task=1)
super().__init__(test_case=test_case, name='mesh')

self.mesh_filename = 'Antarctica.nc'
self.add_output_file(filename='graph.info')
Expand All @@ -52,6 +51,13 @@ def __init__(self, test_case):

# no setup() method is needed

def constrain_resources(self, available_resources):
Comment thread
trhille marked this conversation as resolved.
Outdated
"""
Update ``cpus_per_task`` to use all available cores
"""
super().constrain_resources(available_resources)
self.cpus_per_task = available_resources['cores']

def run(self):
"""
Run this step of the test case
Expand Down
10 changes: 8 additions & 2 deletions compass/landice/tests/crane/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def __init__(self, test_case):
test_case : compass.TestCase
The test case this step belongs to
"""
super().__init__(test_case=test_case, name='mesh', cpus_per_task=128,
min_cpus_per_task=1)
super().__init__(test_case=test_case, name='mesh')

self.add_output_file(filename='graph.info')
self.add_output_file(filename='Crane.nc')
Expand All @@ -39,6 +38,13 @@ def __init__(self, test_case):

# no setup() method is needed

def constrain_resources(self, available_resources):
"""
Update ``cpus_per_task`` to use all available cores
"""
super().constrain_resources(available_resources)
self.cpus_per_task = available_resources['cores']

def run(self):
"""
Run this step of the test case
Expand Down
10 changes: 8 additions & 2 deletions compass/landice/tests/greenland/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def __init__(self, test_case):
The test case this step belongs to

"""
super().__init__(test_case=test_case, name='mesh', cpus_per_task=128,
min_cpus_per_task=1)
super().__init__(test_case=test_case, name='mesh')

# output files
self.mesh_filename = 'GIS.nc'
Expand Down Expand Up @@ -64,6 +63,13 @@ def setup(self):
target=geojson_filename,
database=None)

def constrain_resources(self, available_resources):
"""
Update ``cpus_per_task`` to use all available cores
"""
super().constrain_resources(available_resources)
self.cpus_per_task = available_resources['cores']

def run(self):
"""
Run this step of the test case
Expand Down
10 changes: 8 additions & 2 deletions compass/landice/tests/humboldt/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def __init__(self, test_case):
mesh_type : str
The resolution or mesh type of the test case
"""
super().__init__(test_case=test_case, name='mesh', cpus_per_task=128,
min_cpus_per_task=1)
super().__init__(test_case=test_case, name='mesh')

self.add_output_file(filename='graph.info')
self.add_output_file(filename='Humboldt.nc')
Expand All @@ -49,6 +48,13 @@ def __init__(self, test_case):

# no setup() method is needed

def constrain_resources(self, available_resources):
"""
Update ``cpus_per_task`` to use all available cores
"""
super().constrain_resources(available_resources)
self.cpus_per_task = available_resources['cores']

def run(self):
"""
Run this step of the test case
Expand Down
10 changes: 8 additions & 2 deletions compass/landice/tests/kangerlussuaq/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def __init__(self, test_case):
mesh_type : str
The resolution or mesh type of the test case
"""
super().__init__(test_case=test_case, name='mesh', cpus_per_task=128,
min_cpus_per_task=1)
super().__init__(test_case=test_case, name='mesh')

self.add_output_file(filename='graph.info')
self.add_output_file(filename='Kangerlussuaq.nc')
Expand All @@ -50,6 +49,13 @@ def __init__(self, test_case):

# no setup() method is needed

def constrain_resources(self, available_resources):
"""
Update ``cpus_per_task`` to use all available cores
"""
super().constrain_resources(available_resources)
self.cpus_per_task = available_resources['cores']

def run(self):
"""
Run this step of the test case
Expand Down
10 changes: 8 additions & 2 deletions compass/landice/tests/koge_bugt_s/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def __init__(self, test_case):
mesh_type : str
The resolution or mesh type of the test case
"""
super().__init__(test_case=test_case, name='mesh', cpus_per_task=128,
min_cpus_per_task=1)
super().__init__(test_case=test_case, name='mesh')

self.add_output_file(filename='graph.info')
self.add_output_file(filename='Koge_Bugt_S.nc')
Expand All @@ -50,6 +49,13 @@ def __init__(self, test_case):

# no setup() method is needed

def constrain_resources(self, available_resources):
"""
Update ``cpus_per_task`` to use all available cores
"""
super().constrain_resources(available_resources)
self.cpus_per_task = available_resources['cores']

def run(self):
"""
Run this step of the test case
Expand Down
10 changes: 8 additions & 2 deletions compass/landice/tests/thwaites/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def __init__(self, test_case):
test_case : compass.TestCase
The test case this step belongs to
"""
super().__init__(test_case=test_case, name='mesh', cpus_per_task=128,
min_cpus_per_task=1)
super().__init__(test_case=test_case, name='mesh')

self.add_output_file(filename='graph.info')
self.add_output_file(filename='Thwaites.nc')
Expand All @@ -39,6 +38,13 @@ def __init__(self, test_case):

# no setup() method is needed

def constrain_resources(self, available_resources):
"""
Update ``cpus_per_task`` to use all available cores
"""
super().constrain_resources(available_resources)
self.cpus_per_task = available_resources['cores']

def run(self):
"""
Run this step of the test case
Expand Down