📄 readme
字号:
Some info about the MG benchmark(Note: this info applies to the parallel version and mostly concernsthe processor decomposition. Info not concerning the decompositionstill applies to the serial version.)================================ 'mg_demo' demonstrates the capabilities of a very simple multigridsolver in computing a three dimensional potential field. This isa simplified multigrid solver in two important respects: (1) it solves only a constant coefficient equation, and that only on a uniform cubical grid, (2) it solves only a single equation, representing a scalar field rather than a vector field.We chose it for its portability and simplicity, and expect that asupercomputer which can run it effectively will also be able torun more complex multigrid programs at least as well. Eric Barszcz Paul Frederickson RIACS NASA Ames Research Center NASA Ames Research Center========================================================================Running the program: (Note: also see parameter lm information in the two sections immediately below this section)The program may be run with or without an input deck (called "mg.input"). The following describes a few things about the input deck if you want to use one. The four lines below are the "mg.input" file required to run aproblem of total size 256x256x256, for 4 iterations (Class "A"),and presumes the use of 8 processors: 8 = top level 256 256 256 = nx ny nz 4 = nit 0 0 0 0 0 0 0 0 = debug_vecThe first line of input indicates how many levels of multi-gridcycle will be applied to a particular subpartition. Presuming that8 processors are solving this problem (recall that the number of processors is specified to MPI as a run parameter, and MPI subsequentlydetermines this for the code via an MPI subroutine call), a 2x2x2 processor grid is formed, and thus each partition on a processor is of size 128x128x128. Therefore, a maximum of 8 multi-grid levels may be used. These are of size 128,64,32,16,8,4,2,1, with the coarsest level being a single point on a given processor.Next, consider the same size problem but running on 1 processor. Thefollowing "mg.input" file is appropriate: 9 = top level 256 256 256 = nx ny nz 4 = nit 0 0 0 0 0 0 0 0 = debug_vecSince this processor must solve the full 256x256x256 problem, thispermits 9 multi-grid levels (256,128,64,32,16,8,4,2,1), resulting in a coarsest multi-grid level of a single point on the processorNext, consider the same size problem but running on 2 processors. Thefollowing "mg.input" file is required: 8 = top level 256 256 256 = nx ny nz 4 = nit 0 0 0 0 0 0 0 0 = debug_vecThe algorithm for partitioning the full grid onto some power of 2 number of processors is to start by splitting the last dimension of the grid(z dimension) in 2: the problem is now partitioned onto 2 processors.Next the middle dimension (y dimension) is split in 2: the problem is nowpartitioned onto 4 processors. Next, first dimension (x dimension) issplit in 2: the problem is now partitioned onto 8 processors. Next, thelast dimension (z dimension) is split again in 2: the problem is nowpartitioned onto 16 processors. This partitioning is repeated until all of the power of 2 processors have been allocated.Thus to run the above problem on 2 processors, the grid partitioning algorithm will allocate the two processors across the last dimension, creating two partitions each of size 256x256x128. The coarsest level of multi-grid must be a single point surrounded by a cubic number of grid points. Therefore, each of the two processor partitions will contain 4 coarsest multi-grid level points, each surrounded by a cube of grid points of size 128x128x128, indicated by a top level of 8.Next, consider the same size problem but running on 4 processors. Thefollowing "mg.input" file is required: 8 = top level 256 256 256 = nx ny nz 4 = nit 0 0 0 0 0 0 0 0 = debug_vecThe partitioning algorithm will create 4 partitions, each of size256x128x128. Each partition will contain 2 coarsest multi-grid levelpoints each surrounded by a cube of grid points of size 128x128x128, indicated by a top level of 8.Next, consider the same size problem but running on 16 processors. Thefollowing "mg.input" file is required: 7 = top level 256 256 256 = nx ny nz 4 = nit 0 0 0 0 0 0 0 0 = debug_vecOn each node a partition of size 128x128x64 will be created. A maximumof 7 multi-grid levels (64,32,16,8,4,2,1) may be used, resulting in each partions containing 4 coarsest multi-grid level points, each surrounded by a cube of grid points of size 64x64x64, indicated by a top level of 7.Note that non-cubic problem sizes may also be considered:The four lines below are the "mg.input" file appropriate for running aproblem of total size 256x512x512, for 20 iterations and presumes the use of 32 processors (note: this is NOT a class C problem): 8 = top level 256 512 512 = nx ny nz 20 = nit 0 0 0 0 0 0 0 0 = debug_vecThe first line of input indicates how many levels of multi-gridcycle will be applied to a particular subpartition. Presuming that32 processors are solving this problem, a 2x4x4 processor grid isformed, and thus each partition on a processor is of size 128x128x128.Therefore, a maximum of 8 multi-grid levels may be used. These are ofsize 128,64,32,16,8,4,2,1, with the coarsest level being a single point on a given processor.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -