Commit e4e51f35 authored by Ramon Nou's avatar Ramon Nou
Browse files

new parallel

parent 3d7335cb
Loading
Loading
Loading
Loading
Loading
+41 −4
Original line number Diff line number Diff line
@@ -27,10 +27,47 @@
# SPDX-License-Identifier: GPL-3.0-or-later                                    #
################################################################################

# optimal $GKFS_FIND_PROCESS is $GKFS_SERVERS+1 as we align servers and find processes if the $NUM_NODES are the same
# Output is saved to a file, so it can be processed by io500
srun --nvram-options=1LM:1980 -N $NUM_NODES -n $GKFS_FIND_PROCESS --export=ALL,PSM2_DEVICES=self,hfi,shm,PSM2_MULTIRAIL=1,PSM2_MULTI_EP=0,LD_PRELOAD=${GKFS_PRLD} -o find_${SLURM_JOB_ID}.txt $GKFS_FIND $@ -M $GKFS_MNT -S $GKFS_SERVERS
tail -n1 find_${SLURM_JOB_ID}.txt


NUM_NODES=10
GKFS_FIND_PROCESS=10
GKFS_SERVERS=200
GKFS_FIND=~/ADMIRE/iodeps/bin/sfind

srun -N $NUM_NODES -n $GKFS_FIND_PROCESS --overlap --overcommit --mem=0 --oversubscribe --export=ALL,LD_PRELOAD=${GKFS} $GKFS_FIND $@ -M $GKFS_MNT -S $GKFS_SERVERS


# Initialize total counters
total_found=0
total_checked=0

# Check if any result files exist
if ! ls gfind_results.rank-*.txt 1> /dev/null 2>&1; then
    echo "No result files found (gfind_results.rank-*.txt)."
    exit 1
fi

# Loop through all result files
for file in gfind_results.rank-*.txt; do
    # Read the line "MATCHED found/checked" from the file
    # and extract the numbers.
    read -r _ found_str checked_str < "$file"
    
    # Use cut to handle the "found/checked" format
    found=$(echo "$found_str" | cut -d'/' -f1)
    checked=$(echo "$checked_str") # this will be the same as found_str's second part
    
    # Bash arithmetic to add to totals
    total_found=$((total_found + found))
    total_checked=$((total_checked + checked))
done

# Print the final aggregated result
echo "MATCHED ${total_found}/${total_checked}"

# Optional: Clean up the intermediate files
# Uncomment the line below if you want to automatically remove the partial results
rm gfind_results.rank-*.txt
exit 0

+117 −344

File changed.

Preview size limit exceeded, changes collapsed.