Skip to content

Commit 1bb78f0

Browse files
Christian BuchnerChristian Buchner
authored andcommitted
committing version v0.4
1 parent b93669a commit 1bb78f0

11 files changed

+51
-57
lines changed

Makefile.am

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ ccminer_LDFLAGS = $(PTHREAD_FLAGS) @CUDA_LDFLAGS@
3232
ccminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@ @CUDA_LIBS@ @OPENMP_CFLAGS@ @LIBS@
3333
ccminer_CPPFLAGS = -msse2 @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES) -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME
3434

35+
# we're now targeting all major compute architectures within one binary.
3536
.cu.o:
36-
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_35 --maxrregcount=124 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
37-
38-
## Thrust needs Compute 2.0 minimum
39-
#heavy.o: heavy.cu
40-
# $(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=63 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
41-
#
42-
#cuda_hefty1.o: cuda_hefty1.cu
43-
# $(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=63 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
44-
37+
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --maxrregcount=63 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<

Makefile.in

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,14 +1033,9 @@ uninstall-am: uninstall-binPROGRAMS
10331033
uninstall uninstall-am uninstall-binPROGRAMS
10341034

10351035

1036+
# we're now targeting all major compute architectures within one binary.
10361037
.cu.o:
1037-
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_35 --maxrregcount=124 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
1038-
1039-
#heavy.o: heavy.cu
1040-
# $(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=63 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
1041-
#
1042-
#cuda_hefty1.o: cuda_hefty1.cu
1043-
# $(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=63 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
1038+
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --maxrregcount=63 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
10441039

10451040
# Tell versions [3.59,3.63) of GNU make to not export all variables.
10461041
# Otherwise a system limit (for SysV at least) may be exceeded.

README.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
ccMiner release 0.3 (Mar 23th 2014) - Groestlcoin Release
2+
ccMiner release 0.4 (Mar 24th 2014) - Groestlcoin Pool Release
33
-------------------------------------------------------------
44

55
***************************************************************
@@ -107,7 +107,13 @@ from your old clunkers.
107107

108108
>>> RELEASE HISTORY <<<
109109

110-
Match, 23 2014 added Groestlcoin support. stratum status unknown
110+
March, 24 2014 fixed Groestl pool support
111+
112+
went back to Compute 1.x for cuda_hefty1.cu kernel by
113+
default after numerous reports of ccminer v0.2/v0.3
114+
not working with HeavyCoin for some people.
115+
116+
March, 23 2014 added Groestlcoin support. stratum status unknown
111117
(the only pool is currently down for fixing issues)
112118

113119
March, 21 2014 use of shared memory in Fugue256 kernel boosts hash rates

ccminer.vcxproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,16 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
277277
<CudaCompile Include="cuda_fugue256.cu" />
278278
<CudaCompile Include="cuda_groestl512.cu" />
279279
<CudaCompile Include="cuda_groestlcoin.cu" />
280-
<CudaCompile Include="cuda_hefty1.cu" />
280+
<CudaCompile Include="cuda_hefty1.cu">
281+
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">compute_10,sm_10</CodeGeneration>
282+
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">compute_10,sm_10</CodeGeneration>
283+
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">124</MaxRegCount>
284+
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">124</MaxRegCount>
285+
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">compute_10,sm_10</CodeGeneration>
286+
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">124</MaxRegCount>
287+
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Release|x64'">compute_10,sm_10</CodeGeneration>
288+
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Release|x64'">124</MaxRegCount>
289+
</CudaCompile>
281290
<CudaCompile Include="cuda_keccak512.cu" />
282291
<CudaCompile Include="cuda_sha256.cu" />
283292
<CudaCompile Include="heavy.cu" />

configure

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.68 for ccminer 2014.03.23.
3+
# Generated by GNU Autoconf 2.68 for ccminer 2014.03.24.
44
#
55
#
66
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -557,8 +557,8 @@ MAKEFLAGS=
557557
# Identity of this package.
558558
PACKAGE_NAME='ccminer'
559559
PACKAGE_TARNAME='ccminer'
560-
PACKAGE_VERSION='2014.03.23'
561-
PACKAGE_STRING='ccminer 2014.03.23'
560+
PACKAGE_VERSION='2014.03.24'
561+
PACKAGE_STRING='ccminer 2014.03.24'
562562
PACKAGE_BUGREPORT=''
563563
PACKAGE_URL=''
564564

@@ -1297,7 +1297,7 @@ if test "$ac_init_help" = "long"; then
12971297
# Omit some internal or obsolete options to make the list less imposing.
12981298
# This message is too long to be a string in the A/UX 3.1 sh.
12991299
cat <<_ACEOF
1300-
\`configure' configures ccminer 2014.03.23 to adapt to many kinds of systems.
1300+
\`configure' configures ccminer 2014.03.24 to adapt to many kinds of systems.
13011301
13021302
Usage: $0 [OPTION]... [VAR=VALUE]...
13031303
@@ -1368,7 +1368,7 @@ fi
13681368

13691369
if test -n "$ac_init_help"; then
13701370
case $ac_init_help in
1371-
short | recursive ) echo "Configuration of ccminer 2014.03.23:";;
1371+
short | recursive ) echo "Configuration of ccminer 2014.03.24:";;
13721372
esac
13731373
cat <<\_ACEOF
13741374
@@ -1469,7 +1469,7 @@ fi
14691469
test -n "$ac_init_help" && exit $ac_status
14701470
if $ac_init_version; then
14711471
cat <<\_ACEOF
1472-
ccminer configure 2014.03.23
1472+
ccminer configure 2014.03.24
14731473
generated by GNU Autoconf 2.68
14741474
14751475
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1972,7 +1972,7 @@ cat >config.log <<_ACEOF
19721972
This file contains any messages produced by compilers while
19731973
running configure, to aid debugging if configure makes a mistake.
19741974
1975-
It was created by ccminer $as_me 2014.03.23, which was
1975+
It was created by ccminer $as_me 2014.03.24, which was
19761976
generated by GNU Autoconf 2.68. Invocation command line was
19771977
19781978
$ $0 $@
@@ -2901,7 +2901,7 @@ fi
29012901

29022902
# Define the identity of the package.
29032903
PACKAGE='ccminer'
2904-
VERSION='2014.03.23'
2904+
VERSION='2014.03.24'
29052905

29062906

29072907
cat >>confdefs.h <<_ACEOF
@@ -7118,7 +7118,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
71187118
# report actual input values of CONFIG_FILES etc. instead of their
71197119
# values after options handling.
71207120
ac_log="
7121-
This file was extended by ccminer $as_me 2014.03.23, which was
7121+
This file was extended by ccminer $as_me 2014.03.24, which was
71227122
generated by GNU Autoconf 2.68. Invocation command line was
71237123
71247124
CONFIG_FILES = $CONFIG_FILES
@@ -7184,7 +7184,7 @@ _ACEOF
71847184
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
71857185
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
71867186
ac_cs_version="\\
7187-
ccminer config.status 2014.03.23
7187+
ccminer config.status 2014.03.24
71887188
configured by $0, generated by GNU Autoconf 2.68,
71897189
with options \\"\$ac_cs_config\\"
71907190

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([ccminer], [2014.03.23])
1+
AC_INIT([ccminer], [2014.03.24])
22

33
AC_PREREQ([2.59c])
44
AC_CANONICAL_SYSTEM

cpu-miner.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
669669
if (opt_algo == ALGO_HEAVY)
670670
heavycoin_hash(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
671671
else
672-
if (opt_algo == ALGO_FUGUE256)
672+
if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL)
673673
SHA256((unsigned char*)sctx->job.coinbase, sctx->job.coinbase_size, (unsigned char*)merkle_root);
674674
else
675675
sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
@@ -719,7 +719,7 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
719719
free(xnonce2str);
720720
}
721721

722-
if (opt_algo == ALGO_FUGUE256)
722+
if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL)
723723
diff_to_target(work->target, sctx->job.diff / 256.0);
724724
else
725725
diff_to_target(work->target, sctx->job.diff);
@@ -1346,7 +1346,7 @@ static void signal_handler(int sig)
13461346
}
13471347
#endif
13481348

1349-
#define PROGRAM_VERSION "0.2"
1349+
#define PROGRAM_VERSION "0.4"
13501350
int main(int argc, char *argv[])
13511351
{
13521352
struct thr_info *thr;

cpuminer-config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
#define PACKAGE_NAME "ccminer"
153153

154154
/* Define to the full name and version of this package. */
155-
#define PACKAGE_STRING "ccminer 2014.03.23"
155+
#define PACKAGE_STRING "ccminer 2014.03.24"
156156

157157
/* Define to the one symbol short name of this package. */
158158
#undef PACKAGE_TARNAME
@@ -161,7 +161,7 @@
161161
#undef PACKAGE_URL
162162

163163
/* Define to the version of this package. */
164-
#define PACKAGE_VERSION "2014.03.23"
164+
#define PACKAGE_VERSION "2014.03.24"
165165

166166
/* If using the C implementation of alloca, define if you know the
167167
direction of stack growth for your system; otherwise it will be

cuda_groestlcoin.cu

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ extern uint32_t T2up_cpu[];
8282
extern uint32_t T2dn_cpu[];
8383
extern uint32_t T3up_cpu[];
8484
extern uint32_t T3dn_cpu[];
85-
extern uint32_t sha256_cpu_hashTable[];
86-
extern uint32_t sha256_cpu_constantTable[];
8785

8886
#define S(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
8987
#define R(x, n) ((x) >> (n))
@@ -212,15 +210,14 @@ __global__ void
212210
// GROESTL
213211
uint32_t message[32];
214212
uint32_t state[32];
215-
216-
// SHA
217-
// jeder thread in diesem Block bekommt sein eigenes W Array im Shared memory
218213
uint32_t g[32];
219214

220215

221216
#pragma unroll 32
222217
for(int k=0;k<32;k++)
223218
{
219+
// TODO: die Vorbelegung mit Nullen braucht nicht zwingend aus dem
220+
// constant Memory zu lesen. Das ist Verschwendung von Bandbreite.
224221
state[k] = groestlcoin_gpu_state[k];
225222
message[k] = groestlcoin_gpu_msg[k];
226223
}
@@ -230,12 +227,12 @@ __global__ void
230227

231228
#pragma unroll 32
232229
for(int u=0;u<32;u++)
233-
g[u] = message[u] ^ state[u];
230+
g[u] = message[u] ^ state[u]; // TODO: state ist fast ueberall 0.
234231

235232
// Perm
236233
#if USE_SHARED
237-
groestlcoin_perm_P(g, mixtabs);
238-
groestlcoin_perm_Q(message, mixtabs);
234+
groestlcoin_perm_P(g, mixtabs); // TODO: g[] entspricht fast genau message[]
235+
groestlcoin_perm_Q(message, mixtabs); // kann man das ausnutzen?
239236
#else
240237
groestlcoin_perm_P(g, NULL);
241238
groestlcoin_perm_Q(message, NULL);
@@ -244,6 +241,8 @@ __global__ void
244241
#pragma unroll 32
245242
for(int u=0;u<32;u++)
246243
{
244+
// TODO: kann man evtl. das xor mit g[u] vorziehen hinter die groestlcoin_perm_P Funktion
245+
// was den Registerbedarf senken koennte?
247246
state[u] ^= g[u] ^ message[u];
248247
g[u] = state[u];
249248
}
@@ -373,17 +372,10 @@ __host__ void groestlcoin_cpu_init(int thr_id, int threads)
373372
texDef(t3up1, d_T3up, T3up_cpu, sizeof(uint32_t)*256);
374373
texDef(t3dn1, d_T3dn, T3dn_cpu, sizeof(uint32_t)*256);
375374

376-
// Kopiere die Hash-Tabellen in den GPU-Speicher
377-
cudaMemcpyToSymbol( sha256coin_gpu_constantTable,
378-
sha256_cpu_constantTable,
379-
sizeof(uint32_t) * 64 );
380-
381-
// Startvektor
382-
cudaMemcpyToSymbol( sha256coin_gpu_register,
383-
sha256_cpu_hashTable,
384-
sizeof(uint32_t) * 8 );
385-
386375
// setze register
376+
// TODO: fast vollstaendige Vorbelegung mit Nullen.
377+
// da besteht doch Optimierungspotenzial im GPU Kernel
378+
// denn mit Nullen braucht man nicht wirklich rechnen.
387379
uint32_t groestl_state_init[32];
388380
memset(groestl_state_init, 0, sizeof(uint32_t) * 32);
389381
groestl_state_init[31] = 0x20000;

cuda_hefty1.cu

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
#include <stdio.h>
66
#include <memory.h>
77

8-
#define USE_SHARED 0
9-
#define W_ALIGNMENT 65
10-
118
// Folgende Definitionen später durch header ersetzen
129
typedef unsigned int uint32_t;
1310
typedef unsigned char uint8_t;

0 commit comments

Comments
 (0)