[MPICH] RE: Installation of MPICH2 - create an empty proj and add source files

Jayesh Krishna jayesh at mcs.anl.gov
Mon Feb 4 15:24:35 CST 2008


Hi,
 Are you sure that you selected a "Console application" when you created
your project ?
 When creating a project I usually select "File" --> "New" --> "Project" -->
"Visual C++" --> "General" --> "Empty project" . Then I add the required
source files to the project and set the lib/header file [paths]
appropriately.

Regards,
Jayesh
-----Original Message-----
From: JaeHyuk Kwack [mailto:jkwack2 at uiuc.edu] 
Sent: Monday, February 04, 2008 1:02 PM
To: Jayesh Krishna
Subject: RE: Installation of MPICH2

Dear Jayesh,

Thank you for your help...
I changed the configuration according to your advice.
But, I still cannot succeed to build my code. 
Error messages are as follows....

-------------------------------------------------------------
1>------ Rebuild All started: Project: MPI test (FEB02), Configuration: 
1>Debug Win32 ------ Deleting intermediate and output files for project 'MPI
test (FEB02)', configuration 'Debug|Win32'
1>Compiling...
1>1-D Lapalce Example.cpp
1>c:\documents and settings\jkwack2\my documents\visual studio 
1>2008\projects\cs554\mpi test (feb02)\mpi test (feb02)\1-d lapalce
example.cpp(32) : warning C4244: '=' : conversion from 'double' to 'float',
possible loss of data Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol 
1>_WinMain at 16 referenced in function ___tmainCRTStartup C:\Documents and 
1>Settings\jkwack2\My Documents\Visual Studio 2008\Projects\CS554\MPI test
(FEB02)\Debug\MPI test (FEB02).exe : fatal error LNK1120: 1 unresolved
externals Build log was saved at "file://c:\Documents and
Settings\jkwack2\My Documents\Visual Studio 2008\Projects\CS554\MPI test
(FEB02)\MPI test (FEB02)\Debug\BuildLog.htm"
1>MPI test (FEB02) - 2 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
-------------------------------------------------------------

How can I fix this problem?
My compiler is 'MS Visual C++ 2008 Express edition'.
Please let me know what I have to do.....
Thank you...

Sincerely,

JaeHyuk Kwack



---- Original message ----
>Date: Mon, 4 Feb 2008 10:49:07 -0600
>From: "Jayesh Krishna" <jayesh at mcs.anl.gov>
>Subject: RE: Installation of MPICH2
>To: <jkwack2 at uiuc.edu>
>Cc: <mpich2-maint at mcs.anl.gov>, "'William Gropp'" <wgropp at uiuc.edu>
>
>   Hi,
>    You should specify mpi.lib in "Configuration
>   Properties" --> Linker --> "Additional dependencies"
>   field of your project's property pages.
>    Let us know if you need further help.
>
>   Regards,
>
>   Jayesh
>
>     ------------------------------------------------
>
>   From: William Gropp [mailto:wgropp at uiuc.edu]
>   Sent: Sunday, February 03, 2008 10:05 PM
>   To: jkwack2 at uiuc.edu
>   Cc: mpich2-maint at mcs.anl.gov
>   Subject: Re: Installation of MPICH2
>   I'm sending this to the mpich2-maint list - they
>   should be able to help you. With earlier versions of
>   Visual Studio, there was an option meno that
>   included a place for the include path and the
>   libraries. I'm a Mac user now, so I don't have a
>   system on which I can check it out. I'm out of town
>   until Wednesday night - I'll be happy to have a look
>   on Thursday after class if you are still having
>   problems.
>   Bill
>   On Feb 3, 2008, at 4:27 PM, JaeHyuk Kwack wrote:
>
>     Dear Prof. Gropp
>     Hi, I am JaeHyuk Kwack in your CS554 class.
>     I installed MPICH2 in my laptop.
>     Because my laptop has Window XP sp2, I installed
>     'mpich2-1.0.6p1-win32-ia32.msi' file.
>     After that, I have tried to compile a simple code
>     which is 'MPI program for 1-D Lapalce Example' in
>     your lecture note.
>     But, I cannot do that.
>     Accroding to 'Readme.txt', I added include path
>     and lib path.
>     But I don't understand how to add mpi.lib to my
>     target link command.
>     Although I am a Fortran programmer, I am trying to
>     use MS Visual C++ 2008 express edition, because of
>     many C++ examples for MPI pogram.
>     So, I am very unfamiliar with this.
>     Could you help me?
>     If possible, please look into my laptop.
>     Please let me know when you are able to meet me.
>     Thank you....
>     Sincerely,
>     JaeHyuk Kwack
>
>   William Gropp
>   Paul and Cynthia Saylor Professor of Computer
>   Science
>   University of Illinois Urbana-Champaign





More information about the mpich-discuss mailing list