[mpich-discuss] MPICH Linking error with CVF 6.6c under windows XP

jayesh at mcs.anl.gov jayesh at mcs.anl.gov
Wed Dec 16 09:50:35 CST 2009


Hi,
 Please send me a zip of your complete source and I can take a look at it. Do you have multiple main routines in your code (The compiler seems to be complaining that you have main, program main, defined in both main_program.f90 and mpi_comm.test.f90. It is also complaining about being unable to find the definition of OK_CARTESIAN_LAYOUT invoked in layout_mpi.f90)?

(PS: This does not look like a bug in MPICH2 - more like a bug in makefile.)
Regards,
Jayesh
----- Original Message -----
From: "roman v." <bopohob at gmail.com>
To: jayesh at mcs.anl.gov
Sent: Wednesday, December 16, 2009 2:07:16 AM GMT -06:00 US/Canada Central
Subject: Re: [mpich-discuss] MPICH Linking error with CVF 6.6c under windows  XP

Hi Jayesh,

1)I am able to get an MPI hello world program to run
2)I am not passing strings via MPI (only integers and reals)
3)I do not have access to the Intel compiler, only Compaq Visual Fortran 6.6c
4)I was messing with MPICH, because I couldn't get MPICH2 to work.
But if you prefer I am attaching the make file for the failed MPICH2
linking, as well as the relevant subroutines and the error is below:

Linking...
mpi_comm_test.obj : error LNK2005: _MAIN__ already defined in MAIN_PROGRAM.OBJ
layout_mpi.obj : error LNK2001: unresolved external symbol
_OK_CARTESIAN_LAYOUT at 24
Debug/MAIN_PROGRAM.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

MAIN_PROGRAM.exe - 3 error(s), 0 warning(s)

Please let me know what to try next.  Thanks!

~Roman


2009/12/14  <jayesh at mcs.anl.gov>:
> Hi,
>  Which version of MPICH2 are using (From the makefile looks like you are using an old version of MPICH - The latest version of MPICH2 is available at http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads)? The location of the mod files should be "c:\program files\MPICH2\include" (if your installation directory is the default - c:\program files\MPICH2) and the lib files (fmpich2s.lib) should be located at "c:\program files\MPICH2\lib".
>  If you are using CHARACTER strings in your MPI program make sure that you disable mixed string length arguments (add "/iface:nomixed_str_len_arg" to your compiler flags) when compiling your code. If you disable the mixed string length args you should be able to compile/run your program successfully with fmpich2s.lib .
>  First try compiling a simple helloworld program following the suggestions above and let us know if it works.
>
> Regards,
> Jayesh
>
> ----- Original Message -----
> From: "Jayesh Krishna" <jayesh at mcs.anl.gov>
> To: mpich-discuss at mcs.anl.gov
> Sent: Monday, December 14, 2009 9:58:56 AM GMT -06:00 US/Canada Central
> Subject: Re: [mpich-discuss] MPICH Linking error with CVF 6.6c under windows XP
>
> Hi,
>  Meanwhile, if you are not using CHARACTER strings in your MPI program (CHARACTER strings passed to MPI funcs) you should still be able to use fmpich2s.lib. Can you compile a simple MPI helloworld program ?
>
> (PS: There are known problems with fmpich2s.lib when using CHARACTER strings at runtime.)
> Regards,
> Jayesh
> ----- Original Message -----
> From: "Jayesh Krishna" <jayesh at mcs.anl.gov>
> To: mpich-discuss at mcs.anl.gov
> Sent: Monday, December 14, 2009 9:40:09 AM GMT -06:00 US/Canada Central
> Subject: Re: [mpich-discuss] MPICH Linking error with CVF 6.6c under windows XP
>
> Hi,
>  I just noticed the subject which said you are using CVF to compile your MPI programs. The library fmpich2s.lib does not seem to work as it was intended. Let me take a look at it and get back to you.
>
> (PS: If you have access to Intel fortran compiler things should work fine - using fmpich2.lib .)
> Regards,
> Jayesh
> ----- Original Message -----
> From: jayesh at mcs.anl.gov
> To: mpich-discuss at mcs.anl.gov
> Sent: Monday, December 14, 2009 9:35:47 AM GMT -06:00 US/Canada Central
> Subject: Re: [mpich-discuss] MPICH Linking error with CVF 6.6c under windows XP
>
> Hi,
>  Which compiler are you using (digital fortran ?)? Can you compile a simple MPI helloworld program ?
>
> Regards,
> Jayesh
>
> ----- Original Message -----
> From: "roman v." <bopohob at gmail.com>
> To: mpich-discuss at mcs.anl.gov
> Sent: Friday, December 11, 2009 7:40:03 PM GMT -06:00 US/Canada Central
> Subject: [mpich-discuss] MPICH Linking error with CVF 6.6c under windows XP
>
> Linking...
> mpi_comm_test.obj : error LNK2005: _MAIN__ already defined in MAIN_PROGRAM.OBJ
> Debug/MAIN_PROGRAM.exe : fatal error LNK1169: one or more multiply
> defined symbols found
> Error executing link.exe.
>
> MAIN_PROGRAM.exe - 2 error(s), 0 warning(s)
>
> The exported make file is attached.  Please let me know how to fix this.
>
> ps:  I am also trying to get the same thing to work with MPICH2 (I
> really don't care which one as long as at least one of them works.)
> There the linker can't gives an error when trying to link
> fmpich2s.lib, however I know that it sees the file, because when I
> tell it not to link to this file I get a lot of MPI errors as opposed
> to when it tries to link and fails.
>
> --
> Sincerely,
>
> Roman Voronov
>
> Chemical Engineering PhD Candidate
> ChE Graduate Senator 2005-2006
> Founder of the RUssian Speaking Student Association (RUSSA) - A
> Registered Student Organization of the University of Oklahoma
> (405) 796-4087 http://www.ou.edu/russa
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>



-- 
Sincerely,

Roman Voronov

Chemical Engineering PhD Candidate
ChE Graduate Senator 2005-2006
Founder of the RUssian Speaking Student Association (RUSSA) - A
Registered Student Organization of the University of Oklahoma
(405) 796-4087 http://www.ou.edu/russa


More information about the mpich-discuss mailing list