mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
parsec: more details, fix errors, more tests
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
config BR2_PACKAGE_PARSEC_BENCHMARK
|
||||
bool "PARSEC_BENCHMARK"
|
||||
# Parsec shell scripts use a hardcoded /bin/bash
|
||||
# One option would be to try and use /bin/sh.
|
||||
# But symlinking fails because of BusyBox' symlink mechanism.
|
||||
# The other option would be to patch Parsec to use /bin/sh and be POSIX compliant.
|
||||
# But let's take the path of smallest resistance for now.
|
||||
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
select BR2_PACKAGE_BASH
|
||||
help
|
||||
Parsec system benchmark.
|
||||
|
||||
@@ -20,6 +13,31 @@ config BR2_PACKAGE_PARSEC_BENCHMARK_BUILD_LIST
|
||||
help
|
||||
Space separated list of parsec packages to build.
|
||||
|
||||
config BR2_PACKAGE_PARSEC_BENCHMARK_PARSECMGMT
|
||||
bool "parsecmgmt"
|
||||
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
select BR2_PACKAGE_BASH
|
||||
help
|
||||
# Needed if you want to run the full parsec benchmark inside the guest.
|
||||
#
|
||||
# Parsec shell scripts use a hardcoded /bin/bash
|
||||
#
|
||||
# One option would be to try and use /bin/sh.
|
||||
# But symlinking fails because of BusyBox' symlink mechanism.
|
||||
# The other option would be to patch Parsec to use /bin/sh and be POSIX compliant.
|
||||
# But let's take the path of smallest resistance for now.
|
||||
#
|
||||
# This is a bit coarse and makes the image larger with useless source code.
|
||||
#
|
||||
# But according to du, the source accounts for only 1/5 of the total size,
|
||||
# so benchmarks dominate, and it doesn't matter much.
|
||||
#
|
||||
# Also it is not so critical for simulators anyways unlike real embedded systems.
|
||||
#
|
||||
# One possibility to make this better may be to install only the 'inst/' and 'input/'
|
||||
# folders for each package + toplevel '/bin/' and '/config/', but of course we won't
|
||||
# know if this works until time consuming testing is done :-)
|
||||
|
||||
config BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE
|
||||
string "input_size"
|
||||
default test
|
||||
|
||||
@@ -23,33 +23,29 @@ define PARSEC_BENCHMARK_BUILD_CMDS
|
||||
export TARGET_CROSS='$(TARGET_CROSS)'; \
|
||||
export HOSTTYPE='$(BR2_ARCH)'; \
|
||||
parsecmgmt -a build -p $$pkg; \
|
||||
parsecmgmt -a run -p $$pkg -i $(BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE); \
|
||||
if [ ! '$(BR2_PACKAGE_PARSEC_BENCHMARK_PARSECMGMT)' = y ]; then \
|
||||
parsecmgmt -a run -p $$pkg -i $(BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE); \
|
||||
fi \
|
||||
done
|
||||
endef
|
||||
|
||||
define PARSEC_BENCHMARK_INSTALL_TARGET_CMDS
|
||||
# This is a bit coarse and makes the image larger with useless source code.
|
||||
#
|
||||
# But according to du, the source accounts for only 1/5 of the total size,
|
||||
# so benchmarks dominate, and it doesn't matter much.
|
||||
#
|
||||
# Also it is not so critical for simulators anyways unlike real embedded systems.
|
||||
#
|
||||
# One possibility to make this better may be to install only the 'inst/' and 'input/'
|
||||
# folders for each package + toplevel '/bin/' and '/config/', but of course we won't
|
||||
# know if this works until time consuming testing is done :-)
|
||||
mkdir -p '$(TARGET_DIR)/parsec/'
|
||||
|
||||
$(INSTALL) -D -m 0755 '$(PARSEC_BENCHMARK_PKGDIR)/test.sh' '$(TARGET_DIR)/parsec/'
|
||||
|
||||
rsync -am $(if $(filter $(V),1),-v,) --include '*/' \
|
||||
--include '/bin/***' \
|
||||
--include '/config/***' \
|
||||
--include '/env.sh' \
|
||||
--include 'inst/***' \
|
||||
--include 'run/***' \
|
||||
--exclude '*' '$(@D)/' '$(TARGET_DIR)/parsec/' \
|
||||
;
|
||||
if [ '$(BR2_PACKAGE_PARSEC_BENCHMARK_PARSECMGMT)' = y ]; then \
|
||||
rsync -am $(if $(filter $(V),1),-v,) \
|
||||
--exclude '**/obj/' \
|
||||
--exclude '**/run/' \
|
||||
--exclude '**/src/' \
|
||||
'$(@D)/' '$(TARGET_DIR)/parsec/' \
|
||||
; \
|
||||
else \
|
||||
rsync -am $(if $(filter $(V),1),-v,) --include '*/' \
|
||||
--include 'inst/***' \
|
||||
--include 'run/***' \
|
||||
--exclude '*' '$(@D)/' '$(TARGET_DIR)/parsec/' \
|
||||
; \
|
||||
fi
|
||||
# rsync finished.
|
||||
endef
|
||||
|
||||
|
||||
@@ -8,19 +8,56 @@
|
||||
|
||||
set -ex
|
||||
|
||||
ncpus=1
|
||||
ncpus="${1:-1}"
|
||||
|
||||
## apps
|
||||
|
||||
# TODO segfaulting.
|
||||
#cd /parsec/ext/splash2x/apps/barnes/run
|
||||
#../inst/*/bin/barnes 1 < input_1
|
||||
|
||||
cd /parsec/ext/splash2x/apps/fmm/run
|
||||
../inst/*/bin/fmm "$ncpus" < input_1
|
||||
|
||||
cd /parsec/ext/splash2x/apps/ocean_cp/run
|
||||
../inst/*/bin/ocean_cp -n258 -p"$ncpus" -e1e-07 -r20000 -t28800
|
||||
|
||||
# TODO segfaulting.
|
||||
# cd /parsec/ext/splash2x/apps/ocean_ncp/run
|
||||
# ../inst/*/bin/ocean_ncp -n258 -p"$ncpus" -e1e-07 -r20000 -t28800
|
||||
|
||||
cd /parsec/ext/splash2x/apps/radiosity/run
|
||||
../inst/*/bin/radiosity -bf 1.5e-1 -batch -room -p "$ncpus"
|
||||
|
||||
cd /parsec/ext/splash2x/apps/raytrace/run
|
||||
../inst/*/bin/raytrace -s -p"$ncpus" -a4 teapot.env
|
||||
|
||||
cd /parsec/ext/splash2x/apps/volrend/run
|
||||
../inst/*/bin/volrend "$ncpus" head-scaleddown4 4 < input_1
|
||||
../inst/*/bin/volrend "$ncpus" head-scaleddown4 4
|
||||
|
||||
cd /parsec/ext/splash2x/apps/water_nsquared/run
|
||||
../inst/*/bin/water_nsquared "$ncpus" < input_1
|
||||
|
||||
cd /parsec/ext/splash2x/apps/water_spatial/run
|
||||
../inst/*/bin/water_spatial "$ncpus" < input_1
|
||||
|
||||
## kernels
|
||||
|
||||
cd /parsec/ext/splash2x/kernels/cholesky/run
|
||||
../inst/*/bin/cholesky -p"$ncpus" < tk14.O
|
||||
|
||||
cd /parsec/ext/splash2x/kernels/cholesky/run
|
||||
../inst/*/bin/cholesky "$ncpus" test
|
||||
|
||||
cd /parsec/ext/splash2x/kernels/fft/run
|
||||
../inst/*/bin/fft -m18 -p"$ncpus"
|
||||
|
||||
cd /parsec/ext/splash2x/kernels/lu_cb/run
|
||||
../inst/*/bin/lu_cb -p"$ncpus" -n512 -b16
|
||||
|
||||
cd /parsec/ext/splash2x/kernels/lu_ncb/run
|
||||
../inst/*/bin/lu_ncb -p"$ncpus" -n512 -b16
|
||||
|
||||
# TODO ERROR: Cannot malloc enough memory for global
|
||||
# cd /parsec/ext/splash2x/kernels/radix/run
|
||||
# ../inst/*/bin/radix -p"$ncpus" -r4096 -n262144 -m524288
|
||||
|
||||
Reference in New Issue
Block a user