sdsc / p3dfft

P3DFFT stands for Parallel Three-Dimensional Fast Fourier Transforms. It is a library for large-scale computer simulations on parallel platforms. It implements 3D FFT and related algorithms such as Chebyshev transform (an important class of algorithm for simulations in a wide range of fields). P3DFFT uses 2D, or pencil, decomposition. For more information:
http://www.p3dfft.net
Other
54 stars 16 forks source link

update in order to generate p3dfft shared library #3

Closed CyrilleBonamy closed 8 years ago

CyrilleBonamy commented 8 years ago

To be C++ compatible : p3dfft.h update

To generate p3dfft shared library : update of ghosts.F90 (fixbug), configure.ac and build/Makefile.am

The other files have been generated with the following commands libtoolize aclocal autoconf automake --add-missing

dmitrypek commented 8 years ago

Dear Cyrille Bonamy,

thanks so much for your contribution, and sorry for delay in getting back to you. I appreciate the update of p3dfft.h to include C++ compatibility. We plan to incorporate this change. ghosts.F90 is not used in the current version. As for the other change regarding shared library, let me ask what is the reason for your using the shared library. Most users will use static library, and I am not yet clear how to make the installation configurable so both choices are there. Let me know if you have any more thoughts.

thanks,

Dmitry Pekurovsky.

On Tue, Feb 9, 2016 at 12:55 PM, CyrilleBonamy notifications@github.com wrote:

update of ghosts.F90, configure.ac and Makefile.ac

The other files have been generated with the following commands :

libtoolize aclocal autoconf

automake --add-missing

You can view, comment on, or merge this pull request online at:

https://github.com/sdsc/p3dfft/pull/3 Commit Summary

  • Update p3dfft.h : C++ compatibility
  • update ghosts.F90 : debug
  • Merge pull request #1 from CyrilleBonamy/master
  • Merge pull request #2 from CyrilleBonamy/patch-1
  • update of configure.ac and Makefile.ac in order to generate p3dfft shared library

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/sdsc/p3dfft/pull/3.

CyrilleBonamy commented 8 years ago

Hi Dimitry,

We are using the shared library in order to use it with python/cython. We don't know how to use static library and python...

More precisely, we develop C++ and Python classes useful to perform fast Fourier transform with different libraries : the fluidfft package : https://bitbucket.org/fluiddyn/fluidfft

Cyrille

On 31/03/2016 02:17, Dmitry Pekurovsky wrote:

Dear Cyrille Bonamy,

thanks so much for your contribution, and sorry for delay in getting back to you. I appreciate the update of p3dfft.h to include C++ compatibility. We plan to incorporate this change. ghosts.F90 is not used in the current version. As for the other change regarding shared library, let me ask what is the reason for your using the shared library. Most users will use static library, and I am not yet clear how to make the installation configurable so both choices are there. Let me know if you have any more thoughts.

thanks,

Dmitry Pekurovsky.

CyrilleBonamy commented 6 years ago

hi, It is very important for us to have the shared library in the official version of the p3dfft :-)

So is it possible?

I think that if you modify only configure.ac and build/Makefile.am, the final result is good for all users. Indeed, the shared and the static library are then generated and installed.

dmitrypek commented 6 years ago

I can take a look into this. Do you have a modified version that I can test?

CyrilleBonamy commented 6 years ago

In the configure.ac you only add the following line (between the line 5 and 6, so just after AC_INT([P3DFFT....... ) :

LT_INIT

And the build/Makefile.am is the following :

AM_FCFLAGS = $(FDFLAGS) INCLUDES = $(FFTW_INC) LDADD = $(FFTW_LIB)

lib_LTLIBRARIES = libp3dfft.la libp3dfft_la_LDFLAGS = -avoid-version libp3dfft_la_SOURCES = fft_spec.F90 module.F90 fft_init.F90 fft_exec.F90 wrap.F90

module.o: setup.F90 init_plan.F90 ftran.F90 btran.F90 reorder.F90 fcomm1.F90 \ fcomm2_trans.F90 bcomm1_trans.F90 fcomm2.F90 bcomm1.F90 bcomm2.F90

all-local: -@[ -e "p3dfft.mod" ] && mv -f p3dfft.mod ../include

clean-local: -test -z ".mod" || rm -f .mod

The other files are generated with the following linux commands libtoolize aclocal autoconf automake --add-missing

Cyrille

CyrilleBonamy commented 6 years ago

i have forget the end of the process... It is just a classical installation : ./configure blablabla and make; make install

I make now a push request with the good Makefile.am and configure.ac ;-)