首页
/ ProxSuite 项目下载及安装教程

ProxSuite 项目下载及安装教程

2024-12-07 09:23:05作者:廉彬冶Miranda

1. 项目介绍

ProxSuite 是一个开源的数值优化工具箱,专注于提供高效、精确和稳健的数值求解器(如 LP、QP 等)。该项目基于重新审视的原始-对偶近端算法,旨在为社区提供可扩展的优化器,能够处理密集、稀疏或无矩阵问题。ProxSuite 由 Willow 和 Sierra 研究小组联合开发,这些小组由 Inria、École Normale Supérieure de Paris 和 Centre National de la Recherche Scientifique 组成。

2. 项目下载位置

ProxSuite 项目托管在 GitHub 上,可以通过以下命令进行克隆:

git clone https://github.com/Simple-Robotics/proxsuite.git

3. 项目安装环境配置

3.1 系统要求

  • 操作系统:Windows、Mac OS X、Unix 或 Linux
  • 编译器:支持 C++14/17/20 的编译器(如 GCC、Clang)
  • 依赖库:CMake、pkg-config(可选)

3.2 环境配置示例

以下是配置环境的步骤示例:

  1. 安装 CMake

    在 Ubuntu 上,可以使用以下命令安装 CMake:

    sudo apt-get update
    sudo apt-get install cmake
    
  2. 安装编译器

    在 Ubuntu 上,可以使用以下命令安装 GCC 和 Clang:

    sudo apt-get install build-essential
    sudo apt-get install clang
    
  3. 安装 pkg-config(可选)

    在 Ubuntu 上,可以使用以下命令安装 pkg-config:

    sudo apt-get install pkg-config
    

4. 项目安装方式

4.1 使用 pip 安装

在 Linux、Windows 和 Mac OS X 上,可以使用以下命令通过 pip 安装 ProxSuite:

pip install proxsuite

4.2 使用 conda 安装

在 Linux、Windows 和 Mac OS X 上,可以使用以下命令通过 conda 安装 ProxSuite:

conda install proxsuite -c conda-forge

4.3 使用 brew 安装

在 Linux 和 Mac OS X 上,可以使用以下命令通过 brew 安装 ProxSuite:

brew install proxsuite

4.4 从源码安装

  1. 克隆项目

    git clone https://github.com/Simple-Robotics/proxsuite.git
    cd proxsuite
    
  2. 编译项目

    mkdir build
    cd build
    cmake ..
    make
    
  3. 安装项目

    sudo make install
    

5. 项目处理脚本

5.1 编译示例程序

为了获得最佳性能,可以使用以下命令编译示例程序:

g++ -O3 -march=native -DNDEBUG -std=gnu++17 -DPROXSUITE_VECTORIZE examples/first_example_dense.cpp -o first_example_dense $(pkg-config --cflags proxsuite)

5.2 使用 CMake 编译

如果使用 CMake 编译项目,可以使用以下示例:

cmake_minimum_required(VERSION 3.10)
project(Example CXX)

find_package(proxsuite REQUIRED)

set(CMAKE_CXX_STANDARD 17)
# set(CMAKE_CXX_STANDARD 14) will work too

add_executable(example example.cpp)
target_link_libraries(example PUBLIC proxsuite::proxsuite)

# Vectorization support via SIMDE and activated by the compilation options '-march=native' or `-mavx2 -mavx512f`
add_executable(example_with_full_vectorization_support example.cpp)
target_link_libraries(example_with_full_vectorization_support PUBLIC proxsuite::proxsuite-vectorized)
target_compile_options(example_with_full_vectorization_support PUBLIC "-march=native")

通过以上步骤,您可以成功下载、安装并运行 ProxSuite 项目。

登录后查看全文

项目优选

收起
kernelkernel
openEuler内核是openEuler操作系统的核心,既是系统性能与稳定性的基石,也是连接处理器、设备与服务的桥梁。
C
471
465
kernelkernel
deepin linux kernel
C
32
16
atomcodeatomcode
Claude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed. Get Started
Rust
2.09 K
218
ops-nnops-nn
本项目是CANN提供的神经网络类计算算子库,实现网络在NPU上加速计算。
C++
700
1.4 K
docsdocs
暂无描述
Dockerfile
780
5.08 K
pytorchpytorch
Ascend Extension for PyTorch
Python
758
968
flutter_flutterflutter_flutter
本仓库是 Flutter SDK 与 Flutter Engine 的 OpenHarmony 适配版本,由 CPF-Flutter 团队维护。开发者可使用熟悉的 Flutter 技术栈开发 OpenHarmony 应用,3.35.7 及以后的适配版本可基于本仓库源码构建支持 OpenHarmony 的 Flutter Engine。
Dart
1.04 K
271
ops-transformerops-transformer
本项目是CANN提供的transformer类大模型算子库,实现网络在NPU上加速计算。
C++
880
2.03 K
mindquantummindquantum
MindQuantum is a general software library supporting the development of applications for quantum computation.
Python
183
111
openHiTLSopenHiTLS
旨在打造算法先进、性能卓越、高效敏捷、安全可靠的密码套件,通过轻量级、可剪裁的软件技术架构满足各行业不同场景的多样化要求,让密码技术应用更简单,同时探索后量子等先进算法创新实践,构建密码前沿技术底座!
C
1.11 K
682