Due: Tue, 2023/04/25 23:59
In this assignment, we provide you the sequential (CPU) code of a bitcoin miner. You are asked to parallelize it with CUDA. You may use any techniques that you’ve learned in this class!
Data | Description |
---|---|
20000000 | Version |
0000000000000000003348540cbfc68b70825e7abcd5a83a48a5f87fa7f1aace | Previous block hash |
5ac22f8b | Timestamp |
17502ab7 | Nbits (difficulty) |
2094 | Number of transactions |
c6574adb277efbfb972658ab78b1277707a967076cfc90d6af800cd8a915396d | Transactions (2094 line of hash values like this) |
/tmp/dataset-nthu-ipc23/share/hw4/testcases/*.out
We use NCHC container for this homework.
We use Makefile
to build your code. The default Makefile for this homework is provided at /tmp/dataset-nthu-ipc23/share/hw4/sample/Makefile
.
If you wish to change the compilation flags, include Makefile
in your submission.
To use Makefile to build your code, make sure Makefile
, hw4.cu
, sha256.cu
, sha256.h
are in the working directory, then run make
on the command line and it will build hw4
for you. To remove the built files, run make clean
.
We will compile your code with the command make
.
Your code will be executed with a command equalviant to:
The time limit for each test case is 240 seconds.
Answer the following questions, in either English or Traditional Chinese.
Upload these files to EEClass:
hw4.cu
, sha256.cu
, sha256.h
– the source code of your implementation.Makefile
– optional. Submit this file if you want to change the build command.report.pdf
– your report.Please follow the naming listed above carefully. Failing to adhere to the names
above will result to points deduction. Here are a few bad examples: hw4.CU
,
HW4.cu
, report.docx
, report.pages
Makefile.mak
.
Please note that this spec, the sample test cases and programs might contain bugs.
If you spotted one and are unsure about it, please ask on eeclass.
The reference C++ implementation is under /tmp/dataset-nthu-ipc23/share/hw4/sample/
. The refernce code follows the same input/output format as your homework.
The sample test cases are located at /tmp/dataset-nthu-ipc23/share/hw4/testcases
.
/tmp/dataset-nthu-ipc23/share/hw4/validation
can be used to check your answer.
For example:
The hw4-judge
command can be used to automatically judge your code against
all sample test cases, it also submits your execution time to the scoreboard
so you can compare your performance with others.
Scoreboard: https://apollo.cs.nthu.edu.tw/ipc23/scoreboard/hw4/
To use it, run hw4-judge
in the directory that contains your code hw4.cu
, sha256.cu
, sha256.h
.
It will automatically search for Makefile
and use it to compile your code,
or fallback to the TA provided /tmp/dataset-nthu-ipc23/share/hw4/sample/Makefile
otherwise.
If code compiliation is successful, it will then run all the sample test cases,
show you the results as well as update the scoreboard.
Note:
hw4-judge
and the scoreboard has nothing to do with grading.
Only the code submitted to eeclass is considered for grading purposes.
Type hw4-judge --help
to see a list of supported options.
Verdict | Explaination |
---|---|
internal error | there is a bug in the judge |
time limit exceeded+ | execution time > time limit + 10 seconds |
time limit exceeded | execution time > time limit |
runtime error | your program didn't return 0 or is terminated by a signal |
no output | your program did not produce an output file |
wrong answer | your output is incorrect |
accepted | you passed the test case |
spec