Easy configuration MPICH2 parallel environment in the Windows environment

xiaoxiao2021-03-06  42

MPICH2 parallel environment easy configuration of the Windows environment: Dr Yan Haoming Date:. Oct 19,2004-10-20 e-mail:. Yhmwhigg@yahoo.com.cn many Windows users in the application of parallel environment, found on the project Setting is very troublesome, in fact, this problem can be easily solved. This article will make a simple introduction to how MPICH2 parallel computing in the COMPAQ Visual Fortran 6.5 environment. First, introduce MPICH2 installation, MPICH2 can download http://www-unix.mcs.anl.gov/mpi/mpich2/32/2/32, I downloaded the Win32 IA32 platform installer http: // www- Unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-0.971-2-win32-ia32.msi. Install this program under Windows, its default installation directory is C: / Program Files / MPICH2. There are four subdirectories in this directory, which are bin, example, include, and lib. There are two execution files, smPD.exe, and mpiexec.exe in the bin directory. It will be introduced later. Write the BIN directory to the path path variable in the "My Computer" environment variable settings so that you can perform files in this directory (or you can get your copy to the work directory, if you don't get involved ). Second, set the CVF6.5 environment, this step needs to write MPICH2's include and lib directory into the CVF6.5 search directory. It is, please refer to the setting process to illustrate cvfdemo.html, where it is to be noted that the corresponding directory in the graphic is converted into include and libs in the MPICH2 directory. After the setting is complete, copy the MPICH2.MOD file in this compressed package to the include subdirectory under the MPICH2 directory. MPICH2.MOD is an interface program I have written ourselves to simplify environment settings between CVF6.5 and MPICH2, which must be placed in the right place. Finally, describe how to run parallel programs. There is an example of a FORTRAN encoding in this compression package Hello.f90, which can be compiled directly in the CVF6.5 environment. Note that the top of all parallel procedures must be added to the "USE MPICH2" in the future. This will be compiled and compiled correctly. After compiling, you will find the executable Hello.exe under the subdirectories of the current working directory. In the DOS command line mode, enter the debug directory, first type "SMPD" Enter, start calling the parallel running service, then perform "Mpiexec -N 5 Hello", you can see the Hello.exe program run results. Of course, "5" here is the number of nodes, you can change this value, try it yourself. OK, congratulations, now you can run a complete parallel program. To become a master, you have to work hard. Good luck.

转载请注明原文地址:https://www.9cbs.com/read-59457.html

New Post(0)