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

How do I compile MPI fortran on windows using this product?

Armen_O_
Beginner
1,939 Views

Hi, let me premise by saying I'm ling-retard illiterate. I understand how things work but I am not familiar with the lingo of compilers, and software and hence am having a lot of problems. Let me write down the problem first,

 

Trying to compile a blank program,

 

program test

    implicit none
    include 'mpif.h'


    integer, parameter  :: i    = 16;   ! number of rows
    integer, parameter  :: j    = 16;   ! number of columns
    integer             :: ierror,npe,rnk;

    call mpi_init(ierror);
    call mpi_comm_size(mpi_comm_world,npe,ierror)
    call mpi_comm_rank(mpi_comm_world,rnk,ierror)

    call mpi_finalize(ierror);
end program

I use

ifort test.f90

and get the following error.

ifort: error #10037: could not find 'link'

I've tried googling this error without any useful stuff. I don't have visual studios installed and as I understand I can compile code using command line without visual studios. Anyone willing to explain this to me or just point me to something I can read that would help I'd greatly appreciate it.

Longer story, is I just want to write code and compile it on my machine before porting it to HPC systems. I can't compile, test and run code there from bottom up. I'd like to do this on my windows machine, yes hate me I use windows instead of linux or macs. There are no fortran mpi compilers that are free unfortunately for windows, or I haven't been able to find one. Right now I'm running a trial version of the intel cluster hoping that maybe it'll be a solution for me. I can for example use the code::blocks ide to compile fortran open mp code. I don't expect to use the ide with the intel compiler as I don't think that's possible, but if I can use command lines to just compile code to test that it works I'll be very happy. Anyway sorry for being so ignorant but any help is greatly appreciated.

0 Kudos
7 Replies
TimP
Honored Contributor III
1,939 Views

It does look like, although the Microsoft version of MPICH is free, it would require Visual Studio (not just VS Shell provided with ifort).  As the Intel cluster studio package version of MPI includes Intel C++, it's not sold with the idea of use without Visual Studio, although the ifort part can be installed using just the bundled Visual Studio Shell which is paid for as part of the package price.    I was a little surprised at the idea that VS Shell might be available as part of a trial package.  Remember, Visual Studio is offered separately by Microsoft on 90-day trial.

Pre-built windows OpenMPI packages are available for use with gfortran and cygwin, but those aren't compatible with ifort.  However, it disproves your assertion about lack of free Windows MPI and compiler combinations.

0 Kudos
Armen_O_
Beginner
1,939 Views

Hi Tim,

Thank you so much for such a speedy reply. You're right Open MPI does support fotran 77 but that's quite old and I rather not write in that. We use fortran 90 only because it is widely supported on hpc machines. Hmm, it seems I'll just have to run a linux partition, such is life heh. Once again thanks for your help and time.

0 Kudos
TimP
Honored Contributor III
1,939 Views

There's no restriction to f77 in MPI.  OpenMPI just added Fortran08 bindings (for gfortran); you would need to rebuild with the latest source to get those.   Anyway I think OpenMPI is one of the most up to date.  I doubt such a new version is "widely supported on hpc."

0 Kudos
Armen_O_
Beginner
1,939 Views

Thank you for the additional comment. The reason why I was under the impression that Open MPI for windows only supports fortran 77 came from the following website

https://www.open-mpi.org/software/ompi/v1.6/ms-windows.php

Guess I'll have to look into it in more detail.

0 Kudos
TimP
Honored Contributor III
1,939 Views

If it makes you feel better, OpenMPI has changed the name of the Fortran wrapper to mpifort since that page went up.  That name is used no matter which Fortran compiler it's built with.  At one time, MPI might have offered both mpif77 and mpif90, in case the compilers differed, but normally those were identical.  It's just confusing enough that you need to read the docs and check with your sysadmin.  Intel MPI uses mpiifort for ifort and mpif90 for gfortran, but some installations prefer to change that.  If the MPI is built with a compiler which follows the typical convention of .f defaulting to fixed source form and .f90 defaulting to free form, the same convention carries over to the MPI wrapper (even in the cases of mpif77 and mpif90).

0 Kudos
Armen_O_
Beginner
1,939 Views

Thank you once again Tim for all the help. It doesn't make me feel better, but makes me optimistic that maybe I can get mpi + fortran running on my windows machine if I spend enough time on it :).

0 Kudos
Steven_L_Intel1
Employee
1,939 Views

If you have further questions, consider asking in Intel® Clusters and HPC Technology where the MPI experts hang out.

0 Kudos
Reply