Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Mar 12, 2024
2 parents af740f7 + a8f6990 commit 9dfd3fe
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 35 deletions.
7 changes: 5 additions & 2 deletions mcmc/mcmc_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,18 @@ def run_mcmc(
# Count the cores in the processor
# (-1 if this chip also has a coordinator)
n_cores = chip.n_placable_processors
if chip.ip_address is None:
n_cores -= FecDataView.get_all_monitor_cores()
else:
n_cores -= FecDataView.get_ethernet_monitor_cores()
if (chip.x, chip.y) in coordinators:
n_cores -= 3 # coordinator and extra_monitor_support (2)
n_cores -= 1 # coordinator
if (model.root_finder):
if (model.cholesky):
n_cores = n_cores // 3
else:
n_cores = n_cores // 2
else:
n_cores -= 1 # just extra_monitor_support
if (model.root_finder):
if (model.cholesky):
n_cores = n_cores // 3
Expand Down
58 changes: 25 additions & 33 deletions mcmc_integration_tests/test_scripts.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# Copyright (c) 2019 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# https://www.apache.org/licenses/LICENSE-2.0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from spinnaker_testbase import ScriptChecker
from unittest import SkipTest # pylint: disable=unused-import


class TestScripts(ScriptChecker):
Expand All @@ -29,32 +27,26 @@ class TestScripts(ScriptChecker):
"""
# flake8: noqa

def test_mcmc_examples_lighthouse_lighthouse_float_model(self):
raise SkipTest("Not a run script")
self.check_script("mcmc_examples/lighthouse/lighthouse_float_model.py")
def test_mcmc_examples_arma_arma(self):
self.check_script("mcmc_examples/arma/arma.py")

def test_mcmc_examples_lighthouse_lighthouse(self):
self.check_script("mcmc_examples/lighthouse/lighthouse.py")
# Not testing file due to: Not a run script
# mcmc_examples/arma/arma_float_model.py

def test_mcmc_examples_lighthouse_lighthouse_fixed_point_model(self):
raise SkipTest("Not a run script")
self.check_script("mcmc_examples/lighthouse/lighthouse_fixed_point_model.py")
# Not testing file due to: Not a run script
# mcmc_examples/arma/arma_model.py

def test_mcmc_examples_lighthouse_lighthouse_model(self):
raise SkipTest("Not a run script")
self.check_script("mcmc_examples/lighthouse/lighthouse_model.py")
# Not testing file due to: Not a run script
# mcmc_examples/arma/arma_fixed_point_model.py

def test_mcmc_examples_arma_arma(self):
self.check_script("mcmc_examples/arma/arma.py")
# Not testing file due to: Not a run script
# mcmc_examples/lighthouse/lighthouse_model.py

def test_mcmc_examples_arma_arma_float_model(self):
raise SkipTest("Not a run script")
self.check_script("mcmc_examples/arma/arma_float_model.py")
# Not testing file due to: Not a run script
# mcmc_examples/lighthouse/lighthouse_float_model.py

def test_mcmc_examples_arma_arma_fixed_point_model(self):
raise SkipTest("Not a run script")
self.check_script("mcmc_examples/arma/arma_fixed_point_model.py")
# Not testing file due to: Not a run script
# mcmc_examples/lighthouse/lighthouse_fixed_point_model.py

def test_mcmc_examples_arma_arma_model(self):
raise SkipTest("Not a run script")
self.check_script("mcmc_examples/arma/arma_model.py")
def test_mcmc_examples_lighthouse_lighthouse(self):
self.check_script("mcmc_examples/lighthouse/lighthouse.py")

0 comments on commit 9dfd3fe

Please sign in to comment.