Skip to content

Commit

Permalink
update to version v0.5 (2014-03-27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Buchner authored and Christian Buchner committed Mar 26, 2014
1 parent 1bb78f0 commit 2ca6ede
Show file tree
Hide file tree
Showing 17 changed files with 588 additions and 465 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ ccminer_CPPFLAGS = -msse2 @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(PTHREAD_FLAGS) -f

# we're now targeting all major compute architectures within one binary.
.cu.o:
$(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 $<
$(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 $<
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ uninstall-am: uninstall-binPROGRAMS

# we're now targeting all major compute architectures within one binary.
.cu.o:
$(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 $<
$(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 $<

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
Expand Down
42 changes: 30 additions & 12 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

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

***************************************************************
Expand Down Expand Up @@ -38,6 +38,11 @@ its command line interface and options.
fugue256 use to mine Fuguecoin
groestl use to mine Groestlcoin

-d, --devices gives a comma separated list of CUDA device IDs
to operate on. Device IDs start counting from 0!
Alternatively give string names of your card like
gtx780ti or gt640#2 (matching 2nd gt640 in the PC).

-o, --url=URL URL of mining server (default: " DEF_RPC_URL ")
-O, --userpass=U:P username:password pair for mining server
-u, --user=USERNAME username for mining server
Expand All @@ -63,8 +68,10 @@ its command line interface and options.
-V, --version display version information and exit
-h, --help display this help text and exit


>>> Examples <<<


Example for Heavycoin Mining on heavycoinpool.com with a single gpu in your system

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

>>> RELEASE HISTORY <<<

March, 24 2014 fixed Groestl pool support
March, 27 2014 Heavycoin exchange rates soar, and as a result this coin
gets some love: We greatly optimized the Hefty1 kernel
for speed. Expect some hefty gains, especially on 750Ti's!

By popular demand, we added the -d option as known from
cudaminer.

different compute capability builds are now provided until
we figure out how to pack everything into a single executable
in a Windows build.

March, 24 2014 fixed Groestl pool support

went back to Compute 1.x for cuda_hefty1.cu kernel by
default after numerous reports of ccminer v0.2/v0.3
not working with HeavyCoin for some people.
went back to Compute 1.x for cuda_hefty1.cu kernel by
default after numerous reports of ccminer v0.2/v0.3
not working with HeavyCoin for some people.

March, 23 2014 added Groestlcoin support. stratum status unknown
(the only pool is currently down for fixing issues)
March, 23 2014 added Groestlcoin support. stratum status unknown
(the only pool is currently down for fixing issues)

March, 21 2014 use of shared memory in Fugue256 kernel boosts hash rates
on Fermi and Maxwell devices. Kepler may suffer slightly
(3-5%)
March, 21 2014 use of shared memory in Fugue256 kernel boosts hash rates
on Fermi and Maxwell devices. Kepler may suffer slightly
(3-5%)

Fixed Stratum for Fuguecoin. Tested on dwarfpool.
Fixed Stratum for Fuguecoin. Tested on dwarfpool.

March, 18 2014 initial release.
March, 18 2014 initial release.


>>> AUTHORS <<<
Expand Down
27 changes: 9 additions & 18 deletions ccminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<CInterleavedPTX>true</CInterleavedPTX>
</CudaCompile>
<CudaCompile>
<MaxRegCount>63</MaxRegCount>
<MaxRegCount>80</MaxRegCount>
</CudaCompile>
<CudaCompile>
<PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep>
<CodeGeneration>compute_20,sm_20</CodeGeneration>
<CodeGeneration>compute_35,sm_35</CodeGeneration>
<Include>
</Include>
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
Expand All @@ -127,12 +127,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<CInterleavedPTX>true</CInterleavedPTX>
</CudaCompile>
<CudaCompile>
<MaxRegCount>63</MaxRegCount>
<MaxRegCount>80</MaxRegCount>
</CudaCompile>
<CudaCompile>
<PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep>
<CodeGeneration>compute_20,sm_20</CodeGeneration>
<CodeGeneration>compute_35,sm_35</CodeGeneration>
<Include>
</Include>
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -163,12 +163,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<CInterleavedPTX>true</CInterleavedPTX>
</CudaCompile>
<CudaCompile>
<MaxRegCount>63</MaxRegCount>
<MaxRegCount>80</MaxRegCount>
</CudaCompile>
<CudaCompile>
<PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep>
<CodeGeneration>compute_20,sm_20</CodeGeneration>
<CodeGeneration>compute_35,sm_35</CodeGeneration>
<Include>
</Include>
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -199,12 +199,12 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<CInterleavedPTX>true</CInterleavedPTX>
</CudaCompile>
<CudaCompile>
<MaxRegCount>63</MaxRegCount>
<MaxRegCount>80</MaxRegCount>
</CudaCompile>
<CudaCompile>
<PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep>
<CodeGeneration>compute_20,sm_20</CodeGeneration>
<CodeGeneration>compute_35,sm_35</CodeGeneration>
<Include>
</Include>
<AdditionalOptions>-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -277,16 +277,7 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<CudaCompile Include="cuda_fugue256.cu" />
<CudaCompile Include="cuda_groestl512.cu" />
<CudaCompile Include="cuda_groestlcoin.cu" />
<CudaCompile Include="cuda_hefty1.cu">
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">compute_10,sm_10</CodeGeneration>
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">compute_10,sm_10</CodeGeneration>
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">124</MaxRegCount>
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">124</MaxRegCount>
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">compute_10,sm_10</CodeGeneration>
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">124</MaxRegCount>
<CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Release|x64'">compute_10,sm_10</CodeGeneration>
<MaxRegCount Condition="'$(Configuration)|$(Platform)'=='Release|x64'">124</MaxRegCount>
</CudaCompile>
<CudaCompile Include="cuda_hefty1.cu" />
<CudaCompile Include="cuda_keccak512.cu" />
<CudaCompile Include="cuda_sha256.cu" />
<CudaCompile Include="heavy.cu" />
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for ccminer 2014.03.24.
# Generated by GNU Autoconf 2.68 for ccminer 2014.03.27.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Expand Down Expand Up @@ -557,8 +557,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ccminer'
PACKAGE_TARNAME='ccminer'
PACKAGE_VERSION='2014.03.24'
PACKAGE_STRING='ccminer 2014.03.24'
PACKAGE_VERSION='2014.03.27'
PACKAGE_STRING='ccminer 2014.03.27'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

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

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ccminer 2014.03.24:";;
short | recursive ) echo "Configuration of ccminer 2014.03.27:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1469,7 +1469,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ccminer configure 2014.03.24
ccminer configure 2014.03.27
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1972,7 +1972,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ccminer $as_me 2014.03.24, which was
It was created by ccminer $as_me 2014.03.27, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2901,7 +2901,7 @@ fi

# Define the identity of the package.
PACKAGE='ccminer'
VERSION='2014.03.24'
VERSION='2014.03.27'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -7118,7 +7118,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ccminer $as_me 2014.03.24, which was
This file was extended by ccminer $as_me 2014.03.27, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -7184,7 +7184,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ccminer config.status 2014.03.24
ccminer config.status 2014.03.27
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([ccminer], [2014.03.24])
AC_INIT([ccminer], [2014.03.27])

AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM
Expand Down
50 changes: 44 additions & 6 deletions cpu-miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@
// from heavy.cu
#ifdef __cplusplus
extern "C"
{
#endif
int cuda_num_devices();
int cuda_finddevice(char *name);
#ifdef __cplusplus
}
#endif


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

static struct option const options[] = {
{ "algo", 1, NULL, 'a' },
Expand Down Expand Up @@ -259,6 +269,7 @@ static struct option const options[] = {
{ "user", 1, NULL, 'u' },
{ "userpass", 1, NULL, 'O' },
{ "version", 0, NULL, 'V' },
{ "devices", 1, NULL, 'd' },
{ 0, 0, 0, 0 }
};

Expand Down Expand Up @@ -1251,6 +1262,32 @@ static void parse_arg (int key, char *arg)
case 'S':
use_syslog = true;
break;
case 'd': // CB
{
char * pch = strtok (arg,",");
opt_n_threads = 0;
while (pch != NULL) {
if (pch[0] >= '0' && pch[0] <= '9' && pch[1] == '\0')
{
if (atoi(pch) < num_processors)
device_map[opt_n_threads++] = atoi(pch);
else {
applog(LOG_ERR, "Non-existant CUDA device #%d specified in -d option", atoi(pch));
exit(1);
}
} else {
int device = cuda_finddevice(pch);
if (device >= 0 && device < num_processors)
device_map[opt_n_threads++] = device;
else {
applog(LOG_ERR, "Non-existant CUDA device '%s' specified in -d option", pch);
exit(1);
}
}
pch = strtok (NULL, ",");
}
}
break;
case 'V':
show_version_and_exit();
case 'h':
Expand Down Expand Up @@ -1346,7 +1383,7 @@ static void signal_handler(int sig)
}
#endif

#define PROGRAM_VERSION "0.4"
#define PROGRAM_VERSION "0.5"
int main(int argc, char *argv[])
{
struct thr_info *thr;
Expand All @@ -1370,6 +1407,9 @@ int main(int argc, char *argv[])
rpc_user = strdup("");
rpc_pass = strdup("");

pthread_mutex_init(&applog_lock, NULL);
num_processors = cuda_num_devices();

/* parse command line */
parse_cmdline(argc, argv);

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

pthread_mutex_init(&applog_lock, NULL);
pthread_mutex_init(&stats_lock, NULL);
pthread_mutex_init(&g_work_lock, NULL);
pthread_mutex_init(&stratum.sock_lock, NULL);
Expand Down Expand Up @@ -1416,7 +1455,6 @@ int main(int argc, char *argv[])
}
#endif

num_processors = cuda_num_devices();
if (num_processors == 0)
{
applog(LOG_ERR, "No CUDA devices found! terminating.");
Expand Down
4 changes: 2 additions & 2 deletions cpuminer-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
#define PACKAGE_NAME "ccminer"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "ccminer 2014.03.24"
#define PACKAGE_STRING "ccminer 2014.03.27"

/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
Expand All @@ -161,7 +161,7 @@
#undef PACKAGE_URL

/* Define to the version of this package. */
#define PACKAGE_VERSION "2014.03.24"
#define PACKAGE_VERSION "2014.03.27"

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

0 comments on commit 2ca6ede

Please sign in to comment.