FFTW and MPI

  • Thread starter cva
  • Start date

cva

18
0
Hello,

I've been trying for 2 weeks now to write in fortran a MPI program that computes the Fourier transform off a real matrix and then in vers transform using fftw-3.3alpha1. I installed the libray on evry computer availbale at my school and an I was able to compile yet my code. Even if the libray installs properly (libfftw.a and lifftw_mpi.a are created) when I compile my code I get error 'undefined reference to fftw_mpi_init_'.

Does any of you manged to use fftw-3.3alpha1 to create a fortran code ?

cva
 
512
0
Which MPI library are you using? OpenMPI? And how are you compiling your code? How are you running it? There are library-specific ways of compiling and invoking MPI programs.

Your question is way too vague to answer without some more information.
 

cva

18
0
Good point. The MPI version on the server is HP-MPI v2.2.5 implementing MPI 1.2 and full MPI 2 Standard functionality.

I compile the my codes with:
bash-3.00$ mpif90 -show
pgf90 -L/opt/hpmpi/lib/linux_amd64 -I/opt/hpmpi/include/64 -lhpmpio -lhpmpi -ldl


Well I was just wondering if someone managed to make it work, before I start to invest lots of time and energy.

cva
 
Last edited:

Hurkyl

Staff Emeritus
Science Advisor
Gold Member
14,847
17
'undefined reference to fftw_mpi_init_'.

This sounds like a linker error -- your code compiles fine, but when the linker tries to link the compiled code and the libraries to produce an executable, it discovers you either forgot to include a necessary library, or maybe you specified the libraries in the wrong order.


Or... maybe the function really doesn't exist. I haven't used fftw, but I've heard it works as follows:

* Build program A
* Run program A to produce the source code for program B
* Build program B
* Run program B to compute FFT's.


If I'm correct and you tried to jump straight into building program B, then it would fail, because you didn't create all of the sources program B needed!
 

cva

18
0
'undefined reference to fftw_mpi_init_'.

This sounds like a linker error -- your code compiles fine, but when the linker tries to link the compiled code and the libraries to produce an executable, it discovers you either forgot to include a necessary library, or maybe you specified the libraries in the wrong order.


Or... maybe the function really doesn't exist. I haven't used fftw, but I've heard it works as follows:

* Build program A
* Run program A to produce the source code for program B
* Build program B
* Run program B to compute FFT's.


If I'm correct and you tried to jump straight into building program B, then it would fail, because you didn't create all of the sources program B needed!
The fftw library seems to install corectley Then as indicated in the manual the flas -lfftw3 and lfftw_3mpi are added to the compiling .
 

Related Threads for: FFTW and MPI

  • Posted
Replies
3
Views
1K
  • Posted
Replies
2
Views
3K
Replies
3
Views
445
Replies
12
Views
1K
  • Posted
Replies
3
Views
2K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top