Skip to content

Commit 2ca6ede

Browse files
Christian BuchnerChristian Buchner
authored andcommitted
update to version v0.5 (2014-03-27)
1 parent 1bb78f0 commit 2ca6ede

17 files changed

+588
-465
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ ccminer_CPPFLAGS = -msse2 @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(PTHREAD_FLAGS) -f
3434

3535
# we're now targeting all major compute architectures within one binary.
3636
.cu.o:
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 $<
37+
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -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=80 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ uninstall-am: uninstall-binPROGRAMS
10351035

10361036
# we're now targeting all major compute architectures within one binary.
10371037
.cu.o:
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 $<
1038+
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -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=80 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
10391039

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

README.txt

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

2-
ccMiner release 0.4 (Mar 24th 2014) - Groestlcoin Pool Release
2+
ccMiner release 0.5 (Mar 27th 2014) - "Hefty Optimization"
33
-------------------------------------------------------------
44

55
***************************************************************
@@ -38,6 +38,11 @@ its command line interface and options.
3838
fugue256 use to mine Fuguecoin
3939
groestl use to mine Groestlcoin
4040

41+
-d, --devices gives a comma separated list of CUDA device IDs
42+
to operate on. Device IDs start counting from 0!
43+
Alternatively give string names of your card like
44+
gtx780ti or gt640#2 (matching 2nd gt640 in the PC).
45+
4146
-o, --url=URL URL of mining server (default: " DEF_RPC_URL ")
4247
-O, --userpass=U:P username:password pair for mining server
4348
-u, --user=USERNAME username for mining server
@@ -63,8 +68,10 @@ its command line interface and options.
6368
-V, --version display version information and exit
6469
-h, --help display this help text and exit
6570

71+
6672
>>> Examples <<<
6773

74+
6875
Example for Heavycoin Mining on heavycoinpool.com with a single gpu in your system
6976

7077
ccminer.exe -t 1 -a heavy -o stratum+tcp://stratum01.heavycoinpool.com:5333 -u <<username.worker>> -p <<workerpassword>> -v 512
@@ -107,22 +114,33 @@ from your old clunkers.
107114

108115
>>> RELEASE HISTORY <<<
109116

110-
March, 24 2014 fixed Groestl pool support
117+
March, 27 2014 Heavycoin exchange rates soar, and as a result this coin
118+
gets some love: We greatly optimized the Hefty1 kernel
119+
for speed. Expect some hefty gains, especially on 750Ti's!
120+
121+
By popular demand, we added the -d option as known from
122+
cudaminer.
123+
124+
different compute capability builds are now provided until
125+
we figure out how to pack everything into a single executable
126+
in a Windows build.
127+
128+
March, 24 2014 fixed Groestl pool support
111129

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.
130+
went back to Compute 1.x for cuda_hefty1.cu kernel by
131+
default after numerous reports of ccminer v0.2/v0.3
132+
not working with HeavyCoin for some people.
115133

116-
March, 23 2014 added Groestlcoin support. stratum status unknown
117-
(the only pool is currently down for fixing issues)
134+
March, 23 2014 added Groestlcoin support. stratum status unknown
135+
(the only pool is currently down for fixing issues)
118136

119-
March, 21 2014 use of shared memory in Fugue256 kernel boosts hash rates
120-
on Fermi and Maxwell devices. Kepler may suffer slightly
121-
(3-5%)
137+
March, 21 2014 use of shared memory in Fugue256 kernel boosts hash rates
138+
on Fermi and Maxwell devices. Kepler may suffer slightly
139+
(3-5%)
122140

123-
Fixed Stratum for Fuguecoin. Tested on dwarfpool.
141+
Fixed Stratum for Fuguecoin. Tested on dwarfpool.
124142

125-
March, 18 2014 initial release.
143+
March, 18 2014 initial release.
126144

127145

128146
>>> AUTHORS <<<

ccminer.vcxproj

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
9595
<CInterleavedPTX>true</CInterleavedPTX>
9696
</CudaCompile>
9797
<CudaCompile>
98-
<MaxRegCount>63</MaxRegCount>
98+
<MaxRegCount>80</MaxRegCount>
9999
</CudaCompile>
100100
<CudaCompile>
101101
<PtxAsOptionV>true</PtxAsOptionV>
102102
<Keep>true</Keep>
103-
<CodeGeneration>compute_20,sm_20</CodeGeneration>
103+
<CodeGeneration>compute_35,sm_35</CodeGeneration>
104104
<Include>
105105
</Include>
106106
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
@@ -127,12 +127,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
127127
<CInterleavedPTX>true</CInterleavedPTX>
128128
</CudaCompile>
129129
<CudaCompile>
130-
<MaxRegCount>63</MaxRegCount>
130+
<MaxRegCount>80</MaxRegCount>
131131
</CudaCompile>
132132
<CudaCompile>
133133
<PtxAsOptionV>true</PtxAsOptionV>
134134
<Keep>true</Keep>
135-
<CodeGeneration>compute_20,sm_20</CodeGeneration>
135+
<CodeGeneration>compute_35,sm_35</CodeGeneration>
136136
<Include>
137137
</Include>
138138
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
@@ -163,12 +163,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
163163
<CInterleavedPTX>true</CInterleavedPTX>
164164
</CudaCompile>
165165
<CudaCompile>
166-
<MaxRegCount>63</MaxRegCount>
166+
<MaxRegCount>80</MaxRegCount>
167167
</CudaCompile>
168168
<CudaCompile>
169169
<PtxAsOptionV>true</PtxAsOptionV>
170170
<Keep>true</Keep>
171-
<CodeGeneration>compute_20,sm_20</CodeGeneration>
171+
<CodeGeneration>compute_35,sm_35</CodeGeneration>
172172
<Include>
173173
</Include>
174174
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
@@ -199,12 +199,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
199199
<CInterleavedPTX>true</CInterleavedPTX>
200200
</CudaCompile>
201201
<CudaCompile>
202-
<MaxRegCount>63</MaxRegCount>
202+
<MaxRegCount>80</MaxRegCount>
203203
</CudaCompile>
204204
<CudaCompile>
205205
<PtxAsOptionV>true</PtxAsOptionV>
206206
<Keep>true</Keep>
207-
<CodeGeneration>compute_20,sm_20</CodeGeneration>
207+
<CodeGeneration>compute_35,sm_35</CodeGeneration>
208208
<Include>
209209
</Include>
210210
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
@@ -277,16 +277,7 @@ 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">
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>
280+
<CudaCompile Include="cuda_hefty1.cu" />
290281
<CudaCompile Include="cuda_keccak512.cu" />
291282
<CudaCompile Include="cuda_sha256.cu" />
292283
<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.24.
3+
# Generated by GNU Autoconf 2.68 for ccminer 2014.03.27.
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.24'
561-
PACKAGE_STRING='ccminer 2014.03.24'
560+
PACKAGE_VERSION='2014.03.27'
561+
PACKAGE_STRING='ccminer 2014.03.27'
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.24 to adapt to many kinds of systems.
1300+
\`configure' configures ccminer 2014.03.27 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.24:";;
1371+
short | recursive ) echo "Configuration of ccminer 2014.03.27:";;
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.24
1472+
ccminer configure 2014.03.27
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.24, which was
1975+
It was created by ccminer $as_me 2014.03.27, 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.24'
2904+
VERSION='2014.03.27'
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.24, which was
7121+
This file was extended by ccminer $as_me 2014.03.27, 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.24
7187+
ccminer config.status 2014.03.27
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.24])
1+
AC_INIT([ccminer], [2014.03.27])
22

33
AC_PREREQ([2.59c])
44
AC_CANONICAL_SYSTEM

cpu-miner.c

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,13 @@
5151
// from heavy.cu
5252
#ifdef __cplusplus
5353
extern "C"
54+
{
5455
#endif
5556
int cuda_num_devices();
57+
int cuda_finddevice(char *name);
58+
#ifdef __cplusplus
59+
}
60+
#endif
5661

5762

5863
#ifdef __linux /* Linux specific policy and affinity management */
@@ -144,10 +149,11 @@ static int opt_scantime = 5;
144149
static json_t *opt_config;
145150
static const bool opt_time = true;
146151
static sha256_algos opt_algo = ALGO_HEAVY;
147-
static int opt_n_threads;
152+
static int opt_n_threads = 0;
148153
bool opt_trust_pool = false;
149154
uint16_t opt_vote = 9999;
150155
static int num_processors;
156+
int device_map[8] = {0,1,2,3,4,5,6,7}; // CB
151157
static char *rpc_url;
152158
static char *rpc_userpass;
153159
static char *rpc_user, *rpc_pass;
@@ -185,7 +191,11 @@ Options:\n\
185191
-a, --algo=ALGO specify the algorithm to use\n\
186192
fugue256 Fuguecoin hash\n\
187193
heavy Heavycoin hash\n\
188-
-v, --vote=VOTE block reward vote\n\
194+
-d, --devices takes a comma separated list of CUDA devices to use.\n\
195+
Device IDs start counting from 0! Alternatively takes\n\
196+
string names of your cards like gtx780ti or gt640#2\n\
197+
(matching 2nd gt640 in the PC)\n\
198+
-v, --vote=VOTE block reward vote (for HeavyCoin)\n\
189199
-m, --trust-pool trust the max block reward vote (maxvote) sent by the pool\n\
190200
-o, --url=URL URL of mining server\n\
191201
-O, --userpass=U:P username:password pair for mining server\n\
@@ -227,7 +237,7 @@ static char const short_options[] =
227237
#ifdef HAVE_SYSLOG_H
228238
"S"
229239
#endif
230-
"a:c:Dhp:Px:qr:R:s:t:T:o:u:O:Vmv:";
240+
"a:c:Dhp:Px:qr:R:s:t:T:o:u:O:Vd:mv:";
231241

232242
static struct option const options[] = {
233243
{ "algo", 1, NULL, 'a' },
@@ -259,6 +269,7 @@ static struct option const options[] = {
259269
{ "user", 1, NULL, 'u' },
260270
{ "userpass", 1, NULL, 'O' },
261271
{ "version", 0, NULL, 'V' },
272+
{ "devices", 1, NULL, 'd' },
262273
{ 0, 0, 0, 0 }
263274
};
264275

@@ -1251,6 +1262,32 @@ static void parse_arg (int key, char *arg)
12511262
case 'S':
12521263
use_syslog = true;
12531264
break;
1265+
case 'd': // CB
1266+
{
1267+
char * pch = strtok (arg,",");
1268+
opt_n_threads = 0;
1269+
while (pch != NULL) {
1270+
if (pch[0] >= '0' && pch[0] <= '9' && pch[1] == '\0')
1271+
{
1272+
if (atoi(pch) < num_processors)
1273+
device_map[opt_n_threads++] = atoi(pch);
1274+
else {
1275+
applog(LOG_ERR, "Non-existant CUDA device #%d specified in -d option", atoi(pch));
1276+
exit(1);
1277+
}
1278+
} else {
1279+
int device = cuda_finddevice(pch);
1280+
if (device >= 0 && device < num_processors)
1281+
device_map[opt_n_threads++] = device;
1282+
else {
1283+
applog(LOG_ERR, "Non-existant CUDA device '%s' specified in -d option", pch);
1284+
exit(1);
1285+
}
1286+
}
1287+
pch = strtok (NULL, ",");
1288+
}
1289+
}
1290+
break;
12541291
case 'V':
12551292
show_version_and_exit();
12561293
case 'h':
@@ -1346,7 +1383,7 @@ static void signal_handler(int sig)
13461383
}
13471384
#endif
13481385

1349-
#define PROGRAM_VERSION "0.4"
1386+
#define PROGRAM_VERSION "0.5"
13501387
int main(int argc, char *argv[])
13511388
{
13521389
struct thr_info *thr;
@@ -1370,6 +1407,9 @@ int main(int argc, char *argv[])
13701407
rpc_user = strdup("");
13711408
rpc_pass = strdup("");
13721409

1410+
pthread_mutex_init(&applog_lock, NULL);
1411+
num_processors = cuda_num_devices();
1412+
13731413
/* parse command line */
13741414
parse_cmdline(argc, argv);
13751415

@@ -1385,7 +1425,6 @@ int main(int argc, char *argv[])
13851425
sprintf(rpc_userpass, "%s:%s", rpc_user, rpc_pass);
13861426
}
13871427

1388-
pthread_mutex_init(&applog_lock, NULL);
13891428
pthread_mutex_init(&stats_lock, NULL);
13901429
pthread_mutex_init(&g_work_lock, NULL);
13911430
pthread_mutex_init(&stratum.sock_lock, NULL);
@@ -1416,7 +1455,6 @@ int main(int argc, char *argv[])
14161455
}
14171456
#endif
14181457

1419-
num_processors = cuda_num_devices();
14201458
if (num_processors == 0)
14211459
{
14221460
applog(LOG_ERR, "No CUDA devices found! terminating.");

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.24"
155+
#define PACKAGE_STRING "ccminer 2014.03.27"
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.24"
164+
#define PACKAGE_VERSION "2014.03.27"
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

0 commit comments

Comments
 (0)