Skip to content
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

Improve build configuration descriptions #32

Merged
merged 1 commit into from
Mar 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ Reference Implementation (IRI).
* Check JDK installation and set JAVA_HOME if you wish to specify.
* Only one GPU can be facilitated with dcurl at the moment.

# Build
* Build a shared library for IRI, generating object files in directory `build`
* Generate JNI header file from downloading from [latest JAVA source](https://github.com/chenwei-tw/iri/tree/feat/new_pow_interface)
```shell
$ make BUILD_JNI=1
```
* You can modify `build/local.mk` for custom build options.
# Build Instructions
* dcurl allows various combinations of build configurations to fit final use scenarios.
* You can execute `make config` and then edit file `build/local.mk` for custom build options.
- ``BUILD_AVX``: build Intel AVX-accelerated Curl backend.
- ``BUILD_GPU``: build OpenCL-based GPU accelerations.
- ``BUILD_JNI``: build a shared library for IRI. The build system would generate JNI header file
from downloading from
[latest JAVA source](https://github.com/chenwei-tw/iri/tree/feat/new_pow_interface).
- ``BUILD_COMPAT``: build extra cCurl compatible interface.
* Alternatively, you can specify conditional build as following:
```shell
$ make BUILD_GPU=0 BUILD_JNI=1 BUILD_AVX=1
Expand Down Expand Up @@ -63,7 +65,7 @@ $ make BUILD_AVX=1 check
[ Verified ]
```

# Tuning
# Tweaks
* ```dcurl_init(2, 1)``` in ```jni/iri-pearldiver-exlib.c```
* ```2``` means 2 pow tasks executed in CPU,
* ```1``` means 1 pow tasks executed in GPU at the same time.
Expand All @@ -77,10 +79,10 @@ After integrating dcurl into IRI, performance of <```attachToTangle```> is measu
* Settings: enable 2 pow tasks in CPU, 1 pow tasks in GPU at the same time
![](https://lh4.googleusercontent.com/2U_TpfAtEbPdHBcGKD1zl0t0bzo2Rubj0DxXxvV-Rh31Yr7oCCtptutQpLLizMgR7ousEXUtwM6RASnQLOJnGePhQ5Emh1w8l8GlKzMtZ0Yv-TySF2gh3u48BAmllAJv2VjNaxgFGCA)

# About IRI
# IRI Adaptation
[Modified IRI accepting external PoW Library](https://github.com/chenwei-tw/iri/tree/feat/new_pow_interface)
* ```$ cd ~/iri && mvn compile clean && mvn package```
* ```$ cp ~/dcurl/libdcurl.so ~/iri```
* ```$ cd ~/iri && mvn compile && mvn package```
* ```$ cp ~/dcurl/build/libdcurl.so ~/iri```
* ```$ cd ~/iri && java -Djava.library.path=./ -jar target/iri.jar -p <port> --pearldiver-exlib dcurl```

# TODO
Expand Down