LadaF / PoisFFT

Free parallel fast Poisson solver. Requires FFTW3 and optionally PFFT.
Other
55 stars 18 forks source link

internal compiler error in c_new-inc.f90 #1

Closed tummala-hareesh closed 9 years ago

tummala-hareesh commented 9 years ago

Dear LadaF, I instantly fell in love with PoisFFT because of it's simplicity and portability. I was planning to use it for my dislocation dynamics simulations. Well, I already have the FFTw+MPI libraries. I saw that I need to the pFFT libraries too. So, I downloaded and installed the pFFT libraries too (I get a an error when I do "make check"). Now, coming to the main part. When I try to compile a mpi version of PoisFFT, it gives me an error of not recognising the libraries. I drop a step back and tried to install atlest the single core version. Here, I get the ICE error(gcc 4.9.2)!!!! I will attach some snapshots of the problem if you think this is a problem which you can help me with!

HT-NaN-HT

LadaF commented 9 years ago

Hi! Thanks for your interest. Please attach the error messages and the exact commands you execute. ICE is normally a compiler bug, but there may be a workaround available. Also, if the gfortran developers don't know about the bug, they should be informed. I tested PoisFFT extensively in GCC 4.8 so it may be a regression.

tummala-hareesh commented 9 years ago

Dear LadaF, Sorry for the delay. I was double checking if all my libraries were correctly installed. Indeed, they are! Here are the snapshots of serial compile error & mpi compile error. On the right side, I was checking if the libraries are all in-place. As I already informed, the gcc version is 4.9.2.

poisfft_mpi_install_problem poisfft_serial_install_problem

LadaF commented 9 years ago

I managed to reproduce your issue with gcc 4.9.2. It does not happen with gcc 4.9.0 or gcc 4.8. I will try to find a workaround or at least recommend other later version which works.

LadaF commented 9 years ago

It looks like a serious problem in the GCC compiler which exists also in the 5.1 release. I will try to find a workaround as waiting for the fix can be very long. The first possible thing is to comment out all subroutine poisfft_solver??_?_new in c_binding.f90 and all C and C++ functions which call it. Of course, that is only possible if you plan to use it in Fortran. You can also disable the C and C++ bindings in the SConstruct file altogether.

tummala-hareesh commented 9 years ago

Yes, you are right. It is a serious bug in the GCC compiler.

LadaF commented 9 years ago

I used gcc 4.8.3 and 4.8.5 (SuSE linux branding) and it compiled cleanly. FFTW and PFFT don't have to be recompiled, I do not touch them.

LadaF commented 9 years ago

I pushed a simple workaround to master, please test it.

tummala-hareesh commented 9 years ago

Fortran version works perfectly fine! For now, this is quite handy for me. Thank you very much.