Coder Social home page Coder Social logo

fujitsu / fftw3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fftw/fftw3

6.0 4.0 2.0 13.2 MB

This is a fork of the FFTW3 for the Armv8-A 64-bit architecture (AArch64) with 512-bit Scalable Vector Extension (SVE) support.

License: GNU General Public License v2.0

C 94.73% Shell 0.16% Perl 0.19% Makefile 0.73% OCaml 2.66% M4 0.65% CMake 0.17% Roff 0.11% Fortran 0.58%

fftw3's Introduction

FFTW3

License: GPL v2

This is a fork of the FFTW3 for the Armv8-A 64-bit architecture (AArch64) with 512-bit Scalable Vector Extension (SVE) support.

See the FFTW home page for more information.

Prerequisites

  • Fujitsu Fortran Compiler and Fujitsu C/C++ Compiler
  • GNU automake 1.16.1 or higher
  • GNU Autoconf 2.69 or higher
  • GNU libtool 2.4.6 or higher
  • GNU Texinfo 6.7 or higher

Installation

Download the source code

  • Clone this repository.
$ git clone https://github.com/fujitsu/fftw3.git

Generate configure scripts

  • Run autoreconf.
$ cd fftw3
$ touch ChangeLog
$ 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 -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
  • Cross compilation using Fujitsu compiler (AArch64 target).
$ ./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

Double precision

  • Native compilation using Fujitsu compiler (AArch64 target).
$ ./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
  • Cross compilation using Fujitsu compiler (AArch64 target).
$ ./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

Run tests

$ make check

Install FFTW3

$ make install

Usage

How to compile

  • Compile with the -L$(INSTALL_PATH)/lib64 option and one of the options listed in the following table after your sources or objects.
FFTW3 libraries       Options
Single precision and sequential version -lfftw3f -lm
Single precision and thread-parallel version -lfftw3f_omp -lfftw3f -lm
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.
$ 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

fftw3's People

Contributors

alexeicolin avatar artemkin avatar emmenlau avatar espakm avatar forandom avatar fornwall avatar galenlynch avatar hintak avatar holywu avatar jacquev6 avatar jme52 avatar junghans avatar lqlsoftware avatar matteo-frigo avatar maxlevesque avatar muxator avatar rdolbeau avatar rettakjak avatar rleonid avatar rolandschulz avatar ruilvo avatar saosudo avatar spaceim avatar stevengj avatar tetsuzo-usui avatar tkelman avatar tklauser avatar wkensuke avatar xantares avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

e-kwsm wkensuke

fftw3's Issues

Bench test fails in single precision library

The implementation of the single precision version of the SVE route is strange.
This only happens on the sve-dev branch.

fftw3/tests/bench --verify  //obrd16632
...
Found relative error 5.166780e+36 (impulse)
       0 4918227518190379286992519168.000000000000   0.000000000000    64.482559204102   0.000000000000
       1  54.550598144531   0.000000000000    64.482559204102   0.000000000000
       2 13827268917597039853830144.000000000000   0.000000000000    64.482559204102   0.000000000000
       3 120.677856445312   0.000000000000    64.482559204102   0.000000000000
       4  -0.470948427916   0.000000000000    64.482559204102   0.000000000000
       5  64.457267761230   0.000000000000    64.482559204102   0.000000000000
       6 72479053655475519631778190983168.000000000000   0.000000000000    64.482559204102   0.000000000000
       7   2.092102050781   0.000000000000    64.482559204102   0.000000000000
       8 93293.312500000000   0.000000000000    64.482559204102   0.000000000000
       9  85.172790527344   0.000000000000    64.482559204102   0.000000000000
      10 2156181075246777892864.000000000000   0.000000000000    64.482559204102   0.000000000000
      11 133.840789794922   0.000000000000    64.482559204102   0.000000000000
      12 3341701475928780113444864.000000000000   0.000000000000    64.482559204102   0.000000000000
      13 105.257469177246   0.000000000000    64.482559204102   0.000000000000
....     

error: " *** No rule to make target 'rfftwnd.pdf', needed by 'fftw3.info'. Stop."

When "make -j 30" is executed according to the procedure of "Native compilation using Fujitsu compiler (AArch64 target).", the following error occurs.

"...
make[2]: Entering directory '/home/fx700user/komura/fftw_test/fftw3/mpi'
sed 's/C_MPI_FINT//' ./fftw3-mpi.f03.in > fftw3-mpi.f03
sed 's/C_MPI_FINT//' ./fftw3l-mpi.f03.in > fftw3l-mpi.f03
make all-am
make[3]: Entering directory '/home/fx700user/komura/fftw_test/fftw3/mpi'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/fx700user/komura/fftw_test/fftw3/mpi'
make[2]: Leaving directory '/home/fx700user/komura/fftw_test/fftw3/mpi'
Making all in doc
make[2]: Entering directory '/home/fx700user/komura/fftw_test/fftw3/doc'
Making all in FAQ
make[3]: Entering directory '/home/fx700user/komura/fftw_test/fftw3/doc/FAQ'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/fx700user/komura/fftw_test/fftw3/doc/FAQ'
make[3]: Entering directory '/home/fx700user/komura/fftw_test/fftw3/doc'
make[3]: *** No rule to make target 'rfftwnd.pdf', needed by 'fftw3.info'. Stop.
make[3]: Leaving directory '/home/fx700user/komura/fftw_test/fftw3/doc'
make[2]: *** [Makefile:633: all-recursive] Error 1
make[2]: Leaving directory '/home/fx700user/komura/fftw_test/fftw3/doc'
make[1]: *** [Makefile:729: all-recursive] Error 1
make[1]: Leaving directory '/home/fx700user/komura/fftw_test/fftw3'
make: *** [Makefile:573: all] Error 2"

Could you tell me how to deal with it?
Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.