Package edu.jas.kern
Class MPJEngine
- java.lang.Object
-
- edu.jas.kern.MPJEngine
-
public final class MPJEngine extends java.lang.Object
MPI engine, provides global MPI service. Note: could eventually be done directly with MPI, but provides logging. Usage: To obtain a reference to the MPI service communicator useMPJEngine.getComminicator()
. Once an engine has been created it must be shutdown to exit JAS withMPJEngine.terminate()
.- Author:
- Heinz Kredel
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[]
cmdline
Command line arguments.static java.util.ArrayList<java.lang.String>
hostNames
Hostnames of MPI partners.static java.lang.String
hostSuf
Hostname suffix.(package private) static mpi.Intracomm
mpiComm
MPI communicator engine.static int
N_CPUS
Number of processors.static int
N_THREADS
static boolean
NO_MPI
Flag for MPI usage.static int
TAG
MPI engine base tag number.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static mpi.Comm
getCommunicator()
Get the MPI communicator.static mpi.Comm
getCommunicator(java.lang.String[] args)
Get the MPI communicator.static boolean
isRunning()
Test if a pool is running.static void
setCommandLine(java.lang.String[] args)
Set the commandline.static void
setMPI()
Set MPI usage.static void
setNoMPI()
Set no MPI usage.static void
terminate()
Stop execution.
-
-
-
Field Detail
-
cmdline
protected static java.lang.String[] cmdline
Command line arguments. Required for MPI runtime system.
-
hostNames
public static java.util.ArrayList<java.lang.String> hostNames
Hostnames of MPI partners.
-
NO_MPI
public static boolean NO_MPI
Flag for MPI usage. Note: Only introduced because Google app engine does not support MPI.
-
N_CPUS
public static final int N_CPUS
Number of processors.
-
N_THREADS
public static final int N_THREADS
-
mpiComm
static mpi.Intracomm mpiComm
MPI communicator engine.
-
TAG
public static final int TAG
MPI engine base tag number.- See Also:
- Constant Field Values
-
hostSuf
public static final java.lang.String hostSuf
Hostname suffix.- See Also:
- Constant Field Values
-
-
Method Detail
-
setCommandLine
public static void setCommandLine(java.lang.String[] args)
Set the commandline.- Parameters:
args
- the command line to use for the MPI runtime system.
-
isRunning
public static boolean isRunning()
Test if a pool is running.- Returns:
- true if a thread pool has been started or is running, else false.
-
getCommunicator
public static mpi.Comm getCommunicator() throws java.io.IOException
Get the MPI communicator.- Returns:
- a Communicator constructed for cmdline.
- Throws:
java.io.IOException
-
getCommunicator
public static mpi.Comm getCommunicator(java.lang.String[] args) throws java.io.IOException
Get the MPI communicator.- Parameters:
args
- the command line to use for the MPI runtime system.- Returns:
- a Communicator.
- Throws:
java.io.IOException
-
terminate
public static void terminate()
Stop execution.
-
setNoMPI
public static void setNoMPI()
Set no MPI usage.
-
setMPI
public static void setMPI()
Set MPI usage.
-
-