Add function input to decide number of cpus to run with
This commit is contained in:
@@ -42,6 +42,11 @@ class FunctionInputs(AutomateBase):
|
||||
title="Wind Speed",
|
||||
description="Wind speed (m/s) in XY plane."
|
||||
)
|
||||
number_of_cpus: int = Field(
|
||||
title="Number of CPUs",
|
||||
description="Number of CPUs to run simulation parallelly.",
|
||||
default=4,
|
||||
)
|
||||
|
||||
|
||||
def automate_function(
|
||||
@@ -99,7 +104,7 @@ def automate_function(
|
||||
|
||||
# Get case folder
|
||||
case_folder = os.path.join(archaea_folder, version_root_object.id)
|
||||
domain.create_case(case_folder)
|
||||
domain.create_case(case_folder, function_inputs.number_of_cpus)
|
||||
cmd_path = os.path.join(case_folder, './Allrun')
|
||||
cmd = "/bin/bash -c '{cmd_path}'".format(cmd_path=cmd_path)
|
||||
|
||||
|
||||
Generated
+4
-4
@@ -60,13 +60,13 @@ numpy-stl = ">=3.0.0,<4.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "archaea-simulation"
|
||||
version = "1.1.23"
|
||||
version = "1.1.26"
|
||||
description = "Wrapper definitions for simulation tools."
|
||||
optional = false
|
||||
python-versions = ">=3.10,<4.0"
|
||||
files = [
|
||||
{file = "archaea_simulation-1.1.23-py3-none-any.whl", hash = "sha256:b3a70cfc9d11042928e68eea91efb3fbdb2c3fe061f3f49819331a99d1b68a80"},
|
||||
{file = "archaea_simulation-1.1.23.tar.gz", hash = "sha256:4473e718d108b6296aa068d8d66441bcf32710df9d93f3a40285e5d54499b6bc"},
|
||||
{file = "archaea_simulation-1.1.26-py3-none-any.whl", hash = "sha256:1ca1133ee9c9e84f6b63a3678b2d83b6b2ac497d48f1a488f08e32d98ad2c04d"},
|
||||
{file = "archaea_simulation-1.1.26.tar.gz", hash = "sha256:752ca8a6a13bfef740bcc3c3431ed6c40d1e1178b625f25b3f9d5401fb86ff4e"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@@ -1867,4 +1867,4 @@ multidict = ">=4.0"
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "465530c90036645d2549cf61af86e3a6bd3707fc872c59709bc125c44073a8b0"
|
||||
content-hash = "4261d221953c8791636c93698ba53d39135afb3e0f44e063b35fb95987caf73a"
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ packages = [{include = "src/speckle_automate_py"}]
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
specklepy = "2.17.8"
|
||||
archaea-simulation = "1.1.23"
|
||||
archaea-simulation = "1.1.26"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
black = "^23.3.0"
|
||||
|
||||
Reference in New Issue
Block a user