📄 readme
字号:
Copyright (c) 2001-2003 The Trustees of Indiana University. All rights reserved.Copyright (c) 1998-2001 University of Notre Dame. All rights reserved.Copyright (c) 1994-1998 The Ohio State University. All rights reserved.This file is part of the LAM/MPI software package. For licenseinformation, see the LICENSE file in the top level directory of theLAM/MPI source distribution.$HEADER$Mandelbrot is a simple example of the master/slave parallelprogramming technique, written in C. It runs one master process whichdynamically spawns any number of slaves. Because the programdynamically spawns slave processes, you only need to launch themaster. The master writes the computed image into a Sun rasterfileformatted file. Try viewing it with X11/xv.This application contains some degree of fault tolerance. Slave*nodes* can die and the application will continue with less slaves, aslong as one slave is alive. If an individual slave dies, the entireprocess will abort -- this example is aimed at showing that LAM/MPIcan continue if an entire node (including the LAM daemon on that node)crashes. To test this, try executing the 'tkill' program on a slavenode while the program is running. This will kill the LAM daemon andslave process on that node. (Do not run 'tkill' on the node with themaster.)Note that this application is only an example, and is not afull-featured fault-tolerant application. For example, if a slavedies, the manager does not contain any extra logic to reassign thelost work to a different slave. As such, the resulting output imagemay contain a "hole" showing the work that would have been performedby the dead slave. Making the manager more robust is an exercise leftfor the reader. :-)This feature relies on the MPI system reporting errors on MPIfunctions whose communicator includes a dead slave. Since theapplication creates a separate communicator for each slave, the masterwill know from a returned error which slave has died. The applicationcannot tolerate the untimely death of the master, although this couldbe done with mirroring.Use "make" to compile this example. Make will use mpicc to compileboth programs: mpicc -o master master.c mpicc -o slave slave.c To run this program, first boot LAM across your cluster with the"lamboot" command. Then, you can run the master program on one nodewith mpirun: mpirun n0 ./masteror you can launch "master" directly without lamboot, since thisprogram only needs an MPI_COMM_WORLD size of one rank: ./masterNOTE: This example requires that the executable "slave" be availableon all nodes.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -