[mpich2-dev] gfortran on Windows - undefined references

Vinit Satav vinitsatav at nous.soft.net
Wed Aug 18 02:26:43 CDT 2010


When trying to compile my code using gfortran on Windows, I get the following error:

      USE MPI
               1
Fatal Error: File 'mpi.mod' opened at (1) is not a GFORTRAN module file
gfortran: Internal error: Aborted (program f951)

To fix this, I tried the following:

1.       From the definitions in mpif.h (in folder 'include'), I created a new module MPI (in file mpi.f90)

2.       Compiled mpi.f90 using gfortran to get a new mpi.mod.

3.       Compiled my code using the new module file successfully.

However, during runtime I got the following error messages:
 undefined reference to `mpi_bcast_'
 undefined reference to `mpi_send_'
 undefined reference to `mpi_bcast_'
 undefined reference to `mpi_recv_'
 undefined reference to `mpi_wait_'
 undefined reference to `mpi_irecv_'
 undefined reference to `mpi_test_'
 undefined reference to `mpi_irecv_'
 undefined reference to `mpi_finalize_'
 undefined reference to `mpi_init_'
 undefined reference to `mpi_comm_rank_'
 undefined reference to `mpi_comm_size_'
 collect2: ld returned 1 exit status

I had used fmpich2g.lib while executing the code.

How do I fix these undefined references?

My system configuration is:

a.       Windows XP SP3 - Intel Core2 Duo

b.      MPICH2-1.2.1p1 (Windows IA32 (binary))

c.       gfortran (version 4.4.0) - MinGW build

Regards,
Vinit Satav


________________________________
NOUS INFOSYSTEMS DISCLAIMER :
------------------------------------------------------------
This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual(s) or entity(ies) named in the e-mail address. If you are not the intended recipient, please reply to the postmaster at nous.soft.net, so that arrangements can be made for proper delivery, and then please delete all copies and attachments. Any disclosure, copying, distribution, or reliance upon the contents of this e-mail, by any other than the intended recipients, is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich2-dev/attachments/20100818/81e414dd/attachment.htm>


More information about the mpich2-dev mailing list