Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28456 Discussions

Using FFTW3 MPI features with Intel Fortran

Halvdan
Beginner
911 Views

Hello, 

I have a code that runs in parallel (using MPI) and uses the FFTW3 library for fast fourier transforms. It compiles and runs succesfully on linux, using mpich2 (version 1.4.1), gfortran, and FFTW version 3.3.2. I am trying to port this code into a Windows environment, using Intel Fortran and Visual Studio to compile the project. The code also uses the parallel features of the FFTW library, i.e., transforms using MPI.

My first attempts to compile this program on Windows failed. I tried two approaches;

1) Using Intel's MKL library, linking in appropriate MKL libraries. Compilation was succesful, *except* for the fftw functions using MPI

2) I also tried compiling FFTW for Windows, using the recommendations from their website (i.e., using MinGW). This also failed - I managed to compile the "basic" library, but not the "MPI" part.

I'm working on this project as a consultant and don't have access to Intel Fortran on a daily basis. I am hoping to get advice on how to compile this project on a Windows machine using Intel Fortran (and mpich2). At this point, performance is not the main concern, just how to have a working code as soon as possible.

 

Thanks. 

 

0 Kudos
2 Replies
TimP
Honored Contributor III
911 Views
I don't know of any demonstrated method for using MPI with mingw. If mingw isn't mentioned on the mpich or openmpi Windows support sites, you're probably out of luck in that direction; mingw is further off topic here. It should be possible to install Windows MPICH and use ifort (as mpif90 and mpif77) and MKL. You would of course match the variety of mpich (e.g. X64) with the variety of ifort (e.g. Intel64). As you haven't given any detail on how far you got, you may not get much useful response. There's some commonality between MPICH2 for Windows and Intel MPI; the degree of compatiblity has varied among versions.
0 Kudos
Halvdan
Beginner
911 Views
Thank you for your reply TimP; here is some additional info: -The code I am trying to compile is developed by myself, so I have the possibility of using different approaches. I have successfully compiled older versions my code with Intel Fortran and mpich2 on Windows. The most recent version of my code, however, uses the FFTW3 library. I got compilation errors on MPI-specific FFTW routines. I guess I'm asking if it is 'supposed' to work, or not. Maybe I'm not including the correct libraries, or maybe MPI FFTW isn't supported in MKL. The compiler didn't complain about the serial routines; for example: the function "fftw_plan_dft_2d" seemed to compile successfully (after using the appropriate include-file in the code and linking to the MKL library), whereas "fftw_mpi_plan_dft_2d", which is the parallel (MPI) version of the same, did not. -Under Linux, I compile FFTW3 myself, and this compilation process produces two different 'include' files: fftw3.f03 and fftw3-mpi.f03, the latter is the one to include in fortran programs using the parallel features of FFTW3. These are 'modern' fortran interfaces to the C fftw library. I didn't find these or similar, in the installation on the Windows machines. If I remember correctly, there was some legacy .f files, like "fftw3.f' or 'fftw_f77.i' in the Intel fortran Windows directories. But, as the FFTW3 documentation states, 'The MPI parallel interface to FFTW is _not_ currently available to legacy Fortran.' I appreciate the time taken to answer my question. Maybe I'm missing something obvious, or maybe "parallel fftw3" is not implemented in the MKL. Regards, Halvdan.
0 Kudos
Reply