MPICH 2 , Version 1.8 Installation and user guide on ... - operation21

http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads ... For exemple, i want to run the file test.exe on my machine called TOTO.
523KB taille 5 téléchargements 225 vues
MPICH 2 , Version 1.8 ­ Installation and user guide on  WINDOWS XP By Philippe Bayard

Table of Contents 1. Required softwares : ........................................................................................................................3 2. Other.................................................................................................................................................3 3. Installation........................................................................................................................................3 4. Mpich2..............................................................................................................................................4  4.1 Mpiconfig..................................................................................................................................4  4.2 Mpiexec.....................................................................................................................................5  4.3 Mpiregister................................................................................................................................6 5. Compile with Visual Studio 2005....................................................................................................7

1. Required softwares :  –







mpich2­1.0.8­win­ia32.msi  ­ Mpich2 librairies and softwares Official download page :  http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads  Cygwin  ­ For the communications between the machines in the cluster Download link : http://www.cygwin.com/setup.exe .Net Framework 1.1  ­ To execute the code http://www.microsoft.com/downloads/details.aspx?FamilyID=262D25E3­ F589­4842­8157­034D1E7CF3A3&displaylang=fr Visual Studio 2005 Express (at least VS 2003) ­ To devellop applications http://www.microsoft.com/express/2005/ 

2. Other All the machine on the cluster must use the same user. So create an user on your machine  (for exemple « mpiuser ») with normal access (not admin) and set a password (for exemple  « code »). All the machine must be in the same workgroup. By default any machine is on the  workgroup « WORKGROUP », just let it like it is, or change it if you want.

3. Installation    The installation is really simple. Just launch the installer and follows the instructions   What you just need to know is that all the machines on the cluster must have the same  passphrase to work together. The default passphrase is « behappy ».  

4. Mpich2   Mpich2 contains a lot of usefull softs to help you.  4.1 Mpiconfig MPIconfig is a tool to scan the network and find the machine of the cluster. And  configure them whitout need to go on each machine to do it.  You just need to select a workgroup, then get the host on this network. You can know  scan them to see if they have mpich2 installed or not. If they have, then – IF YOU ARE  REGISTERED (see MPIregister) – you can configure the machine of the cluster.

4.2 Mpiexec This software is a tool to execute your MPI programs. You can use the console  (Start> Execute – cmd) to launch your application using commands but this small program  is really easy to use. You must pick the application to run, then run it by pushing on the execute button.  You can add additional option but clicking on the combo box under the console.  (For exemple, select the host you want to use, or add the « ­localonly » parameter to run  your code only on this machine) To run an application on all the machine of the cluster, you must put your executable  on a shared directory on the network.  For exemple, i want to run the file test.exe on my machine called TOTO. So I create  the shared directory Shared, put my executable in this file, then the path to execute my  application became : \\TOTO\Shared\test.exe. 

4.3 Mpiregister MPIregister is a small tool to encode the user and password you want to use for  Mpiconfig and Mpiexec. If you followed all the installation process like we said, then just  put mpiuser // code and it's ok.  You can use the button register to write the login and password in the memory of this  small tool.

5. Compile with Visual Studio 2005 To compile your code with Visual Studio using the MPI libraries, you must add them  in the options of visual studio.  Go in the « Tools> Option menu ».  

Then click on « Projects and Solutions » and select VC++ Directories.

Select to show directories for the include : 

And add the directory include in the mpich folder of the installation (By default it is  c:\Program Files\MPICH2\include) 

So you have this :

Do the same for the lib folder (Show directories ­> Library, then add MPICH2/lib folder)

And finally, add the file mpi.lib to your project. You can find it in the MPICH2/lib folder  that you just add.

You can now compile any code with MPI references. But not run it, you need to use  MPIexec to do it.