Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kawamura-solver
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
adc2019
kawamura-solver
Commits
aa8bdf20
Commit
aa8bdf20
authored
Aug 22, 2019
by
kazushi.kawamura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
875dca22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
6 deletions
+52
-6
README.md
solver_python/README.md
+52
-6
No files found.
solver_python/README.md
View file @
aa8bdf20
# Setup
# Environment
*
PYNQ-Z1 (v2.4) (Release 2019_02_21)
*
PYNQ Linux, based on Ubuntu 18.04
*
Python 3.6.5
To confirm,
```
cd solver_python
(sudo) python3 setup.py install
python3 main.py -p input-Q-file(.txt) [-s seed-value] [-o output-A-file(.txt)]
cat REVISION
cat /etc/lsb-release
python3 --version
```
# Python solver based on C++ programs
C/C++ wrapper for python
[
Reference
]
*
https://docs.python.org/ja/3/c-api/index.html
*
https://cpp-learning.com/python_c_api_step1/ (勉強になる)
*
https://cpp-learning.com/python_c_api_step2/ (勉強になる)
*
http://codeit.blog.fc2.com/blog-entry-9.html (numpy)
## Setup
Check include file in
`py_wrapper.hpp`
&
`solver.hpp`
(python version)
```
#include "/usr/include/python3.6m/Python.h"
#include "/usr/include/python3.6m/numpy/arrayobject.h"
#include "/usr/include/python3.6m/numpy/arrayscalars.h"
```
If there exist no files in
`/usr/include/python3.6m`
, type commands as follows:
```
sudo apt-get install python3-dev
sudo apt-get install python3-numpy
```
(sudo) rm -rf build
(sudo) pip3 uninstall mySolverModule
Type command as follows:
```
sudo python3 setup.py install
```
To confirm, type
`pip3 freeze`
.
`mySolverModule==1.0.0`
will be listed.
[
Uninstall
]
```
sudo rm -rf build
sudo pip3 uninstall mySolverModule
```
## Run
```
python3 main.py -p input-Q-file(.txt) [-s seed-value] [-o output-A-file(.txt)]
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment