Skip to content

Typo in Python Interface Part and DLL Path Detection of Win11 Conda Env #84

@PanzerQ

Description

@PanzerQ
  1. cuPDLPx/python_bindings/_core_bindings.cpp Line 546
    res->reduced_costs is a typo, it should be res->reduced_cost
    This can cause compilation error on Windows.

  2. With 1. done, conda env activated and install python package by source code with pip successes.
    Yet I have to manually add DLL paths that already exist in system-level env var,
    Or the example program in cuPDLPx/python/README.md fails due to DLL load failure.
    See below for details:

CUDA_BIN_DIR = r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin"
PSLP_DIR = r"C:\Users\panzerQ\anaconda3\envs\LP\Lib\site-packages\lib"

os.add_dll_directory(CUDA_BIN_DIR)
os.add_dll_directory(PSLP_DIR)

from cupdlpx import Model, PDLP

Without os.add_dll_directory, the program doesn't load needed DLLs like cudart64_12.dll automatically.
The error log would be like:

Image

This can be further confirmed with Microsft Process Monitor.
I met all these using Win11 24H2 with MSVC 19.44.35219 for x64.
Cmake 4.2.3 used for building.

The solver itself runs efficiently on RTX 4060, CUDA126. Good work you have done!

2026/3/9 17:49 UTC+8:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions