Segmentation Fault During Optimization with Adequate Memory Available
OngoingHi,
I am encountering a segmentation fault while solving an optimization problem using Gurobi on my system. Below are the details of my setup and the issue I am facing:
System Specifications:
- CPU: Intel(R) Core(TM) i9-14900K @ 3.20 GHz
- RAM: 128 GB
- Operating System: Windows with WSL2 (Ubuntu 24.04.2 LTS)
- WSL Memory Allocation: Approximately 64 GB
Gurobi Configuration:
- Gurobi Optimizer version: 12.0.1
- Number of Threads: 16
- Parameters:
- `NodefileStart`: 0.9
- `Presolve`: 2
- `PreSparsify`: 1
- `Heuristics`: 0.2
- Log file enabled (`gurobi_log.txt`)
Issue Description:
When solving my optimization problem, Gurobi runs for a while but then abruptly exits with the error message: `Segmentation fault (core dumped)`
This happens despite having sufficient memory available. While running the optimization, I monitored the memory usage using `top`, and it showed that only about 1115 MB of memory was being used out of the allocated 64183 MB in WSL.
Here is a snippet of the `top` output during the run:
MiB Mem : 64183.8 total, 63407.8 free, 1115.7 used, 211.3 buff/cache
MiB Swap: 16384.0 total, 16384.0 free, 0.0 used. 63068.1 avail Mem
Additionally, here is the relevant part of the Gurobi log when the segmentation fault occurred:
12 0 1
Set parameter Username
Set parameter LicenseID to value 2650138
Academic license - for non-commercial use only - expires 2026-04-11
Set parameter Threads to value 16
Set parameter NodefileStart to value 0.9
Set parameter Presolve to value 2
Set parameter PreSparsify to value 1
Set parameter Heuristics to value 0.2
Set parameter LogFile to value "gurobi_log.txt"
### MAXIMIZE z1 ###
Gurobi Optimizer version 12.0.1 build v12.0.1rc0 (linux64 - "Ubuntu 24.04.2 LTS")
CPU model: Intel(R) Core(TM) i9-14900K, instruction set [SSE2|AVX|AVX2]
Thread count: 16 physical cores, 32 logical processors, using up to 16 threads
Non-default parameters:
Heuristics 0.2
NodefileStart 0.9
Presolve 2
PreSparsify 1
Threads 16
Optimize a model with 20817 rows, 4146 columns and 59361 nonzeros
Model fingerprint: 0x7f4e9a98
Variable types: 440 continuous, 3706 integer (3706 binary)
Coefficient statistics:
Matrix range [2e-01, 4e+05]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 1e+05]
Presolve removed 10265 rows and 1650 columns
Presolve time: 0.42s
Presolved: 10552 rows, 2496 columns, 36333 nonzeros
Variable types: 279 continuous, 2217 integer (2217 binary)
Root relaxation presolved: 10552 rows, 2496 columns, 36333 nonzeros
Root relaxation: objective 9.936994e-01, 7421 iterations, 0.52 seconds (1.41 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 0.99370 0 592 - 0.99370 - - 1s
0 0 0.99055 0 885 - 0.99055 - - 2s
0 0 0.98613 0 1323 - 0.98613 - - 3s
0 0 0.98545 0 1387 - 0.98545 - - 7s
0 0 0.98446 0 1278 - 0.98446 - - 9s
0 0 0.98365 0 1330 - 0.98365 - - 11s
0 0 0.98340 0 1424 - 0.98340 - - 14s
0 0 0.98326 0 1533 - 0.98326 - - 18s
0 0 0.98302 0 1350 - 0.98302 - - 20s
0 0 0.98275 0 1442 - 0.98275 - - 24s
0 0 0.98273 0 1483 - 0.98273 - - 26s
0 0 0.98240 0 1336 - 0.98240 - - 29s
0 0 0.98216 0 1416 - 0.98216 - - 32s
0 0 0.98189 0 1315 - 0.98189 - - 35s
0 0 0.98188 0 1350 - 0.98188 - - 36s
0 0 0.98188 0 1432 - 0.98188 - - 40s
0 0 0.98186 0 1345 - 0.98186 - - 43s
0 0 0.98175 0 1299 - 0.98175 - - 46s
0 0 0.98175 0 1440 - 0.98175 - - 50s
0 0 0.98170 0 1270 - 0.98170 - - 54s
0 0 0.98169 0 1444 - 0.98169 - - 57s
0 0 0.98168 0 1269 - 0.98168 - - 60s
0 0 0.98168 0 987 - 0.98168 - - 60s
0 2 0.98168 0 904 - 0.98168 - - 75s
7 16 0.98132 3 1163 - 0.98141 - 13651 80s
47 73 0.98068 6 960 - 0.98121 - 8154 86s
92 128 0.97906 10 947 - 0.98121 - 7103 90s
169 201 0.97548 13 1215 - 0.98121 - 6070 95s
345 397 0.96689 24 860 - 0.98121 - 4256 100s
721 704 0.97894 6 1262 - 0.98121 - 2760 106s
854 764 0.97686 8 1137 - 0.98051 - 2633 110s
1023 904 0.97537 12 1121 - 0.98012 - 2767 116s
1168 1040 0.96763 19 905 - 0.98012 - 2852 121s
1279 1178 0.95336 28 801 - 0.98012 - 2897 125s
1515 1354 0.97659 7 1223 - 0.98010 - 2863 131s
1676 1472 0.97551 10 937 - 0.98010 - 2840 135s
1934 1676 0.97102 15 1215 - 0.97977 - 2836 141s
2129 1873 0.96618 18 1043 - 0.97977 - 2821 146s
2427 1982 0.95952 14 592 - 0.97977 - 2716 150s
2429 1984 0.94089 28 1232 - 0.97977 - 2714 156s
2431 1985 0.96036 11 1349 - 0.97977 - 2712 162s
2433 1986 0.96939 15 1339 - 0.97977 - 2709 169s
2434 1987 0.96553 21 1309 - 0.97977 - 2708 172s
2435 1988 0.96627 19 1354 - 0.97977 - 2707 176s
2437 1989 0.95083 18 1414 - 0.97977 - 2705 183s
2438 1990 0.95944 17 1018 - 0.97977 - 2704 186s
2439 1990 0.95489 20 1372 - 0.97977 - 2703 191s
2441 1992 0.95890 20 941 - 0.97977 - 2700 196s
2442 1992 0.96576 39 941 - 0.97977 - 2699 215s
2445 1999 0.97977 12 1209 - 0.97977 - 132 221s
2457 2019 0.97977 14 1132 - 0.97977 - 190 225s
2489 2053 0.97977 16 1225 - 0.97977 - 289 230s
2544 2089 0.97941 18 1037 - 0.97977 - 477 236s
2572 2104 0.97888 19 1121 - 0.97977 - 550 243s
2596 2132 0.97724 19 1117 - 0.97977 - 611 246s
2673 2188 0.97797 20 1150 - 0.97977 - 774 251s
2716 2206 0.97757 21 1125 - 0.97977 - 832 262s
2789 2258 0.96472 22 1102 - 0.97977 - 948 266s
2868 2287 0.97669 23 1123 - 0.97977 - 1031 272s
2964 2330 0.97625 24 927 - 0.97977 - 1115 276s
3068 2369 0.97490 27 1106 - 0.97977 - 1209 282s
3167 2411 0.97427 29 1011 - 0.97950 - 1288 286s
3283 2474 0.96665 33 677 - 0.97950 - 1378 292s
3358 2496 0.96516 36 650 - 0.97950 - 1422 305s
3505 2532 0.94325 43 758 - 0.97950 - 1479 312s
3593 2551 0.90461 47 333 - 0.97915 - 1523 315s
3758 2630 0.97705 19 1137 - 0.97915 - 1597 321s
3952 2735 0.97259 22 1275 - 0.97915 - 1663 328s
4071 2782 0.96687 24 1045 - 0.97915 - 1693 332s
4178 2825 0.96584 26 1083 - 0.97915 - 1724 335s
4418 2909 0.94115 37 656 - 0.97915 - 1786 343s
4538 2931 0.97730 19 1177 - 0.97915 - 1823 348s
4634 2970 0.93767 21 1242 - 0.97915 - 1869 352s
4736 2981 0.97528 22 1171 - 0.97915 - 1913 377s
4781 3077 0.97199 23 947 - 0.97915 - 1938 382s
Segmentation fault (core dumped)
The problem appears to occur after several iterations during node processing, as shown in the log above.
My Questions:
- Why is this segmentation fault occurring? It doesn’t seem to be caused by insufficient memory.
- How can I resolve or debug this issue?
If any additional information is needed to diagnose this problem, please let me know, and I will provide it. I can send you dataset and code by email, if necessary.
Thank you for your help!
0
Please sign in to leave a comment.
Comments
0 comments