|
| 1 | +# Big Count Collectives Tests |
| 2 | + |
| 3 | +This test suite is for testing with large **count** payload operations. Large payload is defined as: |
| 4 | + |
| 5 | + > total payload size (count x sizeof(datatype)) is greater than UINT_MAX (4294967295 =~ 4 GB) |
| 6 | +
|
| 7 | +| Test Suite | Count | Datatype | |
| 8 | +| ---------- | ----- | -------- | |
| 9 | +| N/A | small | small | |
| 10 | +| BigCount | **LARGE** | small | |
| 11 | +| [BigMPI](https://github.com/jeffhammond/BigMPI) | small | **LARGE** | |
| 12 | + |
| 13 | + * Assumes: |
| 14 | + - Roughly the same amount of memory per node |
| 15 | + - Same number of processes per node |
| 16 | + |
| 17 | +## Building |
| 18 | + |
| 19 | +``` |
| 20 | +make clean |
| 21 | +make all |
| 22 | +``` |
| 23 | + |
| 24 | +## Running |
| 25 | + |
| 26 | +For each unit test two different binaries are generated: |
| 27 | + * `test_FOO` : Run with a total payload size as close to `INT_MAX` as possible relative to the target datatype. |
| 28 | + * `test_FOO_uniform_count` : Run with a uniform count regardless of the datatype. Default `count = 2147483647 (INT_MAX)` |
| 29 | + |
| 30 | +Currently, the unit tests use the `int` and `double _Complex` datatypes in the MPI collectives. |
| 31 | + |
| 32 | +``` |
| 33 | +mpirun --np 8 --map-by ppr:2:node --host host01:2,host02:2,host03:2,host04:2 \ |
| 34 | + -mca coll basic,inter,libnbc,self ./test_allreduce |
| 35 | +
|
| 36 | +mpirun --np 8 --map-by ppr:2:node --host host01:2,host02:2,host03:2,host04:2 \ |
| 37 | + -x BIGCOUNT_MEMORY_PERCENT=15 -x BIGCOUNT_MEMORY_DIFF=10 \ |
| 38 | + --mca coll basic,inter,libnbc,self ./test_allreduce |
| 39 | +
|
| 40 | +mpirun --np 8 --map-by ppr:2:node --host host01:2,host02:2,host03:2,host04:2 \ |
| 41 | + -x BIGCOUNT_MEMORY_PERCENT=15 -x BIGCOUNT_MEMORY_DIFF=10 \ |
| 42 | + --mca coll basic,inter,libnbc,self ./test_allreduce_uniform_count |
| 43 | +``` |
| 44 | + |
| 45 | +Expected output will look something like the following. Notice that depending on the `BIGCOUNT_MEMORY_PERCENT` environment variable you might see the collective `Adjust count to fit in memory` message as the test harness is trying to honor that parameter. |
| 46 | +``` |
| 47 | +shell$ mpirun --np 4 --map-by ppr:1:node --host host01,host02,host03,host04 \ |
| 48 | + -x BIGCOUNT_MEMORY_PERCENT=6 -x BIGCOUNT_MEMORY_DIFF=10 \ |
| 49 | + --mca coll basic,inter,libnbc,self ./test_allreduce_uniform_count |
| 50 | +----------------------:----------------------------------------- |
| 51 | +Total Memory Avail. : 567 GB |
| 52 | +Percent memory to use : 6 % |
| 53 | +Tolerate diff. : 10 GB |
| 54 | +Max memory to use : 34 GB |
| 55 | +----------------------:----------------------------------------- |
| 56 | +INT_MAX : 2147483647 |
| 57 | +UINT_MAX : 4294967295 |
| 58 | +SIZE_MAX : 18446744073709551615 |
| 59 | +----------------------:----------------------------------------- |
| 60 | + : Count x Datatype size = Total Bytes |
| 61 | +TEST_UNIFORM_COUNT : 2147483647 |
| 62 | +V_SIZE_DOUBLE_COMPLEX : 2147483647 x 16 = 32.0 GB |
| 63 | +V_SIZE_DOUBLE : 2147483647 x 8 = 16.0 GB |
| 64 | +V_SIZE_FLOAT_COMPLEX : 2147483647 x 8 = 16.0 GB |
| 65 | +V_SIZE_FLOAT : 2147483647 x 4 = 8.0 GB |
| 66 | +V_SIZE_INT : 2147483647 x 4 = 8.0 GB |
| 67 | +----------------------:----------------------------------------- |
| 68 | +--------------------- |
| 69 | +Results from MPI_Allreduce(int x 2147483647 = 8589934588 or 8.0 GB): |
| 70 | +Rank 3: PASSED |
| 71 | +Rank 2: PASSED |
| 72 | +Rank 1: PASSED |
| 73 | +Rank 0: PASSED |
| 74 | +--------------------- Adjust count to fit in memory: 2147483647 x 50.0% = 1073741823 |
| 75 | +Root : payload 34359738336 32.0 GB = 16 dt x 1073741823 count x 2 peers x 1.0 inflation |
| 76 | +Peer : payload 34359738336 32.0 GB = 16 dt x 1073741823 count x 2 peers x 1.0 inflation |
| 77 | +Total : payload 34359738336 32.0 GB = 32.0 GB root + 32.0 GB x 0 local peers |
| 78 | +--------------------- |
| 79 | +Results from MPI_Allreduce(double _Complex x 1073741823 = 17179869168 or 16.0 GB): |
| 80 | +Rank 3: PASSED |
| 81 | +Rank 2: PASSED |
| 82 | +Rank 0: PASSED |
| 83 | +Rank 1: PASSED |
| 84 | +--------------------- |
| 85 | +Results from MPI_Iallreduce(int x 2147483647 = 8589934588 or 8.0 GB): |
| 86 | +Rank 2: PASSED |
| 87 | +Rank 0: PASSED |
| 88 | +Rank 3: PASSED |
| 89 | +Rank 1: PASSED |
| 90 | +--------------------- Adjust count to fit in memory: 2147483647 x 50.0% = 1073741823 |
| 91 | +Root : payload 34359738336 32.0 GB = 16 dt x 1073741823 count x 2 peers x 1.0 inflation |
| 92 | +Peer : payload 34359738336 32.0 GB = 16 dt x 1073741823 count x 2 peers x 1.0 inflation |
| 93 | +Total : payload 34359738336 32.0 GB = 32.0 GB root + 32.0 GB x 0 local peers |
| 94 | +--------------------- |
| 95 | +Results from MPI_Iallreduce(double _Complex x 1073741823 = 17179869168 or 16.0 GB): |
| 96 | +Rank 2: PASSED |
| 97 | +Rank 0: PASSED |
| 98 | +Rank 3: PASSED |
| 99 | +Rank 1: PASSED |
| 100 | +``` |
| 101 | + |
| 102 | +## Environment variables |
| 103 | + |
| 104 | + * `BIGCOUNT_MEMORY_DIFF` (Default: `0`): Maximum difference (as integer in GB) in total available memory between processes. |
| 105 | + * `BIGCOUNT_MEMORY_PERCENT` (Default: `80`): Maximum percent (as integer) of memory to consume. |
| 106 | + * `BIGCOUNT_ENABLE_NONBLOCKING` (Default: `1`): Enable/Disable the nonblocking collective tests. `y`/`Y`/`1` means Enable, otherwise disable. |
| 107 | + * `BIGCOUNT_ALG_INFLATION` (Default: `1.0`): Memory overhead multiplier for a given algorithm. Some algorithms use internal buffers relative to the size of the payload and/or communicator size. This envar allow you to account for that to help avoid Out-Of-Memory (OOM) scenarios. |
| 108 | + |
| 109 | +## Missing Collectives (to do list) |
| 110 | + |
| 111 | +Collectives missing from this test suite: |
| 112 | + * Barrier (N/A) |
| 113 | + * Alltoallv |
| 114 | + * Reduce_scatter |
| 115 | + * Scan / Exscan |
0 commit comments