Memtest Diagnostic#
The memtest plugin detects framebuffer-memory corruption by writing and
verifying configurable data and address patterns. Its patterns exercise
address selection, stored bit values, block movement, retention, and sustained
memory access to expose pattern-dependent memory faults.
Availability and prerequisites#
The canonical test name is memtest. It runs on selected physical GPUs. The
plugin requires enough free and allocatable framebuffer memory to satisfy
minimum_allocation_percentage. Run it on idle GPUs so that competing
allocations do not prevent testing.
Behavior#
The pattern set is similar to the algorithms described by MemTest86.
Test patterns#
Note
Runtimes are averages for one iteration on a single A100 40 GB GPU.
test0— Walking 1 bitThis test changes one bit at a time in memory to determine whether it affects a different memory location. It is designed to test the address wires.
- Average runtime:
Approximately 3 seconds.
test1— Address checkEach memory location is filled with its own address, then checked to confirm that its value still matches the address.
- Average runtime:
Less than 1 second.
test2— Moving inversions, ones and zerosThis test uses the moving-inversions algorithm from MemTest86 with patterns of all ones and all zeros.
- Average runtime:
Approximately 4 seconds.
test3— Moving inversions, 8-bit patternThis test uses the same algorithm as
test1with an 8-bit-wide pattern of walking ones and zeros.- Average runtime:
Approximately 4 seconds.
test4— Moving inversions, random patternThis test uses the same algorithm as
test1, but the data pattern is a random number and its complement. It uses 60 patterns. The random-number sequence changes with each pass, so multiple passes can increase the test’s effectiveness.- Average runtime:
Approximately 2 seconds.
test5— Block move, 64 movesThis test initializes memory with shifting patterns that are inverted every 8 bytes. It then moves the memory blocks and checks the data patterns after the moves are complete.
- Average runtime:
Approximately 1 second.
test6— Moving inversions, 32-bit patternThis variation of the moving-inversions algorithm shifts the data pattern left by one bit for each successive address. The test makes 32 passes to use all possible data patterns.
- Average runtime:
Approximately 155 seconds.
test7— Random-number sequenceThis test initializes a 1 MB block of memory with random patterns. It uses these patterns and their complements in moving-inversion tests across the rest of memory.
- Average runtime:
Approximately 2 seconds.
test8— Modulo 20, random patternThis test generates a random pattern and writes it to every 20th memory location. It writes the pattern’s complement to the remaining locations. It repeats this process 20 times, shifting the locations that receive the pattern each time.
- Average runtime:
Approximately 10 seconds.
test9— Bit fade, two patternsThis test initializes all memory with a pattern, waits for one minute, and then examines memory for changed bits. It tests both all-one and all-zero patterns.
- Average runtime:
Approximately 244 seconds.
test10— Memory stressThis test generates a random pattern and launches a large kernel that sets all memory to that pattern. It then launches a read-and-write kernel to check for errors and set memory to the pattern’s complement. The process repeats 1,000 times for one pattern. The kernel is designed to maximize bandwidth to GPU global memory.
- Average runtime:
Approximately 6 seconds.
Note
By default, test7 and test10 alternate for 10 minutes. The
diagnostic fails if either test detects an error.
Parameters#
Pattern selection#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
Boolean |
|
Enable the walking-1-bit test. |
|
Boolean |
|
Enable the address-check test. |
|
Boolean |
|
Enable the moving-inversions ones-and-zeros test. |
|
Boolean |
|
Enable the moving-inversions 8-bit-pattern test. |
|
Boolean |
|
Enable the moving-inversions random-pattern test. |
|
Boolean |
|
Enable the block-move test. |
|
Boolean |
|
Enable the moving-inversions 32-bit-pattern test. |
|
Boolean |
|
Enable the random-number-sequence test. |
|
Boolean |
|
Enable the modulo-20 random-pattern test. |
|
Boolean |
|
Enable the bit-fade test. |
|
Boolean |
|
Enable the memory-stress test. |
Execution and allocation#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
Boolean |
|
Allow memtest to run. |
|
Number |
|
Number of seconds to run the enabled pattern sequence. |
|
Number |
|
Minimum percentage of total framebuffer memory that must be free and allocatable. The GPU is skipped when this requirement cannot be met. |
|
Integer |
|
Divide the tested allocation into this many chunks. This can help when one contiguous allocation is impractical. |
|
Boolean |
|
Use CUDA mapped memory rather than native device-memory allocation. |
Configuration#
- SKU map:
skus[].memtest- SKU-file fields:
is_allowed,test_duration,num_chunks, andminimum_allocation_percentage- Request-only fields:
test0throughtest10,pattern, anduse_mapped_mem- Common fields:
ignore_error_codes; see Diagnostic Configuration File
Set request-only fields with --parameters rather than placing them in a
dcgm-diag-v1 SKU overlay.
Examples#
Run test7 and test10 for 10 minutes (this is the default):
$ dcgmi diag --run memtest
Run each test serially for 1 hour then display results:
$ dcgmi diag --run memtest \
-p memtest.test0=true\;memtest.test1=true\;memtest.test2=true\;memtest.test3=true\;memtest.test4=true\;memtest.test5=true\;memtest.test6=true\;memtest.test7=true\;memtest.test8=true\;memtest.test9=true\;memtest.test10=true\;memtest.test_duration=3600
Run test0 for one minute 10 times, displaying the results each minute:
$ dcgmi diag \
--iterations 10 \
--run memtest \
-p memtest.test0=true\;memtest.test7=false\;memtest.test10=false\;memtest.test_duration=60
Results and failure conditions#
Condition |
Result or code |
Interpretation |
|---|---|---|
Any enabled pattern test reads a value different from the expected value. |
|
Memtest detected one or more framebuffer-memory miscompares on the affected GPU. |
The plugin cannot initialize or encounters an unexpected runtime exception. |
|
The test did not complete; inspect the accompanying message and log before treating the result as a memory defect. |
No GPU was selected. |
|
Correct the entity selection and rerun the test. |
Total memory is too small, less than
|
Skip for the affected GPU |
No memory-integrity result was produced. Stop competing workloads or adjust the allocation requirement when appropriate. |
|
|
Memtest was disabled by configuration. |
The run is interrupted. |
|
The enabled pattern sequence did not complete. |