lrztools and lrzlib on SuperMUC-NG
The tools and library provide liittle helper functions.
LRZ Tools
To get access to the LRZ Tools insert the following command
module load lrztools
The following commands are available
Comand | Purpose, details and usage |
---|---|
Information | |
lrz-budget_and_quota | Displays the CPU time budget and the file system quotas |
lrz-cpufreq | Shows the distribution of cpu frequencies of the node. No arguments needed. |
lrz-full_quota | Displays the used resources and quota of all directories which are accessible for a user |
lrz-one_per_node -m | Reports the available memory of the nodes in a batch job. |
lrz-one_per_node -s | Reports the memory statistics of the nodes in a batch job. |
lrz-ps | Shows selected columns of the ps command, which reflect memory, cpu usage and pinning of processes and threads. |
lrz-snapshot | Shows the available snapshots file or directory. Note, this only works on files and dirs inside your HOME. |
Utilities external to LRZ | |
gdu and ncdu are similar to the `du` command in linux, but with graphical interfaces. | |
CPUINFO | Shows groupings for package, cpu, core, and cache sharing. |
Similar to grep with added functionality | |
Get time spent as User or as System. Use \time to see other metrics. | |
Placement of processes and threads | |
lrz-where_do_i_run | Returns the CPU-ID on which the command was run |
placementtest-mpi.intel placementtest-omp | Returns information how processes and threads are placed on nodes and CPUs. Example: mpiexec -n 5 placementtest-mpi.intel -o 2 |
lrz-mask2hex | converts a binary mask to hex: mask2hex 11111111000000001111111 → FF00FF.can be used for processor lists |
Performance tools | |
gprof-wrapper | for Intel MPI: mpiexec gprof-wrapper ./a.ou t. Output is in: gmon.out.mpi.intel.* |
Batchjobs | |
lrz-sq | SLURM queue and partition status lrz-sq [-aCrvx] [-c list] [-S sortkey1,sortkey2,...] [[-F] Filter] |
lrz-sq-run | Shows selected columns of your jobs submitted to the queue. |
Workflow | |
pexec | Parallel execution of a list of serial tasks. Usage together with Intel-MPI. cmdfile contains the serial command to be executed. cat cmdfile ./mytask <input.$SUBJOB >out.$SUBJOB 2>err.$SUBJOB ./mytask <input.$SUBJOB >out.$SUBJOB 2>err.$SUBJOB ./mytask <input.$SUBJOB >out.$SUBJOB 2>err.$SUBJOB ./another_task <inputx >outputx |
prsync | Generate and execute commands for parallel rsync on many nodes # generate the commands, make the directory structure, rsync the data |
msrsync | Multi-stream rsync on one node #use 48 tasks on one node |
Programming Environment | |
lrz-parallel_env | Displays sorted list of the current settings of the Intel MPI Environment |
LRZ Library
module load lrztools
Contains useful subroutines and functions. Compile with:
- Fortran: mpif90 -nofor-main ... -I $LRZ_INCLUDE ... $LRZLIB_LIB
- C/C++: mpicc ... -I $LRZ_INCLUDE .... $LRZLIB_LIB
Function/Subroutine C and Fortran | Purpose, details and usage |
---|---|
int lrz_getpid(); | Returns the process ID |
int lrz_gettid(); | Returns the thread ID |
int lrz_where_do_i_run(); | Returns the physical CPU ID where the task/thread is running |
double lrz_dwalltime(); double lrz_dcputime(); | Returns the wallclock time/cputime spent between first and current call to the routine |
void lrz_memusage(int *avail, int *used, int *free, int *buffers, int *cached); | Returns in kb
In case your code is written in C++ you have to encapsulate the memusage function header. For that, you have to, after the includes section and before the main function code, add the following preprocessor directive: extern "C" { void memusage(size_t *, size_t *, size_t *, size_t *, size_t *); } |
void lrz_place_task(int cpu[], int *n); | Sets the mask, that the current task will run on the physical CPUs contained in the array CPU. |
void lrz_place_all_tasks(int *idbg); | Places the tasks and thread on particular CPUs, whether by default algorithm or by using the environment variable CPU_MAPPING. Example:CPU_MAPPING=0,2,4,8,10,12 OMP_NUM_THREADS=3 MP_NODES=8 mpiexec -n 16 ./a.outIf idbg is TRUE or 1 then information about the placement is output. |
void lrz_place_info(); | Outputs information about the placement of tasks and threads. Programs written in C must link with (Intel) fortran: |