diff --git a/CMakeLists.txt b/CMakeLists.txt index 298f830af..020604be3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,7 +299,13 @@ if (ENABLE_QUAD_PRECISION) set (BENCHFFT_QUAD TRUE) set (PREC_SUFFIX q) endif () -set (fftw3_lib fftw3${PREC_SUFFIX}) + +set (FORT_SUFFIX) +if (ENABLE_LINKFORTRAN) + set (FORT_SUFFIX _fortran) +endif () + +set (fftw3_lib fftw3${PREC_SUFFIX}${FORT_SUFFIX}) configure_file (cmake.config.h.in config.h @ONLY) include_directories (${CMAKE_CURRENT_BINARY_DIR}) @@ -411,24 +417,24 @@ set (exec_prefix ${CMAKE_INSTALL_PREFIX}) set (libdir ${CMAKE_INSTALL_FULL_LIBDIR}) set (includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) set (VERSION ${FFTW_VERSION}) -configure_file (fftw.pc.in fftw3${PREC_SUFFIX}.pc @ONLY) +configure_file (fftw.pc.in fftw3${PREC_SUFFIX}${FORT_SUFFIX}.pc @ONLY) install (FILES - ${CMAKE_CURRENT_BINARY_DIR}/fftw3${PREC_SUFFIX}.pc + ${CMAKE_CURRENT_BINARY_DIR}/fftw3${PREC_SUFFIX}${FORT_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT Development) # cmake file set (FFTW3_LIBRARIES "FFTW3::${fftw3_lib}") -configure_file (FFTW3Config.cmake.in FFTW3${PREC_SUFFIX}Config.cmake @ONLY) -configure_file (FFTW3ConfigVersion.cmake.in FFTW3${PREC_SUFFIX}ConfigVersion.cmake @ONLY) +configure_file (FFTW3Config.cmake.in FFTW3${PREC_SUFFIX}${FORT_SUFFIX}Config.cmake @ONLY) +configure_file (FFTW3ConfigVersion.cmake.in FFTW3${PREC_SUFFIX}${FORT_SUFFIX}ConfigVersion.cmake @ONLY) install (FILES - ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}Config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}ConfigVersion.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX} + ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}${FORT_SUFFIX}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}${FORT_SUFFIX}ConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX}${FORT_SUFFIX} COMPONENT Development) export (TARGETS ${fftw3_lib} NAMESPACE FFTW3:: FILE ${PROJECT_BINARY_DIR}/FFTW3LibraryDepends.cmake) install(EXPORT FFTW3LibraryDepends NAMESPACE FFTW3:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX}${FORT_SUFFIX} COMPONENT Development) diff --git a/FFTW3Config.cmake.in b/FFTW3Config.cmake.in index 6b1fbc2e1..98f77d8be 100644 --- a/FFTW3Config.cmake.in +++ b/FFTW3Config.cmake.in @@ -6,9 +6,9 @@ endif () # Allows loading FFTW3 settings from another project set (FFTW3_CONFIG_FILE "${CMAKE_CURRENT_LIST_FILE}") -set (FFTW3@PREC_SUFFIX@_LIBRARIES fftw3@PREC_SUFFIX@) -set (FFTW3@PREC_SUFFIX@_LIBRARY_DIRS @CMAKE_INSTALL_FULL_LIBDIR@) -set (FFTW3@PREC_SUFFIX@_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@) +set (FFTW3@PREC_SUFFIX@@FORT_SUFFIX@_LIBRARIES fftw3@PREC_SUFFIX@@FORT_SUFFIX@) +set (FFTW3@PREC_SUFFIX@@FORT_SUFFIX@_LIBRARY_DIRS @CMAKE_INSTALL_FULL_LIBDIR@) +set (FFTW3@PREC_SUFFIX@@FORT_SUFFIX@_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@) include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3LibraryDepends.cmake") diff --git a/Makefile.am b/Makefile.am index b16a7b369..9cf30450c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,7 @@ #=============================================================================== OPTIONS_AUTOMAKE=gnu -lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@.la +lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@@FORT_SUFFIX@.la # pkgincludedir = $(includedir)/fftw3@PREC_SUFFIX@ # nodist_pkginclude_HEADERS = config.h @@ -25,7 +25,7 @@ lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@.la # recompile genfft if maintainer mode is true if MAINTAINER_MODE GENFFT = genfft -EXTRA_libfftw3@PREC_SUFFIX@_la_DEPENDENCIES = assert-shared-version-info +EXTRA_libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_la_DEPENDENCIES = assert-shared-version-info else GENFFT = endif @@ -129,13 +129,13 @@ endif if THREADS if COMBINED_THREADS -COMBINED_THREADLIBS=threads/libfftw3@PREC_SUFFIX@_threads.la +COMBINED_THREADLIBS=threads/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads.la endif endif -libfftw3@PREC_SUFFIX@_la_SOURCES = +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_la_SOURCES = -libfftw3@PREC_SUFFIX@_la_LIBADD = \ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_la_LIBADD = \ kernel/libkernel.la \ dft/libdft.la \ dft/scalar/libdft_scalar.la \ @@ -155,38 +155,39 @@ libfftw3@PREC_SUFFIX@_la_LIBADD = \ if QUAD # cannot use -no-undefined since dependent on libquadmath -libfftw3@PREC_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ $(ENVIRONMENT_LIBFFTW3_LDFLAGS) +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ $(ENVIRONMENT_LIBFFTW3_LDFLAGS) else -libfftw3@PREC_SUFFIX@_la_LDFLAGS = -no-undefined -version-info \ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_la_LDFLAGS = -no-undefined -version-info \ @SHARED_VERSION_INFO@ $(ENVIRONMENT_LIBFFTW3_LDFLAGS) endif -fftw3@PREC_SUFFIX@.pc: fftw.pc - cp -f fftw.pc fftw3@PREC_SUFFIX@.pc +fftw3@PREC_SUFFIX@@FORT_SUFFIX@.pc: fftw.pc + cp -f fftw.pc fftw3@PREC_SUFFIX@@FORT_SUFFIX@.pc pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = fftw3@PREC_SUFFIX@.pc +pkgconfig_DATA = fftw3@PREC_SUFFIX@@FORT_SUFFIX@.pc -FFTW3@PREC_SUFFIX@Config.cmake: $(top_srcdir)/FFTW3Config.cmake.in +FFTW3@PREC_SUFFIX@@FORT_SUFFIX@Config.cmake: $(top_srcdir)/FFTW3Config.cmake.in $(SED) \ -e 's|[@]PREC_SUFFIX@|@PREC_SUFFIX@|g' \ + -e 's|[@]FORT_SUFFIX@|@FORT_SUFFIX@|g' \ -e 's|[@]CMAKE_INSTALL_FULL_LIBDIR@|$(libdir)|g' \ -e 's|[@]CMAKE_INSTALL_FULL_INCLUDEDIR@|$(includedir)|g' \ $(top_srcdir)/FFTW3Config.cmake.in > $@ -FFTW3@PREC_SUFFIX@ConfigVersion.cmake: $(top_srcdir)/FFTW3ConfigVersion.cmake.in +FFTW3@PREC_SUFFIX@@FORT_SUFFIX@ConfigVersion.cmake: $(top_srcdir)/FFTW3ConfigVersion.cmake.in $(SED) \ -e 's|[@]FFTW_VERSION@|@PACKAGE_VERSION@|g' \ $(top_srcdir)/FFTW3ConfigVersion.cmake.in > $@ cmakedir = $(libdir)/cmake/fftw3 -cmake_DATA = FFTW3@PREC_SUFFIX@Config.cmake FFTW3@PREC_SUFFIX@ConfigVersion.cmake +cmake_DATA = FFTW3@PREC_SUFFIX@@FORT_SUFFIX@Config.cmake FFTW3@PREC_SUFFIX@@FORT_SUFFIX@ConfigVersion.cmake WISDOM_DIR = /etc/fftw -WISDOM = wisdom@PREC_SUFFIX@ +WISDOM = wisdom@PREC_SUFFIX@@FORT_SUFFIX@ WISDOM_TIME=12 # default to 12-hour limit, i.e. overnight WISDOM_FLAGS=--verbose --canonical --time-limit=$(WISDOM_TIME) wisdom: - tools/fftw@PREC_SUFFIX@-wisdom -o $@ $(WISDOM_FLAGS) + tools/fftw@PREC_SUFFIX@@FORT_SUFFIX@-wisdom -o $@ $(WISDOM_FLAGS) install-wisdom: wisdom $(mkinstalldirs) $(WISDOM_DIR) diff --git a/README.md b/README.md index fc1d12ebe..a9b77db07 100644 --- a/README.md +++ b/README.md @@ -36,25 +36,30 @@ $ autoreconf --verbose --install --symlink --force ## Building FFTW3 +### Notice +* To create a library for fortran, specify `--enable-linkfortran` at configure, + if the compiler option -Nclang is specified in the environment variable for + compile command or in the compilation profile file. + ### Single precision * Native compilation using Fujitsu compiler (AArch64 target). ``` -$ ./configure \ - CC="fcc" \ - F77="frt" \ - CFLAGS='-Nclang -Ofast' \ - FFLAGS='-Kfast' \ - --enable-sve \ - --enable-armv8-cntvct-el0 \ - --enable-float \ - --enable-fma \ - --enable-fortran \ - --enable-openmp \ - --enable-shared \ - --prefix="$INSTALL_PATH" \ - --libdir="$INSTALL_PATH/lib64" \ - ac_cv_prog_f77_v='-###' \ +$ ./configure \ + CC="fcc" \ + F77="frt" \ + CFLAGS='-Nclang -Ofast -ffj-no-fast-matmul' \ + FFLAGS='-Kfast' \ + --enable-sve \ + --enable-armv8-cntvct-el0 \ + --enable-float \ + --enable-fma \ + --enable-fortran \ + --enable-openmp \ + --enable-shared \ + --prefix="$INSTALL_PATH" \ + --libdir="$INSTALL_PATH/lib64" \ + ac_cv_prog_f77_v='-###' \ OPENMP_CFLAGS='-Kopenmp' $ make -j30 ``` @@ -62,23 +67,23 @@ $ make -j30 * Cross compilation using Fujitsu compiler (AArch64 target). ``` -$ ./configure \ - CC="fccpx" \ - F77="frtpx" \ - CFLAGS='-Nclang -Ofast' \ - FFLAGS='-Kfast' \ - --host=aarch64-unknown-linux-gnu \ - --build=x86_64-cross-linux-gnu \ - --enable-sve \ - --enable-armv8-cntvct-el0 \ - --enable-float \ - --enable-fma \ - --enable-fortran \ - --enable-openmp \ - --enable-shared \ - --prefix="$INSTALL_PATH" \ - --libdir="$INSTALL_PATH/lib64" \ - ac_cv_prog_f77_v='-###' \ +$ ./configure \ + CC="fccpx" \ + F77="frtpx" \ + CFLAGS='-Nclang -Ofast -ffj-no-fast-matmul' \ + FFLAGS='-Kfast' \ + --host=aarch64-unknown-linux-gnu \ + --build=x86_64-cross-linux-gnu \ + --enable-sve \ + --enable-armv8-cntvct-el0 \ + --enable-float \ + --enable-fma \ + --enable-fortran \ + --enable-openmp \ + --enable-shared \ + --prefix="$INSTALL_PATH" \ + --libdir="$INSTALL_PATH/lib64" \ + ac_cv_prog_f77_v='-###' \ OPENMP_CFLAGS='-Kopenmp' $ make -j30 ``` @@ -87,20 +92,20 @@ $ make -j30 * Native compilation using Fujitsu compiler (AArch64 target). ``` -$ ./configure \ - CC="fcc" \ - F77="frt" \ - CFLAGS='-Nclang -Ofast' \ - FFLAGS='-Kfast' \ - --enable-sve \ - --enable-armv8-cntvct-el0 \ - --enable-fma \ - --enable-fortran \ - --enable-openmp \ - --enable-shared \ - --prefix="$INSTALL_PATH" \ - --libdir="$INSTALL_PATH/lib64" \ - ac_cv_prog_f77_v='-###' \ +$ ./configure \ + CC="fcc" \ + F77="frt" \ + CFLAGS='-Nclang -Ofast -ffj-no-fast-matmul' \ + FFLAGS='-Kfast' \ + --enable-sve \ + --enable-armv8-cntvct-el0 \ + --enable-fma \ + --enable-fortran \ + --enable-openmp \ + --enable-shared \ + --prefix="$INSTALL_PATH" \ + --libdir="$INSTALL_PATH/lib64" \ + ac_cv_prog_f77_v='-###' \ OPENMP_CFLAGS='-Kopenmp' $ make -j30 ``` @@ -108,22 +113,22 @@ $ make -j30 * Cross compilation using Fujitsu compiler (AArch64 target). ``` -$ ./configure \ - CC="fccpx" \ - F77="frtpx" \ - CFLAGS='-Nclang -Ofast' \ - FFLAGS='-Kfast' \ - --host=aarch64-unknown-linux-gnu \ - --build=x86_64-cross-linux-gnu \ - --enable-sve \ - --enable-armv8-cntvct-el0 \ - --enable-fma \ - --enable-fortran \ - --enable-openmp \ - --enable-shared \ - --prefix="$INSTALL_PATH" \ - --libdir="$INSTALL_PATH/lib64" \ - ac_cv_prog_f77_v='-###' \ +$ ./configure \ + CC="fccpx" \ + F77="frtpx" \ + CFLAGS='-Nclang -Ofast -ffj-no-fast-matmul' \ + FFLAGS='-Kfast' \ + --host=aarch64-unknown-linux-gnu \ + --build=x86_64-cross-linux-gnu \ + --enable-sve \ + --enable-armv8-cntvct-el0 \ + --enable-fma \ + --enable-fortran \ + --enable-openmp \ + --enable-shared \ + --prefix="$INSTALL_PATH" \ + --libdir="$INSTALL_PATH/lib64" \ + ac_cv_prog_f77_v='-###' \ OPENMP_CFLAGS='-Kopenmp' $ make -j30 ``` @@ -154,12 +159,29 @@ $ make install | Double precision and sequential version   | -lfftw3 -lm | | Double precision and thread-parallel version | -lfftw3_omp -lfftw3 -lm | +* If you specified `--enable-linkfortran` at configure, compile with one of the + following options. + +| FFTW3 libraries       | Options | +| --------------------------------------------- | ----------------------------------------- | +| Single precision and sequential version | -lfftw3f_fortran -lm | +| Single precision and thread-parallel version | -lfftw3f_fortran_omp -lfftw3f_fortran -lm | +| Double precision and sequential version   | -lfftw3_fortran -lm | +| Double precision and thread-parallel version | -lfftw3_fortran_omp -lfftw3_fortran -lm | + ## Example * Case with the single precision and sequential library. ``` -$ frt a.f -L$(INSTALL_PATH)/lib64 -lfftw3f -lm +$ fcc a.c -L$(INSTALL_PATH)/lib64 -lfftw3f -lm +``` + +* If `--enable-linkfortran` is specified at configure, case with + the single precision and sequential library. + +``` +$ frt a.f -L$(INSTALL_PATH)/lib64 -lfftw3f_fortran -lm ``` # License diff --git a/configure.ac b/configure.ac index e90259b4f..69c456923 100644 --- a/configure.ac +++ b/configure.ac @@ -726,6 +726,33 @@ if test "$with_combined_threads" = yes; then fi fi +#LINKFORTRAN="" +FORT_SUFFIX="" +dnl ----------------------------------------------------------------------- +dnl linkfortran option add +AC_ARG_ENABLE(linkfortran, [AC_HELP_STRING([--enable-linkfortran],[enable to link fujitsu fortran runtime libraries])], enable_linkfortran=$enableval, enable_linkfortran=no) +if test "$enable_linkfortran"x = "yes"x; then + case "${host_cpu}" in + aarch64) + case "${CC}" in + fcc*) + archive_expsym_cmds="$archive_expsym_cmds --linkfortran" + archive_cmds="$archive_cmds --linkfortran" + FORT_SUFFIX=_fortran + ;; + esac + ;; + *) + AC_MSG_ERROR([Do not specify this option]) + ;; + esac +fi + +AC_SUBST(FORT_SUFFIX) +AM_CONDITIONAL(LINKFORTRAN, test "$enable_linkfortran" = "yes") + + + dnl Check for threads library... THREADLIBS="" if test "$enable_threads" = "yes"; then diff --git a/fftw.pc.in b/fftw.pc.in index a3dfc7f03..ad2aa8b65 100644 --- a/fftw.pc.in +++ b/fftw.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: FFTW Description: fast Fourier transform library Version: @VERSION@ -Libs: -L${libdir} -lfftw3@PREC_SUFFIX@ @LIBQUADMATH@ +Libs: -L${libdir} -lfftw3@PREC_SUFFIX@@FORT_SUFFIX@ @LIBQUADMATH@ Libs.private: -lm Cflags: -I${includedir} diff --git a/mpi/Makefile.am b/mpi/Makefile.am index 8e43fac5b..fa8340965 100644 --- a/mpi/Makefile.am +++ b/mpi/Makefile.am @@ -4,7 +4,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/api if MPI -lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@_mpi.la +lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_mpi.la include_HEADERS = fftw3-mpi.h nodist_include_HEADERS = fftw3-mpi.f03 fftw3l-mpi.f03 noinst_PROGRAMS = mpi-bench @@ -22,25 +22,25 @@ RDFT_SRC = rdft-serial.c rdft-rank-geq2.c rdft-rank-geq2-transposed.c rdft-rank1 RDFT2_SRC = rdft2-serial.c rdft2-rank-geq2.c rdft2-rank-geq2-transposed.c rdft2-problem.c rdft2-solve.c mpi-rdft2.h SRC = any-true.c api.c block.c choose-radix.c conf.c dtensor.c fftw3-mpi.h ifftw-mpi.h rearrange.c wisdom-api.c f03-wrap.c -libfftw3@PREC_SUFFIX@_mpi_la_SOURCES = $(SRC) $(TRANSPOSE_SRC) $(DFT_SRC) $(RDFT_SRC) $(RDFT2_SRC) +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_mpi_la_SOURCES = $(SRC) $(TRANSPOSE_SRC) $(DFT_SRC) $(RDFT_SRC) $(RDFT2_SRC) -libfftw3@PREC_SUFFIX@_mpi_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ -libfftw3@PREC_SUFFIX@_mpi_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la @MPILIBS@ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_mpi_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_mpi_la_LIBADD = ../libfftw3@PREC_SUFFIX@@FORT_SUFFIX@.la @MPILIBS@ if THREADS mpi_bench_CFLAGS = $(PTHREAD_CFLAGS) if !COMBINED_THREADS -LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_threads.la +LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads.la endif else if OPENMP mpi_bench_CFLAGS = $(OPENMP_CFLAGS) -LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_omp.la +LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp.la endif endif mpi_bench_SOURCES = mpi-bench.c $(top_srcdir)/tests/fftw-bench.c $(top_srcdir)/tests/hook.c -mpi_bench_LDADD = libfftw3@PREC_SUFFIX@_mpi.la $(LIBFFTWTHREADS) $(top_builddir)/libfftw3@PREC_SUFFIX@.la $(top_builddir)/libbench2/libbench2.a $(MPILIBS) $(THREADLIBS) +mpi_bench_LDADD = libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_mpi.la $(LIBFFTWTHREADS) $(top_builddir)/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@.la $(top_builddir)/libbench2/libbench2.a $(MPILIBS) $(THREADLIBS) CHECK = $(top_srcdir)/tests/check.pl NUMCHECK=10 diff --git a/tests/Makefile.am b/tests/Makefile.am index 2392409f3..202482789 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,18 +5,18 @@ EXTRA_DIST = check.pl README if THREADS bench_CFLAGS = $(PTHREAD_CFLAGS) if !COMBINED_THREADS -LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_threads.la +LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads.la endif else if OPENMP bench_CFLAGS = $(OPENMP_CFLAGS) -LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_omp.la +LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp.la endif endif bench_SOURCES = bench.c hook.c fftw-bench.c fftw-bench.h bench_LDADD = $(LIBFFTWTHREADS) \ -$(top_builddir)/libfftw3@PREC_SUFFIX@.la \ +$(top_builddir)/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@.la \ $(top_builddir)/libbench2/libbench2.a $(THREADLIBS) check-local: bench$(EXEEXT) diff --git a/threads/Makefile.am b/threads/Makefile.am index f5c170a9a..9800b5303 100644 --- a/threads/Makefile.am +++ b/threads/Makefile.am @@ -2,35 +2,35 @@ AM_CPPFLAGS = -I $(top_srcdir) AM_CFLAGS = $(STACK_ALIGN_CFLAGS) if OPENMP -FFTWOMPLIB = libfftw3@PREC_SUFFIX@_omp.la +FFTWOMPLIB = libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp.la else FFTWOMPLIB = endif if THREADS if COMBINED_THREADS -noinst_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la +noinst_LTLIBRARIES = libfftw3@PREC_SUFFIX@@FORT_SUFFIX@@FORT_SUFFIX@_threads.la else -lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la $(FFTWOMPLIB) +lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads.la $(FFTWOMPLIB) endif else lib_LTLIBRARIES = $(FFTWOMPLIB) endif -libfftw3@PREC_SUFFIX@_threads_la_SOURCES = api.c conf.c threads.c \ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads_la_SOURCES = api.c conf.c threads.c \ threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \ vrank-geq1-rdft2.c f77api.c f77funcs.h -libfftw3@PREC_SUFFIX@_threads_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ if !COMBINED_THREADS -libfftw3@PREC_SUFFIX@_threads_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads_la_LIBADD = ../libfftw3@PREC_SUFFIX@@FORT_SUFFIX@.la endif -libfftw3@PREC_SUFFIX@_omp_la_SOURCES = api.c conf.c openmp.c \ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp_la_SOURCES = api.c conf.c openmp.c \ threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \ vrank-geq1-rdft2.c f77api.c f77funcs.h -libfftw3@PREC_SUFFIX@_omp_la_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS) -libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp_la_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS) +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ if !COMBINED_THREADS -libfftw3@PREC_SUFFIX@_omp_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la +libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp_la_LIBADD = ../libfftw3@PREC_SUFFIX@@FORT_SUFFIX@.la endif diff --git a/tools/Makefile.am b/tools/Makefile.am index bed8dd810..7f6aca5c7 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,30 +1,30 @@ AM_CPPFLAGS = -I $(top_srcdir) bin_SCRIPTS = fftw-wisdom-to-conf -bin_PROGRAMS = fftw@PREC_SUFFIX@-wisdom +bin_PROGRAMS = fftw@PREC_SUFFIX@@FORT_SUFFIX@-wisdom -BUILT_SOURCES = fftw-wisdom-to-conf fftw@PREC_SUFFIX@-wisdom.1 +BUILT_SOURCES = fftw-wisdom-to-conf fftw@PREC_SUFFIX@@FORT_SUFFIX@-wisdom.1 EXTRA_DIST = fftw-wisdom-to-conf.in -dist_man_MANS = fftw-wisdom-to-conf.1 fftw@PREC_SUFFIX@-wisdom.1 +dist_man_MANS = fftw-wisdom-to-conf.1 fftw@PREC_SUFFIX@@FORT_SUFFIX@-wisdom.1 EXTRA_MANS = fftw_wisdom.1.in -fftw@PREC_SUFFIX@-wisdom.1: fftw_wisdom.1 +fftw@PREC_SUFFIX@@FORT_SUFFIX@-wisdom.1: fftw_wisdom.1 rm -f $@ cp fftw_wisdom.1 $@ if THREADS -fftw@PREC_SUFFIX@_wisdom_CFLAGS = $(PTHREAD_CFLAGS) +fftw@PREC_SUFFIX@@FORT_SUFFIX@_wisdom_CFLAGS = $(PTHREAD_CFLAGS) if !COMBINED_THREADS -LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_threads.la +LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_threads.la endif else if OPENMP -fftw@PREC_SUFFIX@_wisdom_CFLAGS = $(OPENMP_CFLAGS) -LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_omp.la +fftw@PREC_SUFFIX@@FORT_SUFFIX@_wisdom_CFLAGS = $(OPENMP_CFLAGS) +LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@_omp.la endif endif -fftw@PREC_SUFFIX@_wisdom_SOURCES = fftw-wisdom.c -fftw@PREC_SUFFIX@_wisdom_LDADD = $(top_builddir)/tests/bench-bench.o \ +fftw@PREC_SUFFIX@@FORT_SUFFIX@_wisdom_SOURCES = fftw-wisdom.c +fftw@PREC_SUFFIX@@FORT_SUFFIX@_wisdom_LDADD = $(top_builddir)/tests/bench-bench.o \ $(top_builddir)/tests/bench-fftw-bench.o $(LIBFFTWTHREADS) \ -$(top_builddir)/libfftw3@PREC_SUFFIX@.la \ +$(top_builddir)/libfftw3@PREC_SUFFIX@@FORT_SUFFIX@.la \ $(top_builddir)/libbench2/libbench2.a $(THREADLIBS) diff --git a/tools/fftw_wisdom.1.in b/tools/fftw_wisdom.1.in index b59380a5e..5d80f33aa 100644 --- a/tools/fftw_wisdom.1.in +++ b/tools/fftw_wisdom.1.in @@ -18,14 +18,14 @@ .\" .TH FFTW-WISDOM 1 "February, 2003" "fftw" "fftw" .SH NAME -fftw@PREC_SUFFIX@\-wisdom \- create wisdom (pre-optimized FFTs) +fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom \- create wisdom (pre-optimized FFTs) .SH SYNOPSIS -.B fftw@PREC_SUFFIX@\-wisdom +.B fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom [\fIOPTION\fR]... [\fISIZE\fR]... .SH DESCRIPTION .PP .\" Add any additional description here -.I fftw@PREC_SUFFIX@\-wisdom +.I fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom is a utility to generate FFTW .B wisdom files, which contain saved information about how to optimally compute @@ -39,35 +39,35 @@ home page: Programs using FFTW can be written to load wisdom from an arbitrary file, string, or other source. Moreover, it is likely that many FFTW-using programs will load the \fBsystem wisdom\fR file, which is stored in -.I /etc/fftw/wisdom@PREC_SUFFIX@ +.I /etc/fftw/wisdom@PREC_SUFFIX@@FORT_SUFFIX@ by default. -.I fftw@PREC_SUFFIX@\-wisdom +.I fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom can be used to create or add to such wisdom files. In its most typical usage, the wisdom file can be created to pre-plan a canonical set of sizes (see below) via: .ce -fftw@PREC_SUFFIX@\-wisdom \-v \-c \-o wisdom@PREC_SUFFIX@ +fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom \-v \-c \-o wisdom@PREC_SUFFIX@@FORT_SUFFIX@ (this will take many hours, which can be limited by the .B \-t option) and the output -.I wisdom@PREC_SUFFIX@ +.I wisdom@PREC_SUFFIX@@FORT_SUFFIX@ file can then be copied (as root) to .I /etc/fftw/ or whatever. The -.I fftw@PREC_SUFFIX@\-wisdom +.I fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom program normally writes the wisdom directly to standard output, but this can be changed via the .B \-o option, as in the example above. If the system wisdom file -.I /etc/fftw/wisdom@PREC_SUFFIX@ +.I /etc/fftw/wisdom@PREC_SUFFIX@@FORT_SUFFIX@ already exists, then -.I fftw@PREC_SUFFIX@\-wisdom +.I fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom reads this existing wisdom (unless the .B \-n option is specified) and outputs both the old wisdom and any @@ -151,7 +151,7 @@ rather than to standard output (the default). .TP \fB\-m\fR, \fB\-\-measure\fR; \fB\-e\fR, \fB\-\-estimate\fR; \fB\-x\fR, \fB\-\-exhaustive\fR Normally, -.I fftw@PREC_SUFFIX@\-wisdom +.I fftw@PREC_SUFFIX@@FORT_SUFFIX@\-wisdom creates plans in FFTW_PATIENT mode, but with these options you can instead use FFTW_MEASURE, FFTW_ESTIMATE, or FFTW_EXHAUSTIVE modes, respectively, as described in more detail by the FFTW manual. @@ -165,7 +165,7 @@ mode). .TP \fB\-n\fR, \fB\-\-no\-system\-wisdom\fR Do not import the system wisdom from -.I /etc/fftw/wisdom@PREC_SUFFIX@ +.I /etc/fftw/wisdom@PREC_SUFFIX@@FORT_SUFFIX@ (which is normally read by default). .TP \fB\-w\fR \fIfile\fR, \fB\-\-wisdom\-file\fR=\fIfile\fR