From 0f87ef8edb8009209fb687095486128861e09583 Mon Sep 17 00:00:00 2001 From: Sam Hatfield Date: Wed, 12 May 2021 18:48:07 +0900 Subject: [PATCH] Update FFTW benchmark --- fftw_benchmark/Makefile | 11 ++++++++--- fftw_benchmark/README.md | 12 ++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/fftw_benchmark/Makefile b/fftw_benchmark/Makefile index ad84d3a..48eddd6 100644 --- a/fftw_benchmark/Makefile +++ b/fftw_benchmark/Makefile @@ -1,6 +1,5 @@ #=============================================================================== -# Makefile for Lorenz '63 model used for investigating half-precision support on -# Fugaku +# Makefile for FFTW benchmark. # # ECMWF/RIKEN-CCS #=============================================================================== @@ -10,13 +9,19 @@ ifeq ($(FORTCOMP),) FORTCOMP := frtpx endif +# Set optimisation flag to -Kfast if not already set ifeq ($(FORTOPT),) FORTOPT := -Kfast endif +# Link to libfjcrt when compiling on Fugaku +ifeq ($(FORTLIB),) +FORTLIB := -lfjcrt +endif + # Define main target main: main.o - $(FORTCOMP) $(FORTOPT) $(FFTWF_LIB) -o $@ $^ + $(FORTCOMP) $(FORTOPT) $(FFTWF_LIB) $(FORTLIB) -o $@ $^ # Define generic target for Fortran 90 %.o: %.F90 diff --git a/fftw_benchmark/README.md b/fftw_benchmark/README.md index d838ed8..0c9f4a0 100644 --- a/fftw_benchmark/README.md +++ b/fftw_benchmark/README.md @@ -10,11 +10,11 @@ It is based on [this](https://gist.github.com/appleparan/c048c44668ede7ef28ba63c First define the `FFTWF_LIB` environment variable, pointing it to the location of the FFTW library directory. For example, on Fugaku I set ``` -export FFTWF_LIB=-L/vol0004/apps/oss/spack-v0.16/opt/spack/linux-rhel8-a64fx/\ - fj-4.3.1/fftw-3.3.8-b6z4s4rfp5ju6m6pa3zr5a2xpbws7zum/lib\ - -Wl,-rpath,/vol0004/apps/oss/spack-v0.16/opt/spack/linux-rhel8-a64fx/\ - fj-4.3.1/fftw-3.3.8-b6z4s4rfp5ju6m6pa3zr5a2xpbws7zum/lib -lfftw3f +export FFTWF_LIB="-L/vol0004/apps/oss/spack-v0.16/opt/spack/linux-rhel8-a64fx/fj-4.3.1/fujitsu-fftw-master-2irjm2a56j7tahcmggbnde2uxf6gjdml/lib -Wl,-rpath,/vol0004/apps/oss/spack-v0.16/opt/spack/linux-rhel8-a64fx/fj-4.3.1/fujitsu-fftw-master-2irjm2a56j7tahcmggbnde2uxf6gjdml/lib -lfftw3f" ``` +which uses the `fujitsu-fftw` Spack module. + Also if you don't want to use the Fujitsu compiler you must also set the -`FORTCOMP` environment variable to your compiler of choice, and set the -`FORTOPT` environment variable with your optimisation flags. +`FORTCOMP` environment variable to your compiler of choice, set the +`FORTOPT` environment variable with your optimisation flags and set the +`FORTLIB` to the empty string.