-
Notifications
You must be signed in to change notification settings - Fork 4
Add C API interface #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LucasBoTang
wants to merge
26
commits into
MIT-Lu-Lab:main
Choose a base branch
from
LucasBoTang:dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
65d714a
Create build_and_test.sh
LucasBoTang 1bd5f39
Create .gitignore
LucasBoTang 8d15355
Update .gitignore
LucasBoTang 1292069
Update: config
LucasBoTang 8110ca0
Init interface
LucasBoTang 6b36f3f
New test: LP model
LucasBoTang 1aaba96
Merge branch 'dev' into main
LucasBoTang 417510b
Merge pull request #1 from LucasBoTang/main
LucasBoTang 082d122
New feat: interface
LucasBoTang e60c6d5
New feat: CSC/COO→CSR for interface
LucasBoTang c393294
Create build_and_test.sh
LucasBoTang 59e3fa5
Create .gitignore
LucasBoTang e0cd2ee
Update .gitignore
LucasBoTang 5314f12
Update: config
LucasBoTang 961ac6f
Init interface
LucasBoTang 927a70f
New test: LP model
LucasBoTang 06172b2
New feat: interface
LucasBoTang 2093d0d
New feat: CSC/COO→CSR for interface
LucasBoTang 3509994
Merge branch 'dev' of https://github.com/LucasBoTang/cuPDLPx into dev
LucasBoTang ea5667f
Bug fixed: output interface
LucasBoTang 78fedf5
Document C API and example for LP solving
LucasBoTang c8ba888
Warning fixed: .c -> .cu for interface
LucasBoTang 43a27a0
Merge branch 'dev' of https://github.com/LucasBoTang/cuPDLPx into dev
LucasBoTang ce03fd9
Update: .cu -> .c for interface
LucasBoTang 7766045
Clean code: remove the repeating declaration
LucasBoTang 7b3474a
Update: `make_problem_from_matrix` -> `create_lp_problem`
LucasBoTang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
# Prerequisites | ||
*.d | ||
|
||
|
@@ -58,3 +57,4 @@ dkms.conf | |
# ignored files | ||
build/* | ||
test/* | ||
/.vscode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# ============================ | ||
# cuPDLPx build & test script | ||
# ============================ | ||
|
||
# 1. request interactive GPU node | ||
#echo ">>> Requesting interactive GPU node..." | ||
#srun --pty --partition=ou_sloan_gpu --cpus-per-task=1 --mem=16G --gres=gpu:1 --time=00:15:00 bash | ||
|
||
# 2. load CUDA module | ||
echo ">>> Loading CUDA module..." | ||
module purge | ||
module load cuda/12.4 || { echo "CUDA 12.4 not found, try another version"; exit 1; } | ||
|
||
# . show environment info | ||
which nvcc | ||
nvcc --version | ||
echo "CUDA_HOME = $CUDA_HOME" | ||
|
||
# 4. build | ||
echo ">>> Cleaning and building..." | ||
make clean | ||
make build | ||
|
||
# 5. download test instance if not present | ||
TESTDIR=$HOME/src/cuPDLPx/test | ||
mkdir -p $TESTDIR | ||
if [ ! -f $TESTDIR/2club200v15p5scn.mps.gz ]; then | ||
echo ">>> Downloading test instance..." | ||
wget -P $TESTDIR https://miplib.zib.de/WebData/instances/2club200v15p5scn.mps.gz | ||
fi | ||
|
||
# 6. run test | ||
echo ">>> Running smoke test..." | ||
./build/cupdlpx $TESTDIR/2club200v15p5scn.mps.gz $TESTDIR | ||
|
||
echo ">>> Done! Results saved in $TESTDIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to upload this file to GitHub? This is already the
test/test.sh
file. Maybe merge these two?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two tests are not the same: one runs from bash and reads an MPS file, while the other directly passes in coefficients. They exercise different code paths (file I/O parsing vs. API interface), so both are valuable to keep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/MIT-Lu-Lab/cuPDLPx/blob/main/test/test.sh