Skip to content

Commit

Permalink
Add CPUs per task metadata default and port
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Feb 18, 2024
1 parent 0ab36f4 commit d38f89c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/coulomb_blockade/tester.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,19 @@
"source": [
"h, m, s = 1, 0, 0\n",
"\n",
"NPROCS = 1\n",
"OMP_NUM_THREADS = 1\n",
"NUMBA_NUM_THREADS = NPROCS\n",
"NODES = 1\n",
"TASKS_PER_NODE = 1\n",
"CPUS_PER_TASK = 1\n",
"OMP_NUM_THREADS = CPUS_PER_TASK\n",
"NUMBA_NUM_THREADS = CPUS_PER_TASK * TASKS_PER_NODE\n",
"\n",
"metadata = {\n",
" \"options\": {\n",
" \"withmpi\": False,\n",
" \"withmpi\": True,\n",
" \"resources\": {\n",
" \"num_machines\": 1,\n",
" \"num_mpiprocs_per_machine\": NPROCS,\n",
" \"num_machines\": NODES,\n",
" \"num_mpiprocs_per_machine\": TASKS_PER_NODE,\n",
" \"num_cores_per_mpiprocs\": CPUS_PER_TASK,\n",
" },\n",
" \"max_wallclock_seconds\": h * 3600 + m * 60 + s,\n",
" \"environment_variables\": {\n",
Expand Down
1 change: 1 addition & 0 deletions src/aiida_quantum_transport/calculations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def define(cls, spec: CalcJobProcessSpec) -> None:
"metadata.options.resources": lambda: {
"num_machines": 1,
"num_mpiprocs_per_machine": 1,
"num_cores_per_mpiprocs": 1,
},
}

Expand Down

0 comments on commit d38f89c

Please sign in to comment.