-
Notifications
You must be signed in to change notification settings - Fork 0
INI Funclets
See the wiki page for funclet examples.
-
&perl()
- Return the stdout of running a perl command -
&shell()
- Return the stdout of running a shell command
-
&sum()
- Return the sum of all parameters -
&multiply()
- Return the product of all parameters -
&squares()
- Return the squares of all parameters -
&log(number, N)
- Return thenumber
,,n
,, -
&pow(base, min, max)
- Return all the powers of a given base frombase
^min
^ tobase
^max
^
-
&ne()
- Return 1 if all the values are not equal, 0 otherwise. If there are no arguments, return 1. -
>()
- Return 1 if the first argument is greater than the second -
&ge()
- Return 1 if the first argument is greater than or equal to the second -
<()
- Return 1 if the first argument is less than the second -
&le()
- Return 1 if the first argument is less than or equal to the second -
&eq()
- Return 1 if all the values are equal, 0 otherwise. If there are no arguments, return 1. -
&and()
- Return 1 if all the values are true, 0 otherwise. If there are no arguments, return 1. -
&or()
- Return 1 if any of the values are true, 0 otherwise. If there are no arguments, return 1.
-
&min()
- Return the minimum value of all parameters -
&max()
- Return the maximum value of all parameters
-
®exp()
- Return 1 if the first arg matches the second arg (the regexp) -
&strstr()
- See PHP documentation for strstr
-
&if()
- If the first argument is true (nonzero), return the 2nd argument. Otherwise, return the 3rd argument.
-
&enumerate()
- Return a reference to all the strings passed in as@_
-
&enumerate_join()
- Return a reference to the catenation of arrays all the strings passed in as@_
. For example: &enumerate_join(&enumerate("a", "b"), &enumerate("c", "d")) results in a list of "a", "b", "c", "d". -
&step()
- First argument is the lower bound, second argument is upper bound, third [optional] argument is the stride (is 1 if not specified). Return a reference to all values starting with$lower
and<=$upper
with the given$stride
. E.g.,&step(3, 10, 2)
returns3
,5
,7
,9
. -
&split()
- Return a reference to all the strings passed in as@_
-
&prepend()
- Prepend a string to a string or an array of strings
-
&stringify()
- Join all the strings passed into one string and return it -
&preg_replace()
- See PHP documentation for preg_replace
-
&test_command_line()
- Return the current np value from a running test. -
&test_np()
- Return the current np value from a running test. -
&test_prefix()
- Return the current prefix value from a running test -
&test_executable()
- Return the current executable value from a running test -
&test_argv()
- Return the current argv (excluding$argv[0]
) from a running test -
&test_mpirun_args()
- Return the current mpirun args from a running test (usually specified in a test run section, similar to&test_argv()
). This funclet is usually used to augmentmpirun
arguments in an MPI Details section -- e.g., if a specific Test Run section (or subset of tests in a Test Run section) need additional arguments tompirun
(vs. additionalargv
to the test iself). -
&test_alloc()
- Return whether the last test run was terminated by a signal -
&test_wifexited()
- Return whether the last test run terminated normally -
&test_wexitstatus()
- Return the exit status from the last test run -
&test_wifsignaled()
- Return whether the last test run was terminated by a signal -
&test_wtermsig()
- Return signal that terminated the last test -
&test_exit_status()
- Return the exit exit_status from the last test run (Deprecated)
Funclets related to the MTT library call, DoCommand.
-
&cmd_wifexited()
- Return whether the lastDoCommand::Cmd[Script]
terminated normally -
&cmd_wexitstatus()
- Return the exit status from the lastDoCommand::Cmd[Script]
-
&cmd_wifsignaled()
- Return whether the lastDoCommand::Cmd[Script]
was terminated by a signal -
&cmd_wtermsig()
- Return whether the lastDoCommand::Cmd[Script]
was terminated by a signal
-
&scratch_root()
- Returns the argument passed to--scratch
-
&cat()
- Return a reference to an array of strings of the contents of a file -
&find_executables()
- Traverse a tree (or a bunch of trees) and return all the executables found -
&find_java_executables()
- Traverse a tree (or a bunch of trees) and return all the Java executables, including extra command line flags necessary to run them (e.g., -classpath foo) -
&find()
- Traverse a tree (or a bunch of trees) and return all the files matching a regexp -
&java_executable()
- Return the extra command line flags necessary to run a Java executable (e.g., &java_executable("basic/Hello") returns "-classpath basic Hello") -
&dirname(str)
- ReturnFile::Basename::dirname(str)
(see perldoc for Basename) -
&basename(str)
- ReturnFile::Basename::basename(str)
(see perldoc for Basename)
-
&env_name()
- Return the name of the run-time enviornment that is being used -
&env_max_procs()
- Find the max procs that we can run with. Check several things in order:- If a global max_np was specified
- Various resource managers
- If a global hostfile was specified
- If a global hostlist was specified
- If none of the above are found, return 2.
-
&env_max_hosts()
- Find the number of hosts that we can run with. Counts the number of unique hosts returned by &env_hosts(). - ''
&rm_max_procs()
- Deprecated name for env_max_procs'' -
&env_hosts()
- Find the hosts that we can run with -
&getenv(str)
- Returns$ENV{str}
-
&have_ini_max_procs()
- Return 1 if we have an "max_procs" setting in the globals in the INI file; 0 otherwise -
&ini_max_procs()
- If we have a hostlist, return its max procs count
-
&have_hostfile()
- Return 1 if we have a hostfile; 0 otherwise -
&hostfile()
- If we have a hostfile, return it. Otherwise, return the empty string. -
&hostfile_max_procs()
- If we have a hostfile, return its max procs count -
&hostfile_hosts()
- If we have a hostfile, return its hosts -
&have_hostlist()
- Return 1 if we have a hostfile; 0 otherwise -
&hostlist()
- If we have a hostlist, return it. Otherwise, return the empty string. This funclet takes an optional string argument. If present, that string will be used as the delimiter between hosts in the returned string. If not present, a comma (",") is used. -
&hostlist_max_procs()
- If we have a hostlist, return its max procs count -
&hostlist_hosts()
- If we have a hostlist, return its hosts. This funclet takes an optional string argument. If present, that string will be used as the delimiter between hosts in the returned string. If not present, a comma (",") is used.
Below are resource manager-specific funclets.
-
&slurm_job()
- Return 1 if MTT is running in a SLURM job; 0 otherwise. -
&slurm_max_procs()
- Otherwise, return 0. If in a SLURM job, return the max number of processes we can run. -
&slurm_hosts()
- If in a SLURM job, return the hosts we can run on. Otherwise, return "".
-
&pbs_job()
- Return 1 if MTT is running in a PBS job; 0 otherwise. -
&pbs_max_procs()
- If in a PBS job, return the max number of processes we can run. Otherwise, return 0. -
&pbs_hosts()
- If in a PBS job, return the hosts we can run on. Otherwise, return "".
-
&n1ge_job()
- Return 1 if MTT is running in a N1GE job; 0 otherwise. -
&n1ge_max_procs()
- If in a N1GE job, return the max number of processes we can run. Otherwise, return 0. -
&n1ge_hosts()
- If in a N1GE job, return the hosts we can run on. Otherwise, return "".
-
&loadleveler_job()
- Return 1 if MTT is running in a Load Leveler job; 0 otherwise. -
&loadleveler_max_procs()
- If in a Load Leveler job, return the max number of processes we can run. Otherwise, return 0. -
&loadleveler_hosts()
- If in a Load Leveler job, return the hosts we can run on. Otherwise, return "".
-
&get_gcc_version()
- Return the version of the GNU C compiler -
&get_icc_version()
- Return the version of the Intel C compiler -
&get_pgcc_version()
- Return the version of the PGI C compiler -
&get_sun_cc_version()
- Return the version of the Sun Studio C compiler -
&get_pathcc_version()
- Return the version of the Pathscale C compiler
-
&get_mpi_install_bitness()
- Return a database-ready bitmapped value. Detect the bitness of the MPI library in this order:- User overridden (CSV of 1 or more valid bitnesses)
- Small test C program (using
void*
) -
/usr/bin/file
command output
-
&get_mpi_install_endian()
- Return an MTTDatabase-ready bitmapped value for endian-ness
-
&weekday_name()
- Return the day of the week -
&weekday_index()
- 0 = Sunday; 1 = Monday; 2 = Tuesday; 3 = Wednesday; 4 = Thursday; 5 = Friday; 6 = Saturday
-
&mpi_get_name()
- Returns the current MPI get section name -
&mpi_install_name()
- Returns the current MPI install section name -
&test_get_name()
- Returns the current Test get section name -
&test_build_name()
- Returns the current Test build section name -
&test_run_name()
- Returns the current Test run section name -
&mpi_details_name()
- Returns the current MPI details section name -
&mpi_details_simple_name()
- Returns the string that follows the:
in the current MPI details section name
-
&OS::Solaris::get_release()
- Return the first line of the/etc/release
file
Below are MPI implementation-specific funclets.
-
&MPI::CrayMPI::get_version()
- Return the version string
-
&MPI::OMPI::find_mpirun_params()
- Return the Open MPImpirun
parameters -
&MPI::OMPI::find_network()
- Return the Open MPI network parameters -
&MPI::OMPI::get_version()
- Return the version string -
&MPI::OMPI::find_bindings()
- Return the language bindings for the Open MPI installation -
&MPI::OMPI::find_bitness()
- Return the bitness (32, 64, or both) for the Open MPI installation
-
&MPI::HPMPI::get_version()
- Return the version string
-
&MPI::IntelMPI::get_version()
- Return the version string
-
&MPI::ScaliMPI::get_version()
- Return the version string
-
&MPI::MPICH2::find_bindings()
- Return the language bindings -
&MPI::MPICH2::find_bitness()
- Return the language bindings -
&MPI::MPICH2::adjust_wrapper()
- Adjust the wrapper compiler
-
&InfiniBand::check_ipoib_connectivity()
- Return 1 if IPoIB connectivity is up
-
&SSH::refresh_known_hosts_file()
- If the~/.ssh/known_hosts
file is stale, overwrite the stale entries with up-to-date ones. CAUTION! Use of this funclet is only advisable in unstable and secure environments (e.g., lab networks).
The below funclets help debugging issues in the INI file.
-
&verbose()
- RunsMTT::Messages::Verbose
-
&debug()
- RunsMTT::Messages::Debug
-
&print()
- Runsprint
-
&null()
- Return something that will be snipped out of the final evaluation