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 | |
budget_and_quota | Displays the CPU time budget and the file system quotas |
full_quota | Displays the used resources and quota of all directories which are accessible for a user |
sw-info | Displays information about the installed software, particullarly how the SPACK packages have been compiled. Usage: sw-info [-lfisaS] [name|/HASH|module] module load spack |
NODEMEM.mpi | Reports the available memory of the nodes in a batch job. |
Placement of processes and threads | |
cpuset_query | Returns information about the topology, number of core and CPU on which a process can run |
get_cpuset_mask | Returns a string of 0's and 1's indicating on which (logical) CPUs a process can run Returns the host, CPU-Id and the mask |
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 |
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 | |
sq | SLURM queue and partition status sq [-aCrvx] [-c list] [-S sortkey1,sortkey2,...] [[-F] Filter] |
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 | |
I_MPI | Displays sorted list of the current settings of the Intel MPI Environment |
Back and Archive | |
pdsmc | pdsmc - A helper tool for enabling parallel tape retrievals |
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 getpid (void) INTER GETPID | Returns the process ID |
int gettid (void) INTER GETTID | Returns the thread ID |
int where_do_i_run(void); INTEGER WHERE_DO_I_RUN() | Returns the physical CPU ID where the task/thread is running |
double dwalltime() Double dcputime() REAL(KIND=8) DWALLTIME() REAL(KIND=8) DCPUTIME() | Returns the wallclock time/cputime spent between first and current call to the routine |
MEMUSAGE(avail, used, free, buffers, cached) void memusage(size_t *avail, size_t *used, size_t *free, size_t *buffers, size_t *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 place_task_(int cpu[],int *n); INTEGER CPU(N) PLACE_TASK(CPU,N) | Sets the mask, that the current task will run on the physical CPUs contained in the array CPU. |
void(place_all_tasks(int *debug) LOGICAL DEBUG PLACE_ALL_TASKS(DEBUG) | 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 DEBUG is TRUE or 1 then information about the placement is output. |
void place_task_(int cpu[],int *n); INTEGER CPU(N) PLACE_TASK(CPU,N) | Sets the mask, that the current task will run on the physical CPUs contained in the array CPU. |
void placementinfo() PLACEMENTINFO() | Outputs information about the placement of tasks and threads. Programs written in C must link with (Intel) fortran: |