MPICH2 Windows Development Guide Version 1.4.1 Mathematics and Computer Science Division Argonne National Laboratory 9.11.2 Visual Studio 2005 You can use the example projects provided with Visual Studio 2005 and use it as a guide to create your own projects. 1. Create a project and add your source files. 2. Bring up the properties dialog for your project by right clicking the project name and selecting Properties. 3. Navigate to Configuration Properties::C/C++::General ---> I changed to Fortran: General 4. Add C:\Program Files\MPICH2\include to the “Additional Include Directories” box. 5. Navigate to Configuration Properties::Linker::General 6. Add C:\Program Files\MPICH2\lib to the “Aditional Library Directories” box. 7. Navigate to Configuration Properties::Linker::Input 8. Add cxx.lib and mpi.lib and fmpich2.lib to the “Additional Dependencies” box. If your application is a C application then it only needs mpi.lib. If it is a C++ application then it needs both cxx.lib and mpi.lib. If it is a Fortran application then it only needs one of the fmpich2[s,g].lib libraries. The fortran library comes in three flavors fmpich2.lib, fmpich2s.lib and fmpich2s.lib. fmpich2.lib contains all uppercase symbols and uses the C calling convention like this: MPI INIT. fmpich2s.lib contains all uppercase symbols and uses the stdcall calling convention like this: MPI INIT@4. fmpich2g.lib contains all lowercase symbols with double underscores and the C calling convention like this: mpi init . Add the library that matches your Fortran compiler. ---> I used fmpich2.lib, also tried fmpich2g.lib 9. Compile your application.