diff --git a/templates/stream/main/stream.arm.config b/templates/stream/main/stream.arm.config index 248a33e01f93ace28e40e9931068a6f6f86e252c..b6a2fece067a8ac0f9d7d7381b19642baf432086 100644 --- a/templates/stream/main/stream.arm.config +++ b/templates/stream/main/stream.arm.config @@ -12,14 +12,18 @@ 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 [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 @@ -32,39 +36,29 @@ binary_dir = $STREAM_HOME case_dir = $STREAM_HOME [BUILD] -cat << \EOF > Makefile -CC = clang -CFLAGS = -O3 -fopenmp -mcpu=tsv110 -mllvm -unroll-count=2 - -FC = flang -FFLAGS = -O2 -fopenmp - -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 +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 -stream_c.exe: stream.c - $(CC) $(CFLAGS) stream.c -o stream_c.exe +make -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 +67,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