-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hpcraink/fsprj2
- Loading branch information
Showing
13 changed files
with
337 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
.../scripts/testscripts/config/test_openFOAM_VirgilioRe22Pr7_Perfomance_2_worker_measurement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# dependencies | ||
test_source_configs=("influxdb" "gcc_mpi" "openfoam_com_2106") | ||
test_source=("${test_openfoam_dir}/etc/bashrc") | ||
test_modules=("compiler/gnu/${test_gcc_version}" "mpi/openmpi/${test_mpi_version}") | ||
test_file_url=("https://bwsyncandshare.kit.edu/s/MQfkypzfHfmZZtM/download VirgilioRe22Pr7_Perfomance.zip") | ||
test_unzip_files=("VirgilioRe22Pr7_Perfomance.zip") | ||
|
||
# libiotrace | ||
test_libiotrace_cmake_options=( | ||
-DALL_WRAPPERS_ACTIVE=OFF | ||
-DENABLE_FILESYSTEM_METADATA=OFF | ||
-DENABLE_OUTPUT=INFLUXDB | ||
-DENABLE_REMOTE_CONTROL=OFF | ||
-DFILENAME_RESOLUTION_ENABLED=OFF | ||
-DLOGGING=OFF | ||
-DLOG_WRAPPER_TIME=OFF | ||
-DREALTIME=ON | ||
-DSENDING=ON | ||
-DWITH_ALLOC=OFF | ||
-DWITH_DL_IO=OFF | ||
-DWITH_MPI_IO=OFF | ||
-DWITH_POSIX_AIO=OFF | ||
-DWITH_POSIX_IO=ON | ||
-DWITH_STD_IO=OFF | ||
) | ||
|
||
# slurm | ||
test_nodes=3 | ||
test_processes_per_worker=40 | ||
export test_processes_per_influxdb=80 | ||
test_mem="249600mb" | ||
test_time="05:00:00" | ||
test_queue_name="multiple_il" | ||
|
||
# test script | ||
test_script="./openFOAM_VirgilioRe22Pr7_Perfomance_measurement.sh" | ||
export test_source_dir="${PWD}/VirgilioRe22Pr7_Perfomance" | ||
export test_source_1="${test_source_dir}/1" | ||
export test_source_constant="${test_source_dir}/constant" | ||
export test_source_system="${test_source_dir}/system" | ||
export test_end_time=1.001 | ||
export test_iterations=20 | ||
# newline separated list of functions to trace | ||
#export IOTRACE_WHITELIST_FUNCTIONS="" | ||
export IOTRACE_WHITELIST_FUNCTIONS=" | ||
read | ||
pread | ||
pread64 | ||
write | ||
pwrite | ||
pwrite64 | ||
readv | ||
writev | ||
preadv | ||
preadv64 | ||
pwritev | ||
pwritev64 | ||
preadv2 | ||
preadv64v2 | ||
pwritev2 | ||
pwritev64v2 | ||
copy_file_range | ||
getline | ||
getdelim | ||
fread | ||
fwrite | ||
fprintf | ||
fwprintf | ||
vfprintf | ||
vfwprintf | ||
fscanf | ||
fwscanf | ||
vfscanf | ||
vfwscanf" | ||
|
||
# output | ||
test_name="3_nodes_VirgilioRe22Pr7_Perfomance" | ||
export IOTRACE_LOG_NAME=openFOAM_VirgilioRe22Pr7_Perfomance_test1 | ||
export performance_data_file=${PWD}/performance_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
.../scripts/testscripts/config/test_openFOAM_VirgilioRe22Pr7_Perfomance_4_worker_measurement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# dependencies | ||
test_source_configs=("influxdb" "gcc_mpi" "openfoam_com_2106") | ||
test_source=("${test_openfoam_dir}/etc/bashrc") | ||
test_modules=("compiler/gnu/${test_gcc_version}" "mpi/openmpi/${test_mpi_version}") | ||
test_file_url=("https://bwsyncandshare.kit.edu/s/MQfkypzfHfmZZtM/download VirgilioRe22Pr7_Perfomance.zip") | ||
test_unzip_files=("VirgilioRe22Pr7_Perfomance.zip") | ||
|
||
# libiotrace | ||
test_libiotrace_cmake_options=( | ||
-DALL_WRAPPERS_ACTIVE=OFF | ||
-DENABLE_FILESYSTEM_METADATA=OFF | ||
-DENABLE_OUTPUT=INFLUXDB | ||
-DENABLE_REMOTE_CONTROL=OFF | ||
-DFILENAME_RESOLUTION_ENABLED=OFF | ||
-DLOGGING=OFF | ||
-DLOG_WRAPPER_TIME=OFF | ||
-DREALTIME=ON | ||
-DSENDING=ON | ||
-DWITH_ALLOC=OFF | ||
-DWITH_DL_IO=OFF | ||
-DWITH_MPI_IO=OFF | ||
-DWITH_POSIX_AIO=OFF | ||
-DWITH_POSIX_IO=ON | ||
-DWITH_STD_IO=OFF | ||
) | ||
|
||
# slurm | ||
test_nodes=5 | ||
test_processes_per_worker=40 | ||
export test_processes_per_influxdb=80 | ||
test_mem="249600mb" | ||
test_time="03:00:00" | ||
test_queue_name="multiple_il" | ||
|
||
# test script | ||
test_script="./openFOAM_VirgilioRe22Pr7_Perfomance_measurement.sh" | ||
export test_source_dir="${PWD}/VirgilioRe22Pr7_Perfomance" | ||
export test_source_1="${test_source_dir}/1" | ||
export test_source_constant="${test_source_dir}/constant" | ||
export test_source_system="${test_source_dir}/system" | ||
export test_end_time=1.001 | ||
export test_iterations=20 | ||
# newline separated list of functions to trace | ||
#export IOTRACE_WHITELIST_FUNCTIONS="" | ||
export IOTRACE_WHITELIST_FUNCTIONS=" | ||
read | ||
pread | ||
pread64 | ||
write | ||
pwrite | ||
pwrite64 | ||
readv | ||
writev | ||
preadv | ||
preadv64 | ||
pwritev | ||
pwritev64 | ||
preadv2 | ||
preadv64v2 | ||
pwritev2 | ||
pwritev64v2 | ||
copy_file_range | ||
getline | ||
getdelim | ||
fread | ||
fwrite | ||
fprintf | ||
fwprintf | ||
vfprintf | ||
vfwprintf | ||
fscanf | ||
fwscanf | ||
vfscanf | ||
vfwscanf" | ||
|
||
# output | ||
test_name="3_nodes_VirgilioRe22Pr7_Perfomance" | ||
export IOTRACE_LOG_NAME=openFOAM_VirgilioRe22Pr7_Perfomance_test1 | ||
export performance_data_file=${PWD}/performance_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
libiotrace/scripts/testscripts/config/test_python_simple_write
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# dependencies | ||
test_source_configs=("influxdb") | ||
|
||
# libiotrace | ||
test_libiotrace_cmake_options=( | ||
-DALL_WRAPPERS_ACTIVE=ON | ||
-DENABLE_FILESYSTEM_METADATA=OFF | ||
-DENABLE_OUTPUT=INFLUXDB | ||
-DENABLE_REMOTE_CONTROL=OFF | ||
-DFILENAME_RESOLUTION_ENABLED=OFF | ||
-DLOGGING=OFF | ||
-DLOG_WRAPPER_TIME=OFF | ||
-DREALTIME=ON | ||
-DSENDING=ON | ||
-DWITH_ALLOC=OFF | ||
-DWITH_DL_IO=OFF | ||
-DWITH_MPI_IO=OFF | ||
-DWITH_POSIX_AIO=OFF | ||
-DWITH_POSIX_IO=ON | ||
-DWITH_STD_IO=OFF | ||
) | ||
|
||
# slurm | ||
test_nodes=2 | ||
test_processes_per_worker=1 | ||
export test_processes_per_influxdb=40 | ||
test_mem="90000mb" | ||
test_time="00:30:00" | ||
test_queue_name="dev_multiple" | ||
|
||
# test script | ||
test_script="./python_simple_write.sh" | ||
|
||
# output | ||
test_name="2_nodes_python_simple_write" | ||
export IOTRACE_LOG_NAME=python_simple_write_test1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
libiotrace/scripts/testscripts/tests/openFOAM_VirgilioRe22Pr7_Perfomance_measurement.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#!/bin/bash | ||
IOTRACE_DATABASE_IP=$1 | ||
MPI_PATH=$(which mpirun) | ||
MPI_PATH="${MPI_PATH%/*}/../lib64/libmpi.so" | ||
IOTRACE_LD_PRELOAD=${MPI_PATH}:${test_libiotrace_so} | ||
IOTRACE_WHITELIST=${3}/${2}/whitelist | ||
|
||
format="\t%E\t%U\t%S\t%D\t%K\t%M" | ||
|
||
PROCESS_COUNT=$(( ${5} * ${6} )) | ||
echo " process count: ${PROCESS_COUNT}" | ||
|
||
# source tutorial run functions | ||
echo " source tutorial run functions" | ||
. $WM_PROJECT_DIR/bin/tools/RunFunctions | ||
|
||
# copy testcase to test directory | ||
echo " copy test case" | ||
rm -rf ${3}/${2} | ||
mkdir -p ${3}/${2} | ||
ln -s ${test_source_1} ${3}/${2}/ | ||
ln -s ${test_source_constant} ${3}/${2}/ | ||
cp -r ${test_source_system} ${3}/${2}/ | ||
|
||
# patch test case | ||
echo " patch test case (use ${PROCESS_COUNT} subdomains with ${PROCESS_COUNT} processes)" | ||
sed -i -r "s:^numberOfSubdomains 280;:numberOfSubdomains ${PROCESS_COUNT};:" "${3}/${2}/system/decomposeParDict" | ||
case ${PROCESS_COUNT} in | ||
4) | ||
SUBDOMAINS="2 2 1" | ||
;; | ||
20) | ||
SUBDOMAINS="20 1 1" | ||
;; | ||
40) | ||
SUBDOMAINS="40 1 1" | ||
;; | ||
80) | ||
SUBDOMAINS="80 1 1" | ||
;; | ||
160) | ||
SUBDOMAINS="160 1 1" | ||
;; | ||
168) | ||
SUBDOMAINS="168 1 1" | ||
;; | ||
320) | ||
SUBDOMAINS="320 1 1" | ||
;; | ||
*) | ||
echo "unknown subdomain count: ${PROCESS_COUNT}" | ||
exit 1 | ||
;; | ||
esac | ||
sed -i -r "s:^ n \(168 1 1\);: n (${SUBDOMAINS});:" "${3}/${2}/system/decomposeParDict" | ||
sed -i -r "s:^SimuEnd\t\t100;:SimuEnd ${test_end_time};:" "${3}/${2}/system/controlDict" | ||
|
||
# prepare whitelist | ||
rm -f $IOTRACE_WHITELIST | ||
# prepare output file | ||
rm -f ${performance_data_file} | ||
echo -e "name\ttest\treal h:m:s\tuser CPU-seconds\tsys CPU-seconds\tavg unshared data kb\tavg data+stack+text kb\tmax kb">>${performance_data_file} | ||
|
||
# define libiotrace and necessary environment variables for use with and without mpirun | ||
LIBIOTRACE_WITH_ENV="IOTRACE_LOG_NAME=$IOTRACE_LOG_NAME IOTRACE_DATABASE_IP=$IOTRACE_DATABASE_IP IOTRACE_DATABASE_PORT=$IOTRACE_INFLUX_PORT IOTRACE_INFLUX_ORGANIZATION=$IOTRACE_INFLUX_ORGANIZATION IOTRACE_INFLUX_BUCKET=$IOTRACE_INFLUX_BUCKET IOTRACE_INFLUX_TOKEN=$IOTRACE_INFLUX_TOKEN IOTRACE_WHITELIST=$IOTRACE_WHITELIST LD_PRELOAD=$IOTRACE_LD_PRELOAD" | ||
MPI_LIBIOTRACE_WITH_ENV="-x "${LIBIOTRACE_WITH_ENV// / -x } | ||
|
||
# start test | ||
echo " start test" | ||
echo " running redistributePar" | ||
#cd ${3}/${2}/ && mpirun -N ${6} -H ${4} -np ${PROCESS_COUNT} ${MPI_LIBIOTRACE_WITH_ENV} redistributePar -decompose -parallel < /dev/null > log.redistributePar 2>&1 | ||
cd ${3}/${2}/ && mpirun -N ${6} -H ${4} -np ${PROCESS_COUNT} redistributePar -decompose -parallel < /dev/null > log.redistributePar 2>&1 | ||
|
||
# test with libiotrace and POSIX functions in whitelist | ||
echo -e "${IOTRACE_WHITELIST_FUNCTIONS}">$IOTRACE_WHITELIST | ||
for ((i = 0; i < test_iterations; i += 1)); do | ||
echo " running buoyantPimpleFoam" | ||
cd ${3}/${2}/ && /usr/bin/time -o ${performance_data_file} -a -f "posix_active\t$i$format" mpirun -N ${6} -H ${4} -np ${PROCESS_COUNT} ${MPI_LIBIOTRACE_WITH_ENV} buoyantPimpleFoam -parallel < /dev/null > log.buoyantPimpleFoam 2>&1 | ||
rm -rf ${3}/${2}/processor[0-9]*/1.* | ||
rm -f log.* | ||
rm -rf postProcessing | ||
done | ||
echo " with libiotrace and active wrapper: done" | ||
|
||
# test with libiotrace and empty whitelist | ||
echo -e "">$IOTRACE_WHITELIST | ||
for ((i = 0; i < test_iterations; i += 1)); do | ||
echo " running buoyantPimpleFoam" | ||
cd ${3}/${2}/ && /usr/bin/time -o ${performance_data_file} -a -f "all_inactive\t$i$format" mpirun -N ${6} -H ${4} -np ${PROCESS_COUNT} ${MPI_LIBIOTRACE_WITH_ENV} buoyantPimpleFoam -parallel < /dev/null > log.buoyantPimpleFoam 2>&1 | ||
rm -rf ${3}/${2}/processor[0-9]*/1.* | ||
rm -f log.* | ||
rm -rf postProcessing | ||
done | ||
echo " with libiotrace and inactive wrapper: done" | ||
|
||
# test without libiotrace | ||
for ((i = 0; i < test_iterations; i += 1)); do | ||
echo " running buoyantPimpleFoam" | ||
cd ${3}/${2}/ && /usr/bin/time -o ${performance_data_file} -a -f "without_libiotrace\t$i$format" mpirun -N ${6} -H ${4} -np ${PROCESS_COUNT} buoyantPimpleFoam -parallel < /dev/null > log.buoyantPimpleFoam 2>&1 | ||
rm -rf ${3}/${2}/processor[0-9]*/1.* | ||
rm -f log.* | ||
rm -rf postProcessing | ||
done | ||
echo " without libiotrace: done" | ||
|
||
rm -f $IOTRACE_WHITELIST |
28 changes: 28 additions & 0 deletions
28
libiotrace/scripts/testscripts/tests/python_simple_write.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
IOTRACE_DATABASE_IP=$1 | ||
IOTRACE_LD_PRELOAD=${test_libiotrace_so} | ||
|
||
# define libiotrace and necessary environment variables | ||
LIBIOTRACE_WITH_ENV="IOTRACE_LOG_NAME=$IOTRACE_LOG_NAME IOTRACE_DATABASE_IP=$IOTRACE_DATABASE_IP IOTRACE_DATABASE_PORT=$IOTRACE_INFLUX_PORT IOTRACE_INFLUX_ORGANIZATION=$IOTRACE_INFLUX_ORGANIZATION IOTRACE_INFLUX_BUCKET=$IOTRACE_INFLUX_BUCKET IOTRACE_INFLUX_TOKEN=$IOTRACE_INFLUX_TOKEN IOTRACE_WHITELIST=$IOTRACE_WHITELIST LD_PRELOAD=$IOTRACE_LD_PRELOAD" | ||
|
||
# start test | ||
echo " start test" | ||
python_script='import os | ||
import time | ||
data_size = 1 << 30 | ||
data_buffer = bytearray(data_size) | ||
start_time = time.time() | ||
with open("output.txt", "wb") as file: | ||
file.write(data_buffer) | ||
end_time = time.time() | ||
os.remove("output.txt") | ||
elapsed_time = end_time - start_time | ||
print(f"Wrote {data_size} bytes to file in {elapsed_time:.4f} seconds.") | ||
' | ||
python3 -c "${python_script}" | ||
env ${LIBIOTRACE_WITH_ENV} python3 -c "${python_script}" |