Skip to content

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

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:

Activity

  1. ZedongPeng commented on Mar 9, 2026

    @ZedongPeng
    Collaborator

    Hi @PanzerQ . Thank you for reporting this.
    For the DLL failure on Windows, could you help verify whether the fix in #85 resolves the problem on your setup?

  2. PanzerQ commented on Mar 10, 2026

    @PanzerQ
    Author

    For the DLL failure on Windows, could you help verify whether the fix in #85 resolves the problem on your setup?

    @ZedongPeng Thanks for your timely attention.
    Now it loads PSLP.dll which lies in the same folder as pyd, but those in CUDA Toolkit still need manual call.
    Since auto-detection for CUDA DLLs might be tricky, maybe temporarily mention this issue in user guide?

    2026/3/10 9:27 UTC+8

  3. ZedongPeng commented on Mar 10, 2026

    @ZedongPeng
    Collaborator

    Can you check if the updates in __init__.py resolve the CUDA DLLs detection issue?

  4. PanzerQ commented on Mar 10, 2026

    @PanzerQ
    Author

    Can you check if the updates in __init__.py resolve the CUDA DLLs detection issue?

    @ZedongPeng Directly edit the installed __init__.py and it works smoothly.
    Remark: with CUDA_PATH exists on my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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