Skip to content

Commit 1a345db

Browse files
committed
remove FORCE_NATIVE
1 parent 470df2d commit 1a345db

File tree

4 files changed

+45
-97
lines changed

4 files changed

+45
-97
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ else()
172172
set(CUDA_LIBRARY-NOTFOUND true)
173173
endif()
174174

175-
# option to force native termination, mostly for testing new GPU code
176-
# in comparison with the CPU
177-
option(CUPDLP_FORCE_NATIVE "Build pdlp with native termination" OFF)
178-
179175
if (BUILD_CXX)
180176
# Default Build Type to be Release
181177
get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)

check/CMakeLists.txt

Lines changed: 45 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -278,62 +278,56 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY))
278278
)
279279

280280
if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
281-
if (CUPDLP_CPU AND NOT CUPDLP_FORCE_NATIVE)
281+
if (CUPDLP_GPU)
282282
set(pdlpInstances
283-
"25fv47\; 5.50184588\;"
284-
"adlittle\; 2.254949631\;"
285-
"afiro\;-4.64753142\;"
286-
"avgas\;-7.749999999\;"
283+
"25fv47\; 5.5018549\;"
284+
"adlittle\; 2.254950\;"
285+
"afiro\;-4.6475325\;"
286+
"avgas\;-7.75000038\;"
287287
"blending\;-3.19999999\;"
288-
"chip\;-9.000000001\;"
289-
"e226\;-1.16389293\;"
290-
"scrs8\; 9.042969511\;"
291-
"sctest\; 5.749999936\;"
292-
"shell\; 1.2088253460\;"
293-
"stair\;-2.51266951\;"
294-
"standata\; 1.257699499\;"
295-
"standgub\; 1.25769949\;"
288+
"chip\;-9.0000000\;"
289+
"e226\;-1.16389258\;"
290+
"scrs8\; 9.0429623\;"
291+
"sctest\; 5.750000001\;"
292+
"shell\; 1.20882535\;"
293+
"stair\;-2.5126695\;"
294+
"standata\; 1.25769951\;"
295+
"standgub\; 1.2576993\;"
296+
)
297+
else() # CUPDLP_CPU
298+
set(pdlpInstances
299+
"25fv47\; 5.5018360\;"
300+
"adlittle\; 2.254953\;"
301+
"afiro\;-4.64753126\;"
302+
"avgas\;-7.75000038\;"
303+
"blending\;-3.19999999\;"
304+
"chip\;-9.000000020\;"
305+
"e226\;-1.163892070\;"
306+
"scrs8\; 9.042970154\;"
307+
"sctest\; 5.750000001\;"
308+
"shell\; 1.2088253471\;"
309+
"stair\;-2.512669020\;"
310+
"standata\; 1.257699155\;"
311+
"standgub\; 1.257700132\;"
296312
)
297-
else()
298-
if (CUPDLP_GPU)
299-
set(pdlpInstances
300-
"25fv47\; 5.5018549\;"
301-
"adlittle\; 2.254950\;"
302-
"afiro\;-4.6475325\;"
303-
"avgas\;-7.75000038\;"
304-
"blending\;-3.19999999\;"
305-
"chip\;-9.0000000\;"
306-
"e226\;-1.16389258\;"
307-
"scrs8\; 9.0429623\;"
308-
"sctest\; 5.750000001\;"
309-
"shell\; 1.20882535\;"
310-
"stair\;-2.5126695\;"
311-
"standata\; 1.25769951\;"
312-
"standgub\; 1.2576993\;"
313-
)
314-
else()
315-
# CUPDLP_GPU or CPU with native termination.
316-
if (CUPDLP_FORCE_NATIVE)
317-
set(pdlpInstances
318-
"25fv47\; 5.5018360\;"
319-
"adlittle\; 2.254953\;"
320-
"afiro\;-4.64753126\;"
321-
"avgas\;-7.75000038\;"
322-
"blending\;-3.19999999\;"
323-
"chip\;-9.000000020\;"
324-
"e226\;-1.163892070\;"
325-
"scrs8\; 9.042970154\;"
326-
"sctest\; 5.750000001\;"
327-
"shell\; 1.2088253471\;"
328-
"stair\;-2.512669020\;"
329-
"standata\; 1.257699155\;"
330-
"standgub\; 1.257700132\;"
331-
)
332-
endif()
333-
endif()
334313
endif()
335314
elseif(WIN32 AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
336-
if (CUPDLP_CPU AND NOT CUPDLP_FORCE_NATIVE)
315+
if (CUPDLP_GPU)
316+
set(pdlpInstances
317+
"25fv47\; 5.50185\;" # 549 release 500 debug
318+
"adlittle\; 2.2549505\;"
319+
"afiro\;-4.6475325\;"
320+
"avgas\;-7.750000\;"
321+
"blending\;-3.19999999\;"
322+
"chip\;-9.0000000\;"
323+
"scrs8\; 9.0429693\;"
324+
"sctest\; 5.7500000\;"
325+
"shell\; 1.20882535\;"
326+
"stair\;-2.512669\;" # 96 release 95 debug
327+
"standata\; 1.2576995\;"
328+
"standgub\; 1.2576993\;"
329+
)
330+
else() # CUPDLP_CPU
337331
# on windows e226 model status is unknown
338332
# on windows 25fv47 model status can be unknown, with objective 5.5018458957e+03
339333
set(pdlpInstances
@@ -350,23 +344,6 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY))
350344
"standata\; 1.2576995\;"
351345
"standgub\; 1.2576995\;"
352346
)
353-
else()
354-
if (CUPDLP_GPU)
355-
set(pdlpInstances
356-
"25fv47\; 5.50185\;" # 549 release 500 debug
357-
"adlittle\; 2.2549505\;"
358-
"afiro\;-4.6475325\;"
359-
"avgas\;-7.750000\;"
360-
"blending\;-3.19999999\;"
361-
"chip\;-9.0000000\;"
362-
"scrs8\; 9.0429693\;"
363-
"sctest\; 5.7500000\;"
364-
"shell\; 1.20882535\;"
365-
"stair\;-2.512669\;" # 96 release 95 debug
366-
"standata\; 1.2576995\;"
367-
"standgub\; 1.2576993\;"
368-
)
369-
endif()
370347
endif()
371348
elseif(APPLE)
372349
set(pdlpInstances

highs/HConfig.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#cmakedefine ZLIB_FOUND
66
#cmakedefine CUPDLP_CPU
77
#cmakedefine CUPDLP_GPU
8-
#cmakedefine CUPDLP_FORCE_NATIVE
98
#cmakedefine CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
109
#cmakedefine CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
1110
#cmakedefine HIGHSINT64

highs/pdlp/CupdlpWrapper.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -714,30 +714,6 @@ void getUserParamsFromOptions(const HighsOptions& options,
714714
intParam[E_RESTART_METHOD] = int(options.pdlp_e_restart_method);
715715
//
716716

717-
// for the moment only native termination is allowed with GPU
718-
#ifdef CUPDLP_CPU
719-
#ifdef CUPDLP_FORCE_NATIVE
720-
ifChangeIntParam[I_INF_NORM_ABS_LOCAL_TERMINATION] = false;
721-
if (!options.pdlp_native_termination) {
722-
printf(
723-
"Warning: CUPDLP_FORCE_NATIVE is on. Forcing "
724-
"pdlp_native_termination=on.\n");
725-
}
726-
#else
727-
ifChangeIntParam[I_INF_NORM_ABS_LOCAL_TERMINATION] = true;
728-
intParam[I_INF_NORM_ABS_LOCAL_TERMINATION] = !options.pdlp_native_termination;
729-
#endif
730-
#else
731-
ifChangeIntParam[I_INF_NORM_ABS_LOCAL_TERMINATION] = false;
732-
733-
if (intParam[N_LOG_LEVEL]) {
734-
if (!options.pdlp_native_termination) {
735-
printf(
736-
"GPU only supports pdlp_native_termination=on. Forcing "
737-
"pdlp_native_termination=on.\n");
738-
}
739-
}
740-
#endif
741717
}
742718

743719
void analysePdlpSolution(const HighsOptions& options, const HighsLp& lp,

0 commit comments

Comments
 (0)