Data type definition for Lua miscellaneous functions module in the Lua API
Function definitions for Lua miscellaneous functions module in the Lua API
startProgram(Exec)
Start an executable in a new thread
Direction | Data type(s) |
Input Parameter |
Exec | String containing the executable and its options |
|
Returns | PID of newly created thread |
checkProgram()
Check if the executable is running
Direction | Data type(s) |
Input Parameter | None |
Returns | True/False |
killProgram(PID)
Kill the executable with SIGTERM
Direction | Data type(s) |
Input Parameter |
PID | PID to send the SIGTERM signal |
|
Returns | None |
waitpid(PID)
Wait until the state of the program referenced by PID has a changed state. Blocking.
Direction | Data type(s) |
Input Parameter |
|
Returns | None |
catchSignal()
Add signal handler for SIGINT
Direction | Data type(s) |
Input Parameter | None |
Returns | None |
getSignalState()
Check whether SIGINT signal was received
Direction | Data type(s) |
Input Parameter | None |
Returns | Amount of received SIGINT signals |
setenv(Name, Value)
Set environment variable. Lua only provides getenv()
Direction | Data type(s) |
Input Parameter |
Name | Name of environment variable |
Value | Value for the environment variable |
|
Returns | None |
getpid()
Get the PID of the current process
Direction | Data type(s) |
Input Parameter | None |
Returns | PID number |
access(Filepath, perm)
Check the file existance for a given filepath
Direction | Data type(s) |
Input Parameter |
Filepath | Name of Filepath to check |
perm | Check for specified attribute
r: read, w: write, x: executable, e: existance |
|
Returns | PID number |
msr_available()
Check whether the msr files are available. Basically checks whether the msr kernel module is loaded properly
Direction | Data type(s) |
Input Parameter | None |
Returns | True/False |
gethostname()
Returns the hostname of the system in short format
Direction | Data type(s) |
Input Parameter | None |
Returns |
Hostname | Hostname in short format |
|
getjid()
Returns the job ID if running in a batch environment. Basically reads the PBS_JOBID
environment variable
Direction | Data type(s) |
Input Parameter | None |
Returns |
Job ID | Job ID or 'X' if not in batch environment |
|
getMPIrank()
Returns the MPI rank of the current process. Basically read the PMI_RANK
and OMPI_COMM_WORLD_RANK
environment variables
Direction | Data type(s) |
Input Parameter | None |
Returns |
MPI Rank | MPI rank or 'X' if not in MPI environment |
|
*/
/*!