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 compile shared library #10

Closed CyrilleBonamy closed 6 years ago

CyrilleBonamy commented 6 years ago

you need to generate other files with classical linux command :

libtoolize aclocal autoconf automake --add-missing

Please note that it compiles too the static library.

dmitrypek commented 6 years ago

Thanks for your contribution. It seems to compile only the shared library, not the static library. What am I missing?

CyrilleBonamy commented 6 years ago

Hello,

I don't understand...

In the following, it is my exact installation process (the first line correspond to the clone of the pull request version):

git clone https://github.com/CyrilleBonamy/p3dfft.git cd p3dfft libtoolize aclocal autoconf automake --add-missing CC=mpicc CCLD=mpif90 ./configure --enable-fftw --with-fftw=/opt/fftw/3.3.4-gcc/ --prefix=/opt/p3dfft/2.7.5 make

And the .a is then generated :

ls -l build/.libs/ total 1288 -rw-r--r-- 1 bonamy all-users 42864 Oct 27 21:27 fft_exec.o -rw-r--r-- 1 bonamy all-users 32048 Oct 27 21:27 fft_init.o -rw-r--r-- 1 bonamy all-users 12688 Oct 27 21:27 fft_spec.o -rw-r--r-- 1 bonamy all-users 499324 Oct 27 21:27 libp3dfft.a lrwxrwxrwx 1 bonamy all-users 15 Oct 27 21:27 libp3dfft.la -> ../libp3dfft.la -rw-r--r-- 1 bonamy all-users 946 Oct 27 21:27 libp3dfft.lai -rwxr-xr-x 1 bonamy all-users 308760 Oct 27 21:27 libp3dfft.so -rw-r--r-- 1 bonamy all-users 393472 Oct 27 21:27 module.o -rw-r--r-- 1 bonamy all-users 9264 Oct 27 21:27 wrap.o

My linux system is debian jessie : uname -a Linux cl7n013 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux

In your case, what is the result of this process?

Thank you for your time

Cyrille

----- Mail original ----- De: "Dmitry Pekurovsky" notifications@github.com À: "sdsc/p3dfft" p3dfft@noreply.github.com Cc: "CYRILLE BONAMY" cyrille.bonamy@univ-grenoble-alpes.fr, "Author" author@noreply.github.com Envoyé: Vendredi 27 Octobre 2017 20:26:18 Objet: Re: [sdsc/p3dfft] update in order to compile shared library (#10)

Thanks for your contribution. It seems to compile only the shared library, not the static library. What am I missing?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/sdsc/p3dfft/pull/10#issuecomment-340048832

dmitrypek commented 6 years ago

I see what's going on. In your example the library is created in /build/.libs, whereas normally it is in /build. That's why I did not see it before. Anyway, I think most of our users expect to see the library in build. Can we change the config so it ends up there?

CyrilleBonamy commented 6 years ago

I don't know really how to do that... but i can search and surely find.

but if you finished the install process by "make install", all the library (static and shared) are copied in the prefix directory (/opt/p3dfft/2.7.5 in my example) Is it not ok for the users? ;-)

----- Mail original ----- De: "Dmitry Pekurovsky" notifications@github.com À: "sdsc" p3dfft@noreply.github.com Cc: "CYRILLE BONAMY" cyrille.bonamy@univ-grenoble-alpes.fr, "Author" author@noreply.github.com Envoyé: Vendredi 27 Octobre 2017 22:38:15 Objet: Re: [sdsc/p3dfft] update in order to compile shared library (#10)

I see what's going on. In your example the library is created in /build/.libs, whereas normally it is in /build. That's why I did not see it before. Anyway, I think most of our users expect to see the library in build. Can we change the config so it ends up there?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/sdsc/p3dfft/pull/10#issuecomment-340079326

dmitrypek commented 6 years ago

The problem is: the sample codes depend on libp3dfft.a being in /build. Otherwise I get an error when building sample. Don't you see errors when you run "make" and it tries to build samples?

CyrilleBonamy commented 6 years ago

ha... yes... I have the same issue. We can correct this adding a line in the build/Makefile.am I think it is not perfect but it compiles :

just add the following line at the bottom of the all-local part of the build/Makefile.am:

all-local : -@ [ -e "p3dfft.mod" ] && mv -f p3dfft.mod ../include -@ [ -e ".libs/libp3dfft.a" ] && ln -s .libs/libp3dfft.a libp3dfft.a

----- Mail original ----- De: "Dmitry Pekurovsky" notifications@github.com À: "sdsc" p3dfft@noreply.github.com Cc: "CYRILLE BONAMY" cyrille.bonamy@univ-grenoble-alpes.fr, "Author" author@noreply.github.com Envoyé: Vendredi 27 Octobre 2017 22:48:54 Objet: Re: [sdsc/p3dfft] update in order to compile shared library (#10)

The problem is: the sample codes depend on libp3dfft.a being in /build. Otherwise I get an error when building sample. Don't you see errors when you run "make" and it tries to build samples?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/sdsc/p3dfft/pull/10#issuecomment-340081559

dmitrypek commented 6 years ago

Looks good, I will adopt the change. Thanks!