This helper function simplifies the creation and configuration of an
NlmeParallelHost object, which defines the environment for running NLME
jobs.
hostParams(
sharedDirectory,
installationDirectory = Sys.getenv("INSTALLDIR"),
hostName = Sys.info()[["nodename"]],
machineName = "127.0.0.1",
hostType = Sys.info()[["sysname"]],
numCores = 4,
parallelMethod = "LOCAL_MPI",
userName = "",
privateKeyFile = NULL,
userPassword = "",
scriptPath = "",
rLocation = "",
isLocal = TRUE
)An NlmeParallelHost object configured with the specified
parameters.
character. The directory where temporary run folders
are created. Defaults to the current working directory.
character. The directory containing NLME
libraries/scripts. Defaults to the INSTALLDIR environment variable.
character. A display name for the host. Defaults to the
system's network name (from Sys.info()[["nodename"]]).
character. The IP address or network name of the host.
Defaults to "127.0.0.1".
character. The host operating system. Defaults to the
current OS (Sys.info()[["sysname"]]). While "windows" or "linux" are
valid, for remote Linux hosts the following are officially supported:
"RHEL" (for RHEL 8 and 9) and "UBUNTU" (for Ubuntu 22.04 and 24.04).
Specifying one of these values correctly sets the PML_BIN_DIR variable.
numeric. The number of CPU cores to utilize. Defaults to
4.
character. The parallel execution method. Options
include: "None", "Multicore", "LOCAL_MPI", "SGE", "SGE_MPI",
"TORQUE", "TORQUE_MPI", "LSF", "LSF_MPI", "SLURM", "SLURM_MPI".
Defaults to "LOCAL_MPI".
character. The username for remote host authentication.
character. The path to an SSH private key file for
remote authentication. See ssh::ssh_connect() for more details.
character or function. The password or a callback
function for remote authentication. See ssh::ssh_connect() for details.
character. The path to a script to run on a remote host
before the main job starts. Ignored for local runs.
character. The path to the Rscript executable on a
remote host. Ignored for local runs.
logical. Set to TRUE for a local host or FALSE for a
remote host. Defaults to TRUE.
host <- hostParams(sharedDirectory = tempdir(),
parallelMethod = "LOCAL_MPI",
hostName = "Local",
numCores = 4)
Run the code above in your browser using DataLab