cuDSS plane-element solver comparison¤
This notebook-style script compares the OpenSees CPU sparse solvers with the optional NVIDIA cuDSS backend.
The model is a square plane-stress panel made from four-node quad elements. Its left edge is fixed and a uniformly distributed vertical load is applied to its right edge. The mesh is automatically selected to approach each requested number of active equations.
Solver Selection Recommendations
- General nonlinear problems: Use
CuDSS, especially above approximately 1,000 equations. It provides a stable 3–4× speedup for larger systems. - Guaranteed SPD systems: Use
CuDSSSPD. It achieves the best large-model performance, approaching 4–5× speedup. - Small SPD systems:
BandSPD,ProfileSPD, orSparseSPDmay be faster below approximately 1,000 equations. - CPU-only general problems: Use
UmfPackas the reliable baseline.SuperLUis mainly competitive for smaller systems. - Band solvers: Use only for small, regularly ordered systems with narrow bandwidth. Their performance deteriorates as model size and bandwidth increase.
- Strong nonlinear earthquake analysis: Prefer
CuDSS in GPU or Umfpack in CPUunless the tangent matrix is guaranteed to remain symmetric positive definite throughout the analysis.
Model:
1 2 3 | |
User requirements and configuration¤
To select CuDSS, the user machine must provide:
-
A supported NVIDIA GPU and a sufficiently recent NVIDIA display driver.
-
A CUDA runtime supported by the distributed MEX (CUDA 12 or CUDA 13).
-
NVIDIA cuDSS 0.8 built for the selected CUDA major version.
-
The CUDA and cuDSS runtime DLLs on PATH, or a cuDSS installation supplied
through OPENSEES_CUDSS_ROOT or RuntimePath below.
The user does not need a CUDA-capable GPU to run the CPU solvers. CUDA is required at build time only when compiling a new GPU-enabled MEX;
end users load the CUDA/cuDSS runtime dynamically when ops.system('CuDSS') is called.
1 2 3 4 5 | |
1 | |
Benchmark definition¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
Run all plane-element cases¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
| TargetDOF | ActualDOF | Nx | Ny | Solver | Status | BuildSeconds | FirstSolveSeconds | WarmSolveSeconds | TotalSolveSeconds | TipUx | TipUy | Message | RelativeTipError | FirstSpeedupVsUmfPack | WarmSpeedupVsUmfPack | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 100 | 100 | 5 | 9 | "CuDSS" | "ok" | 0.0934 | 0.0645 | 0.0014 | 0.0674 | -1.3423e-05 | -3.3259e-04 | "" | 4.2372e-15 | 0.0542 | 0.3100 |
| 2 | 100 | 100 | 5 | 9 | "CuDSSSPD" | "ok" | 0.0924 | 0.0627 | 6.2255e-04 | 0.0640 | -1.3423e-05 | -3.3259e-04 | "" | 3.3140e-16 | 0.0557 | 0.7216 |
| 3 | 100 | 100 | 5 | 9 | "UmfPack" | "ok" | 0.0887 | 0.0035 | 4.4925e-04 | 0.0044 | -1.3423e-05 | -3.3259e-04 | "" | 0 | 1 | 1 |
| 4 | 100 | 100 | 5 | 9 | "SuperLU" | "ok" | 0.0308 | 7.2600e-04 | 1.7525e-04 | 0.0011 | -1.3423e-05 | -3.3259e-04 | "" | 3.2595e-15 | 4.8106 | 2.5635 |
| 5 | 100 | 100 | 5 | 9 | "SparseSPD" | "ok" | 9.9570e-04 | 5.8860e-04 | 1.4965e-04 | 8.8790e-04 | -1.3423e-05 | -3.3259e-04 | "" | 3.7494e-15 | 5.9336 | 3.0020 |
| 6 | 100 | 100 | 5 | 9 | "BandSPD" | "ok" | 7.3180e-04 | 4.5130e-04 | 1.0595e-04 | 6.6320e-04 | -1.3423e-05 | -3.3259e-04 | "" | 3.7496e-15 | 7.7388 | 4.2402 |
| 7 | 100 | 100 | 5 | 9 | "ProfileSPD" | "ok" | 7.0360e-04 | 3.3970e-04 | 7.7600e-05 | 4.9490e-04 | -1.3423e-05 | -3.3259e-04 | "" | 4.5697e-15 | 10.2811 | 5.7893 |
| 8 | 100 | 100 | 5 | 9 | "BandGeneral" | "ok" | 6.5200e-04 | 6.4510e-04 | 2.7165e-04 | 0.0012 | -1.3423e-05 | -3.3259e-04 | "" | 2.2878e-15 | 5.4139 | 1.6538 |
| 9 | 500 | 500 | 10 | 24 | "CuDSS" | "ok" | 0.0013 | 0.0644 | 0.0010 | 0.0665 | 1.3350e-19 | -3.3887e-04 | "" | 6.4173e-15 | 0.5384 | 2.3044 |
| 10 | 500 | 500 | 10 | 24 | "CuDSSSPD" | "ok" | 0.0840 | 0.0635 | 9.1725e-04 | 0.0654 | 2.6580e-19 | -3.3887e-04 | "" | 2.3053e-14 | 0.5459 | 2.6128 |
| 11 | 500 | 500 | 10 | 24 | "UmfPack" | "ok" | 0.0842 | 0.0347 | 0.0024 | 0.0395 | -3.0892e-20 | -3.3887e-04 | "" | 0 | 1 | 1 |
| 12 | 500 | 500 | 10 | 24 | "SuperLU" | "ok" | 0.0016 | 0.0030 | 0.0012 | 0.0053 | 2.5796e-19 | -3.3887e-04 | "" | 9.3176e-15 | 11.7363 | 2.0037 |
| 13 | 500 | 500 | 10 | 24 | "SparseSPD" | "ok" | 0.0017 | 0.0025 | 8.6295e-04 | 0.0042 | 1.9588e-20 | -3.3887e-04 | "" | 7.0404e-15 | 14.0887 | 2.7772 |
| 14 | 500 | 500 | 10 | 24 | "BandSPD" | "ok" | 0.0017 | 0.0015 | 4.0190e-04 | 0.0024 | 2.3431e-19 | -3.3887e-04 | "" | 2.2250e-14 | 22.3902 | 5.9632 |
Plot first and repeated solve times¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
Plot displacement accuracy¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
Plot speedup relative to UmfPack¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
Local benchmark functions¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |