From d4f6bbc9ca2aa7047491532107b09c8dedf245e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=96=87=E5=B0=A7?= <2794580162@qq.com> Date: Fri, 15 Aug 2025 10:09:51 +0800 Subject: [PATCH 1/2] stream --- templates/stream/main/stream.arm.config | 43 ++++++++++--------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/templates/stream/main/stream.arm.config b/templates/stream/main/stream.arm.config index 248a33e0..59b45aeb 100644 --- a/templates/stream/main/stream.arm.config +++ b/templates/stream/main/stream.arm.config @@ -12,6 +12,7 @@ module load bisheng/2.5.0 export CC=`which clang` export CXX=`which clang++` export FC=`which flang` +rm -rf STREAM-master if [ ! -d "STREAM-master" ]; then unzip ./downloads/STREAM.zip fi @@ -32,39 +33,29 @@ binary_dir = $STREAM_HOME case_dir = $STREAM_HOME [BUILD] -cat << \EOF > Makefile -CC = clang -CFLAGS = -O3 -fopenmp -mcpu=tsv110 -mllvm -unroll-count=2 +cat /dev/null > Makefile +echo 'CC = clang' >> Makefile +echo '#CFLAGS = -O2 -fopenmp' >> Makefile +echo 'CFLAGS = -O2 -ftree-vectorize -fopenmp -DSTREAM_ARRAY_SIZE=96000000 -DNTIMES=100 -mcmodel=large' >> Makefile +echo '#FC = gfortran' >> Makefile +echo '#FFLAGS = -O2 -fopenmp' >> Makefile +echo 'all: stream_c.exe' >> Makefile +printf 'stream_f.exe: stream.f mysecond.o\n\t$(CC) $(CFLAGS) -c mysecond.c\n\t$(FC) $(FFLAGS) -c stream.f\n\t$(FC) $(FFLAGS) stream.o mysecond.o -o stream_f.exe\n' | sed -i '6r/dev/stdin' Makefile +printf 'stream_c.exe: stream.c\n\t$(CC) $(CFLAGS) stream.c -o stream_c.exe\n'| sed -i '10r /dev/stdin' Makefile +printf 'clean:\n\trm -f stream_f.exe stream_c.exe *.o\n'| sed -i '12r /dev/stdin' Makefile +echo '# an example of a more complex build line for the Intel icc compiler' >> Makefile +printf 'stream.icc: stream.c\n\ticc -O3 -xCORE-AVX2 -ffreestanding -qopenmp -DSTREAM_ARRAY_SIZE=80000000 -DNTIMES=20 stream.c -o stream.omp.AVX2.80M.20x.icc\n'| sed -i '15r /dev/stdin' Makefile -FC = flang -FFLAGS = -O2 -fopenmp +make -all: stream_f.exe stream_c.exe - -stream_f.exe: stream.f mysecond.o - $(CC) $(CFLAGS) -c mysecond.c - $(FC) $(FFLAGS) -c stream.f - $(FC) $(FFLAGS) stream.o mysecond.o -o stream_f.exe - -stream_c.exe: stream.c - $(CC) $(CFLAGS) stream.c -o stream_c.exe - -clean: - rm -f stream_f.exe stream_c.exe *.o -EOF -# high-throughput mode -# tuned-adm profile throughput-performance -# close transparent hugepage -# echo never > /sys/kernel/mm/transparent_hugepage/enabled -# echo never > /sys/kernel/mm/transparent_hugepage/defrag -make stream_c.exe > compiler.log +export OMP_NUM_THREADS=36 [CLEAN] make clean [RUN] run = -binary = stream_c.exe 2>&1 >> stream.output.log +binary = ./stream_c.exe 2>&1 >> stream.output.log nodes = 1 [BATCH] @@ -73,4 +64,4 @@ do echo 3 > /proc/sys/vm/drop_caches export OMP_NUM_THREADS=$core_num ./stream_c.exe >> stream.output.log -done \ No newline at end of file +done -- Gitee From ef5c76410b23db62ee7dbeb9a5a019616f7ceb94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=96=87=E5=B0=A7?= <2794580162@qq.com> Date: Fri, 15 Aug 2025 10:23:07 +0800 Subject: [PATCH 2/2] stream --- templates/stream/main/stream.arm.config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/stream/main/stream.arm.config b/templates/stream/main/stream.arm.config index 59b45aeb..b6a2fece 100644 --- a/templates/stream/main/stream.arm.config +++ b/templates/stream/main/stream.arm.config @@ -19,8 +19,11 @@ fi [ENV] module purge -module use /hpcrunner/software/modulefiles +module use ./software/modulefiles module load bisheng/2.5.0 +export CC=`which clang` +export CXX=`which clang++` +export FC=`which flang` export STREAM_HOME=$JARVIS_ROOT/STREAM-master export OMP_PROC_BIND=true export OMP_NUM_THREADS=1 -- Gitee