From ef321a2920a6aa6d4181f0e97e40dba4e68a5e61 Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Fri, 29 Mar 2019 20:49:06 +0100 Subject: [PATCH 1/5] Starting fftw module (BROKEN) --- Compiler/fftw/build | 45 ++++++++++++++++++++++++++++++++++++ Compiler/fftw/files/variants | 1 + Compiler/fftw/modulefile | 12 ++++++++++ 3 files changed, 58 insertions(+) create mode 100755 Compiler/fftw/build create mode 100644 Compiler/fftw/files/variants create mode 100644 Compiler/fftw/modulefile diff --git a/Compiler/fftw/build b/Compiler/fftw/build new file mode 100755 index 0000000..b352bf0 --- /dev/null +++ b/Compiler/fftw/build @@ -0,0 +1,45 @@ +#!/usr/bin/env modbuild + +pbuild::add_to_group 'Compiler' + +pbuild::set_download_url "http://www.fftw.org/fftw-$V.tar.gz" +pbuild::set_sha256sum "fftw-3.3.8.tar.gz:6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303" + +pbuild::install_docfiles 'COPYRIGHT' 'COPYING' 'README' 'NEWS' + +pbuild::pre_configure() { + echo "PRECONFIGURE" >&2 + pbuild::add_configure_args "CC=${MPICC}" + pbuild::add_configure_args "CXX=${MPICXX}" + + # Multithreading. Enabling both is fine + pbuild::add_configure_args "--enable-threads" + pbuild::add_configure_args "--enable-openmp" + + # MPI support + pbuild::add_configure_args "--enable-mpi" + + # CPU optimizations + pbuild::add_configure_args "--enable-sse2" + pbuild::add_configure_args "--enable-avx2" +} + +pbuild::configure() { + echo "CONFIGURING" >&2 + pwd >&2 + ls >&2 + ./configure +} + +pbuild::compile() { + echo "COMPILING" >&2 + echo "PWD=$PWD" >&2 + echo "ls:" >&2 + ls >&2 + echo "make:" >&2 + make + exit 1 +} + +#pbuild::install() { +#} diff --git a/Compiler/fftw/files/variants b/Compiler/fftw/files/variants new file mode 100644 index 0000000..24178fb --- /dev/null +++ b/Compiler/fftw/files/variants @@ -0,0 +1 @@ +fftw/3.3.8 unstable gcc/8.2.0 mpich/3.2.1 openmpi/3.1.3 diff --git a/Compiler/fftw/modulefile b/Compiler/fftw/modulefile new file mode 100644 index 0000000..26a1cda --- /dev/null +++ b/Compiler/fftw/modulefile @@ -0,0 +1,12 @@ +#%Module + +module-whatis "Fastest Fourier Transform in the West" +module-url "http://www.fftw.org/" +module-license "GPL; http://www.fftw.org/doc/License-and-Copyright.html" +module-maintainer "Spencer Bliven " + +module-help " +FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). +" + + From f72dacb7b8b39f6cdb37d714f88ae85ebef4f17f Mon Sep 17 00:00:00 2001 From: Bliven Spencer Edward Date: Thu, 4 Apr 2019 11:12:48 +0200 Subject: [PATCH 2/5] Fix fftw build script --- Compiler/fftw/build | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Compiler/fftw/build b/Compiler/fftw/build index b352bf0..74cdc91 100755 --- a/Compiler/fftw/build +++ b/Compiler/fftw/build @@ -8,7 +8,6 @@ pbuild::set_sha256sum "fftw-3.3.8.tar.gz:6113262f6e92c5bd474f2875fa1b01054c4ad50 pbuild::install_docfiles 'COPYRIGHT' 'COPYING' 'README' 'NEWS' pbuild::pre_configure() { - echo "PRECONFIGURE" >&2 pbuild::add_configure_args "CC=${MPICC}" pbuild::add_configure_args "CXX=${MPICXX}" @@ -23,23 +22,3 @@ pbuild::pre_configure() { pbuild::add_configure_args "--enable-sse2" pbuild::add_configure_args "--enable-avx2" } - -pbuild::configure() { - echo "CONFIGURING" >&2 - pwd >&2 - ls >&2 - ./configure -} - -pbuild::compile() { - echo "COMPILING" >&2 - echo "PWD=$PWD" >&2 - echo "ls:" >&2 - ls >&2 - echo "make:" >&2 - make - exit 1 -} - -#pbuild::install() { -#} From 2b7aa706e8d45795233d48b0bc4729229fc4b1ee Mon Sep 17 00:00:00 2001 From: Bliven Spencer Edward Date: Thu, 4 Apr 2019 12:03:14 +0200 Subject: [PATCH 3/5] Adding fftw/gcc7.3.0 variant --- Compiler/fftw/files/variants | 1 + 1 file changed, 1 insertion(+) diff --git a/Compiler/fftw/files/variants b/Compiler/fftw/files/variants index 24178fb..437bb3a 100644 --- a/Compiler/fftw/files/variants +++ b/Compiler/fftw/files/variants @@ -1 +1,2 @@ fftw/3.3.8 unstable gcc/8.2.0 mpich/3.2.1 openmpi/3.1.3 +fftw/3.3.8 unstable gcc/7.3.0 mpich/3.2.1 openmpi/3.1.3 From 80c0f57986ac481256a24a9e4c10e92cc9bbed25 Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Tue, 9 Apr 2019 14:38:53 +0200 Subject: [PATCH 4/5] Move fftw to MPI category --- {Compiler => MPI}/fftw/build | 0 {Compiler => MPI}/fftw/files/variants | 0 {Compiler => MPI}/fftw/modulefile | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {Compiler => MPI}/fftw/build (100%) rename {Compiler => MPI}/fftw/files/variants (100%) rename {Compiler => MPI}/fftw/modulefile (100%) diff --git a/Compiler/fftw/build b/MPI/fftw/build similarity index 100% rename from Compiler/fftw/build rename to MPI/fftw/build diff --git a/Compiler/fftw/files/variants b/MPI/fftw/files/variants similarity index 100% rename from Compiler/fftw/files/variants rename to MPI/fftw/files/variants diff --git a/Compiler/fftw/modulefile b/MPI/fftw/modulefile similarity index 100% rename from Compiler/fftw/modulefile rename to MPI/fftw/modulefile From e44ae11c704eceb414efe86cffec9739cceed374 Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Tue, 9 Apr 2019 14:51:32 +0200 Subject: [PATCH 5/5] Reinstall fftw into MPI category - Minor Updates based on Achim's suggestions. --- MPI/fftw/README | 7 +++++++ MPI/fftw/build | 3 ++- MPI/fftw/files/variants | 3 +-- MPI/fftw/modulefile | 5 ++++- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 MPI/fftw/README diff --git a/MPI/fftw/README b/MPI/fftw/README new file mode 100644 index 0000000..f7675db --- /dev/null +++ b/MPI/fftw/README @@ -0,0 +1,7 @@ +FFTW +==== + +FFTW is highly optimized, but downgrades if run on an older processor. It +should be built compiled on a system with SSE2 and AVX2 support (e.g. merlin). + +This module requires PMODULE_VERSION > 1.0.0 to compile. diff --git a/MPI/fftw/build b/MPI/fftw/build index 74cdc91..7334359 100755 --- a/MPI/fftw/build +++ b/MPI/fftw/build @@ -1,6 +1,7 @@ #!/usr/bin/env modbuild +# Needs to be built with SSE2 and AVX2 support, but should run on architectures without this -pbuild::add_to_group 'Compiler' +pbuild::add_to_group 'MPI' pbuild::set_download_url "http://www.fftw.org/fftw-$V.tar.gz" pbuild::set_sha256sum "fftw-3.3.8.tar.gz:6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303" diff --git a/MPI/fftw/files/variants b/MPI/fftw/files/variants index 437bb3a..fa8f4ad 100644 --- a/MPI/fftw/files/variants +++ b/MPI/fftw/files/variants @@ -1,2 +1 @@ -fftw/3.3.8 unstable gcc/8.2.0 mpich/3.2.1 openmpi/3.1.3 -fftw/3.3.8 unstable gcc/7.3.0 mpich/3.2.1 openmpi/3.1.3 +fftw/3.3.8 unstable gcc/{7.3.0,8.2.0} mpich/3.2.1 openmpi/3.1.3 diff --git a/MPI/fftw/modulefile b/MPI/fftw/modulefile index 26a1cda..c8cc91b 100644 --- a/MPI/fftw/modulefile +++ b/MPI/fftw/modulefile @@ -6,7 +6,10 @@ module-license "GPL; http://www.fftw.org/doc/License-and-Copyright.html" module-maintainer "Spencer Bliven " module-help " -FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). +FFTW is a C subroutine library for computing the discrete Fourier transform +(DFT) in one or more dimensions, of arbitrary input size, and of both real and +complex data (as well as of even/odd data, i.e. the discrete cosine/sine +transforms or DCT/DST). "