你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Add MPI flag to CLI and API
这个提交包含在:
@@ -31,6 +31,7 @@ args_defaults = {
|
||||
"n": 1,
|
||||
"i": None,
|
||||
"taskfarm": False,
|
||||
"mpi": False,
|
||||
"gpu": None,
|
||||
"opencl": None,
|
||||
"subgrid": False,
|
||||
@@ -62,6 +63,10 @@ help_msg = {
|
||||
" farm, e.g. to create a B-scan with 60 traces and use MPI to farm out each trace. For"
|
||||
" further details see the performance section of the User Guide."
|
||||
),
|
||||
"mpi": (
|
||||
"(bool, opt): Flag to use Message Passing Interface (MPI) to divide the model between MPI"
|
||||
"ranks."
|
||||
),
|
||||
"gpu": (
|
||||
"(list/bool, opt): Flag to use NVIDIA GPU or list of NVIDIA GPU device ID(s) for specific"
|
||||
" GPU card(s)."
|
||||
@@ -98,6 +103,7 @@ def run(
|
||||
n=args_defaults["n"],
|
||||
i=args_defaults["i"],
|
||||
taskfarm=args_defaults["taskfarm"],
|
||||
mpi=args_defaults["mpi"],
|
||||
gpu=args_defaults["gpu"],
|
||||
opencl=args_defaults["opencl"],
|
||||
subgrid=args_defaults["subgrid"],
|
||||
@@ -131,7 +137,9 @@ def run(
|
||||
n to allow individual models to be farmed out using a MPI
|
||||
task farm, e.g. to create a B-scan with 60 traces and use
|
||||
MPI to farm out each trace. For further details see the
|
||||
performance section of the User Guide
|
||||
performance section of the User Guide.
|
||||
mpi: optional boolean flag to use Message Passing Interface
|
||||
(MPI) to divide the model between MPI ranks.
|
||||
gpu: optional list/boolean to use NVIDIA GPU or list of NVIDIA
|
||||
GPU device ID(s) for specific GPU card(s).
|
||||
opencl: optional list/boolean to use OpenCL or list of OpenCL
|
||||
@@ -161,6 +169,7 @@ def run(
|
||||
"n": n,
|
||||
"i": i,
|
||||
"taskfarm": taskfarm,
|
||||
"mpi": mpi,
|
||||
"gpu": gpu,
|
||||
"opencl": opencl,
|
||||
"subgrid": subgrid,
|
||||
@@ -193,6 +202,9 @@ def cli():
|
||||
default=args_defaults["taskfarm"],
|
||||
help=help_msg["taskfarm"],
|
||||
)
|
||||
parser.add_argument(
|
||||
"-mpi", action="store_true", default=args_defaults["mpi"], help=help_msg["mpi"]
|
||||
)
|
||||
parser.add_argument("-gpu", type=int, action="append", nargs="*", help=help_msg["gpu"])
|
||||
parser.add_argument("-opencl", type=int, action="append", nargs="*", help=help_msg["opencl"])
|
||||
parser.add_argument(
|
||||
|
在新工单中引用
屏蔽一个用户