LadaF/PoisFFT

internal compiler error in c_new-inc.f90

tummala-hareesh opened this issue · 8 comments

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

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.

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

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

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.

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

  • The workaround by commenting the subroutines in c_binding.f90 works. It builds perfectly.
  • You said it was working with gcc 4.8. I have installed the gcc 4.8.4 version and made it the default version. But, still gives an ICE.
    Which version did you use?? Do you compile the FFTw and PFFT again with the new version of the compiler (FFTw and PFFT takes default gcc libraries.....If I am not wrong)?
LadaF commented

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

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

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