Rate This Document
Findability
Accuracy
Completeness
Readability

Running and Verifying AMG

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to create a hostfile file and add node information:
    echo -e 'node1\nnode2\n…\nnodex' > /path/to/HOSTFILE
    • In the preceding command, node1, node2, ..., and nodex indicate the host names of the nodes. You can run the hostname command to query the host names. \n indicates a newline character.
    • This step is mandatory when multiple nodes are running and can be skipped when only one node is running.
  3. Run the following command to go to the test directory. After the compilation, the amg binary file is generated.
    cd /path/to/AMG/AMG-1.2/test
  4. Run the following command to run the amg binary file:
    mpirun --allow-run-as-root -mca btl ^openib --hostfile /path/to/HOSTFILE  -x OMP_NUM_THREADS=1 -x PATH -x LD_LIBRARY_PATH -N 96 amg -P 4 6 4 -n 100 100 100 -printstats
    • -p <Px> <Py> <Pz>: defines the processor topology for each part. The total number of MPI processes is Px * Py * Pz.
    • -n <nx> <ny> <nz>: defines the size of each processor for problems of the multi-dimensional data set. The -n option allows each MPI process to specify the size of a local problem, generating the global problem size of <Pz> * <nz> for <Px> * <nx> and <Py> * <ny>.
    • -printstats: displays detailed information about the AMG preprocessor and the number of iterations.
    • -N: indicates the number of tasks on each node. The value of Px * Py * Pz must be equal to the value of -N multiplied by the number of nodes.
    • If only one node is running, run the following command:
      mpirun --allow-run-as-root -mca btl ^openib -x OMP_NUM_THREADS=1 -np 96 amg -P 4 6 4 -n 100 100 100 -printstats

    The following is an example of the command output:

    BoomerAMG SOLVER PARAMETERS:
      Maximum number of cycles:         1
      Stopping Tolerance:               0.000000e+00
      Cycle type (1 = V, 2 = W, etc.):  1
      Relaxation Parameters:
       Visiting Grid:                     down   up  coarse
                Number of sweeps:            2    2     1
       Type 0=Jac, 3=hGS, 6=hSGS, 9=GE:     18   18     9
       Point types, partial sweeps (1=C, -1=F):
                      Pre-CG relaxation (down):   0   0
                       Post-CG relaxation (up):   0   0
                                 Coarsest grid:   0
    =============================================
    Problem 1: AMG Setup Time:
    =============================================
    PCG Setup:
      wall clock time = 6.333697 seconds
      wall MFLOPS     = 0.000000
      cpu clock time  = 6.350000 seconds
      cpu MFLOPS      = 0.000000
    FOM_Setup: nnz_AP / Setup Phase Time: 4.452531e+08
    =============================================
    Problem 1: AMG-PCG Solve Time:
    =============================================
    PCG Solve:
      wall clock time = 34.855871 seconds
      wall MFLOPS     = 0.000000
      cpu clock time  = 34.860000 seconds
      cpu MFLOPS      = 0.000000
    Iterations = 23
    Final Relative Residual Norm = 6.624473e-09
    FOM_Solve: nnz_AP * Iterations / Solve Phase Time: 1.860870e+09
    Figure of Merit (FOM_1): 1.506966e+09