Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions tools/test_distributed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,24 @@ export HPX_COMMANDLINE_OPTIONS="--hpx:threads=2"

# Run the executable twice
rm -f *.csv
ls
echo "Starting.."
OMP_NUM_THREADS=1 "$mpi_executable" -np 1 "$hard_executable" "$config_file" $additional_args
echo "Mid..."
# rename before getting overwritten by next command
mv output-*-0-00002.csv r1.csv
ls
OMP_NUM_THREADS=1 "$mpi_executable" -np 16 "$hard_executable" "$config_file" $additional_args
ls


# Stitch together 16 csv outputs to 1 (mp.csv)
> mp.csv

for i in {0..15}; do
# Exclude header and first 3 columns
sed '1d;/^$/d' "output-1D-${i}-00002.csv" | awk 'BEGIN {FS="\t"; OFS="\t"} {print $4, $5, $6, $7}' >> mp.csv
sed '1d;/^$/d' "output-1D-${i}-00002.csv" | awk 'BEGIN {FS=","; OFS=","} {print $4, $5, $6, $7}' >> mp.csv
done

# Create a temporary version of r1.csv excluding the header lines
sed '1d;/^$/d' r1.csv | awk 'BEGIN {FS="\t"; OFS="\t"} {print $4, $5, $6, $7}' > r1_temp.csv
sed '1d;/^$/d' r1.csv | awk 'BEGIN {FS=","; OFS=","} {print $4, $5, $6, $7}' > r1_temp.csv

set +e
diff mp.csv r1_temp.csv > /dev/null
Expand All @@ -44,12 +41,12 @@ if [ $exit_status -eq 0 ]; then
else
echo "Files are different."
set +e
diff mp.csv r1_temp.csv
diff -u mp.csv r1_temp.csv
set -e
fi

# Clean up temporary files
rm *.csv
rm -f *.csv

# Exit with the status from diff (0 for no differences, 1 for differences)
exit $exit_status
Loading