mismatch betwen information of partition nodes at compendium and real slurm cfg.
At the following pages the information about which nodes belongs to which partition doesn't match the actual configuration of the system.
https://doc.zih.tu-dresden.de/jobs_and_resources/hardware_overview/#island-4-to-6-intel-haswell-cpus
https://doc.zih.tu-dresden.de/jobs_and_resources/partitions_and_limits/#memory-limits
For instance, nodes: taurusi[6541-6558] are at haswell256, not at haswell64
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
added Content New label
Consider to create and deploy an process building the partition and limits table
- Author Maintainer
WIP, It shows the partition name and the amount of nodes only.
Example:
sh bin/gentable.sh alpha query: alpha ------------------------ Partition: alpha Nodes: taurusi[8003-8034] Total nodes in partition: 32 ---- Partition: alpha-interactive Nodes: taurusi[8001-8002] Total nodes in partition: 2 ----
#!/bin/bash function show_nodes(){ for line in ${PARTITIONS[@]}; do [ ! -z $DEBUG ] && echo "$line" PARTITION_NAME=$(echo $line | awk '{print $1}' ) NODES=$(echo $line | awk '{print $2}' ) NNODES=$(echo $line | awk '{print $3}' ) NCPUS=$(echo $line | awk '{print $4}' ) echo "Partition: $PARTITION_NAME" echo "Nodes: $NODES" echo "Total nodes: $NNODES - Total CPUs: $NCPUS" done } function s_info(){ # get partition name, total nodes, totalCPUs and node list AWK_CMD='/^PartitionName='$QUERY'/ {print $1"\n "$28" "$27"\n "$18"\n"}' if [ ! -z $file_name ]; then IFS=$'^\n' \ PARTITIONS=( $(awk "$AWK_CMD" RS= $file_name | awk -F"=| |\n" '{print $2" "$10" "$5" "$7}' RS=) ) else IFS=$'^\n' \ PARTITIONS=( $(scontrol show part | awk "$AWK_CMD" RS= | awk -F"=| |\n" '{print $2" "$10" "$5" "$7}' RS=) ) fi for line in ${PARTITIONS[@]}; do PARTITION_NAME=$(echo $line | awk '{print $1}' ) sinfo -p $PARTITION_NAME -h -o "%R %N %D %c %e %m %G" # CPU_PER_NODE=$(sinfo -p $PARTITION_NAME --noheader -o %c) done } function count_nodes(){ # get partition name, total nodes, totalCPUs and node list AWK_CMD='/^PartitionName='$QUERY'/ {print $1"\n "$28" "$27"\n "$18"\n"}' if [ ! -z $file_name ]; then IFS=$'^\n' \ PARTITIONS=( $(awk "$AWK_CMD" RS= $file_name | awk -F"=| |\n" '{print $2" "$10" "$5" "$7}' RS=) ) else IFS=$'^\n' \ PARTITIONS=( $(scontrol show part | awk "$AWK_CMD" RS= | awk -F"=| |\n" '{print $2" "$10" "$5" "$7}' RS=) ) fi for line in ${PARTITIONS[@]}; do PARTITION_NAME=$(echo $line | awk '{print $1}' ) NODES=$(echo $line | awk '{print $2}' ) NNODES=$(echo $line | awk '{print $3}' ) NCPUS=$(echo $line | awk '{print $4}' ) CPU_PER_NODE=$(sinfo -p $PARTITION_NAME --noheader -o %c) echo "Partition: $PARTITION_NAME" echo "Nodes: $NODES" # get nodes list in between commas IFS=$' ' \ NODE_LIST="$(echo $NODES | sed 's/,\([^{0-9}]\)/ \1/g')" NODE_LIST=( $NODE_LIST ) if [ ! -z $verbose ]; then echo " node list size: ${#NODE_LIST[@]}" fi nnodes_part=0 for node in ${NODE_LIST[@]}; do node_name=$(echo $node | sed 's/\[.*\]//' ) node_range="$(echo $node | grep -o "[0-9,-]*" | sed 's/,/ /g')" # this doesn't work well cos get's nodes names with number # node_range="$(echo $node | grep -o "\[[0-9,-]*\]" | sed -e 's/\[\|\]//g' -e 's/,/ /g')" node_range=( $node_range ) if [ ! -z $verbose ]; then echo " - nodes: $node" echo " - node name: $node_name range: ${node_range[@]} - ${#node_range[@]}" fi total_nodes=1 if [ ${#node_range[@]} -gt 0 ]; then total_nodes=0 # count the amount of nodes in the ranges for range in ${node_range[@]}; do sum_nodes=1 range_0=$(echo $range | awk -F- '{print $1}') range_n=$(echo $range | awk -F- '{print $2}') sum_nodes=$(( sum_nodes + ( $range_n - $range_0 ))) if [ ! -z $DEBUG ]; then echo " - $range = $sum_nodes" fi total_nodes=$(( total_nodes + sum_nodes )) done node_test="$node_name$range_0" else node_test="$node_name" fi if [ ! -z $verbose ]; then echo " Total nodes: $total_nodes" fi nnodes_part=$(( $nnodes_part + total_nodes )) done echo "Total nodes in partition: $nnodes_part" #sinfo -p $PARTITION_NAME --noheader -O Partition,CPUs,MaxCPUsPerNode,Memory,Gres echo ---- done } help() { echo "get slurm partition information." echo echo "Syntax: $(basename $0) [-h|-f|v] [partition-name]" echo "options:" echo "-h Print this Help." echo "-v be verbose." echo "-f use file <file_name>" echo } while getopts "hvf:" option; do case $option in h) help exit 0 ;; f) file_name=$OPTARG ;; v) echo "verbose" verbose=1 ;; \?) echo "Error: Invalid option" exit 1 ;; esac done shift $((OPTIND-1)) if [ "$#" -gt "1" ]; then echo "Error: query should be one string" exit 1 fi QUERY=$@ if [ ! -z "$QUERY" ]; then echo "query: $QUERY" fi if [ ! -z $file_name ]; then echo "using file: $file_name" if [ ! -f $file_name ]; then echo "no such file $file_name" exit 1 fi fi echo "------------------------" #show_nodes count_nodes $QUERY #s_info
- Danny Marc Rotscher mentioned in merge request !736 (merged)
mentioned in merge request !736 (merged)
Resolved as we now create partitions table from Slurm.
- Martin Schroschk closed
closed
Please register or sign in to reply