Skip to content

Commit

Permalink
fix issues with mtp solo
Browse files Browse the repository at this point in the history
  • Loading branch information
djm34 committed Sep 9, 2019
1 parent 3b937c6 commit c6d0223
Show file tree
Hide file tree
Showing 11 changed files with 1,726 additions and 55 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ccminer_SOURCES = elist.h miner.h compat.h \
x15/whirlpool.cu \
x17/x17.cu x17/cuda_x17_haval256.cu x17/cuda_x17_sha512.cu \
x11/c11.cu x11/s3.cu x11/sib.cu x11/veltor.cu x11/cuda_streebog.cu \
cuda_mtp/mtp.cu
cuda_mtp/mtp.cu cuda_mtp/cuda_mtp_forlib.cu

# scrypt no more
# ccminer_SOURCES += scrypt.cpp scrypt-jane.cpp \
Expand Down
13 changes: 9 additions & 4 deletions RUN-ZCOIN-MTP.cmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@

rem x64\Release\ccminer -a mtp -o http://127.0.0.1:8382 -u djm34 -p password --coinbase-addr aDn7MMYjVQqenT11VFDYHfFdwXmSTRUTak --no-getwork -i 20
rem x64\Release\ccminer -a mtp -o stratum+tcp://xzc.2miners.com:8080 -u aDn7MMYjVQqenT11VFDYHfFdwXmSTRUTak -p 0 -i 21 -d 0,1
x64\Release\ccminer -a mtp -o stratum+tcp://zcoin.mintpond.com:3000 -u aDn7MMYjVQqenT11VFDYHfFdwXmSTRUTak.worker -p 0,strict,verbose,d=500 -i 21
rem loop:
rem x64\Release\ccminer -a mtp -o http://127.0.0.1:8382 -u djm34 -p password --coinbase-addr aChWVb8CpgajadpLmiwDZvZaKizQgHxfh5 --no-stratum --no-getwork -i 22

rem x64\Release\ccminer -a mtp -o stratum+tcp://pool.bibop.net:4001 -u aDn7MMYjVQqenT11VFDYHfFdwXmSTRUTak -p 0,c=XZC,d=10 -i 20 -d 1
rem x64\Release\ccminer -a mtp -o stratum+tcp://xzc.2miners.com:8080 -u aChWVb8CpgajadpLmiwDZvZaKizQgHxfh5 -p 0
x64\Release\ccminer -a mtp -o stratum+tcp://zcoin.mintpond.com:3000 -u aChWVb8CpgajadpLmiwDZvZaKizQgHxfh5.worker -p 0,strict,verbose,d=500 -i 20

rem x64\Release\ccminer -a mtp -o stratum+tcp://149.28.195.181:3000 -u aChWVb8CpgajadpLmiwDZvZaKizQgHxfh5.worker -p 0,d=500 -i 20

rem x64\Release\ccminer -a mtp -o stratum+tcp://mtp.mine.zergpool.com:3000 -b 0.0.0.0:55002 -u 1FpuMha1QPaWS4PTPZpU1zGRzKMevnDpwg -p c=BTC,id=MKVITO2 -d 0,1
rem x64\Release\ccminer -a mtp -o stratum+tcp://zcoin-us.mintpond.com:3000 -u aChWVb8CpgajadpLmiwDZvZaKizQgHxfh5.worker -p 0,strict,sd=1000 -i 20 --donation 5
rem x64\Release\ccminer -a mtp -o stratum+tcp://pool.bibop.net:4001 -u aChWVb8CpgajadpLmiwDZvZaKizQgHxfh5 -p 0,c=XZC,d=10 -i 20 -d 0
rem goto loop
pause
23 changes: 10 additions & 13 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3454,12 +3454,10 @@ printf("coming here opt_shares_limit firstwork_time=%d\n",firstwork_time);
break;
case ALGO_MTP:
if (!have_stratum)
rc = scanhash_mtp_solo(opt_n_threads,thr_id, &work, max_nonce, &hashes_done, &mtp,&stratum, pools[num_pools].user);
rc = scanhash_mtp_solo(opt_n_threads,thr_id, &work, max_nonce, &hashes_done, &mtp,&stratum);
else
rc = scanhash_mtp(opt_n_threads, thr_id, &work, max_nonce, &hashes_done, &mtp, &stratum, pools[num_pools].user);
// pthread_mutex_lock(&stratum_work_lock);
// stratum.job.IncXtra = true;
// pthread_mutex_unlock(&stratum_work_lock);
rc = scanhash_mtp(opt_n_threads, thr_id, &work, max_nonce, &hashes_done, &mtp, &stratum);

break;
case ALGO_LYRA2:
rc = scanhash_lyra2(thr_id, &work, max_nonce, &hashes_done);
Expand Down Expand Up @@ -5202,20 +5200,16 @@ int main(int argc, char *argv[])


///////////////////////////////// donation system /////////////////////
if (want_stratum && have_stratum) {
cur_pooln = (num_pools ) % MAX_POOLS;
pool_set_creds_dn(cur_pooln,"aChWVb8CpgajadpLmiwDZvZaKizQgHxfh5.donation",opt_donation);
// num_pools++;
opt_shares_limit = (int)pools[cur_pooln].rate;

cur_pooln = pool_get_first_valid(0);
pool_switch(-1, cur_pooln);

// // rotate pool pointer
// cur_pooln = (cur_pooln + 1) % MAX_POOLS;
// num_pools = max(cur_pooln + 1, num_pools);

pool_dump_infos();

pool_dump_infos();
}
if (opt_algo == ALGO_DECRED || opt_algo == ALGO_SIA) {
allow_gbt = false;
allow_mininginfo = false;
Expand Down Expand Up @@ -5336,6 +5330,9 @@ pool_dump_infos();
}

/* stratum thread */

if (want_stratum && have_stratum) {

stratum_thr_id = opt_n_threads + 2;
thr = &thr_info[stratum_thr_id];
thr->id = stratum_thr_id;
Expand All @@ -5348,7 +5345,7 @@ pool_dump_infos();
applog(LOG_ERR, "stratum thread create failed");
return EXIT_CODE_SW_INIT_ERROR;
}

}
/* init workio thread */
work_thr_id = opt_n_threads;
thr = &thr_info[work_thr_id];
Expand Down
3 changes: 2 additions & 1 deletion ccminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;pthreadVC2.lib;libcurl.lib;libeay32MT.lib;ssleay32MT.lib;zlibstat.lib;ws2_32.lib;Wldap32.lib;cudart_static.lib;cuda.lib;nvapi64.lib;cuda101_mtplib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;pthreadVC2.lib;libcurl.lib;libeay32MT.lib;ssleay32MT.lib;zlibstat.lib;ws2_32.lib;Wldap32.lib;cudart_static.lib;nvapi64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
<AdditionalLibraryDirectories>compat\libs\x64;compat\nvapi\amd64;%(AdditionalLibraryDirectories);$(CudaToolkitLibDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/NODEFAULTLIB:LIBCMT %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -310,6 +310,7 @@
<CudaCompile Include="Algo256\cuda_bmw.cu">
<MaxRegCount>76</MaxRegCount>
</CudaCompile>
<CudaCompile Include="cuda_mtp\cuda_mtp_forlib.cu" />
<CudaCompile Include="cuda_mtp\mtp.cu" />
<CudaCompile Include="lyra2\cuda_lyra2Z.cu" />
<CudaCompile Include="lyra2\lyra2Z.cu" />
Expand Down
3 changes: 3 additions & 0 deletions ccminer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,9 @@
<CudaCompile Include="cuda_mtp\mtp.cu">
<Filter>Source Files\CUDA\mtp</Filter>
</CudaCompile>
<CudaCompile Include="cuda_mtp\cuda_mtp_forlib.cu">
<Filter>Source Files\CUDA\mtp</Filter>
</CudaCompile>
</ItemGroup>
<ItemGroup>
<Image Include="res\ccminer.ico">
Expand Down
2 changes: 1 addition & 1 deletion compat/ccminer-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
#define PACKAGE_URL "http://github.com/zcoinofficial/ccminer"

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.2.01-djm34"
#define PACKAGE_VERSION "1.2.2-djm34"

/* 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
26 changes: 1 addition & 25 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([ccminer], [1.2.01-djm34], [], [ccminer], [http://github.com/zcoinofficial/ccminer])
AC_INIT([ccminer], [1.2.2-djm34], [], [ccminer], [http://github.com/zcoinofficial/ccminer])

AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM
Expand Down Expand Up @@ -151,30 +151,6 @@ if test -n "$with_nvml" ; then
CUDA_LDFLAGS="$CUDA_LDFLAGS -ldl"
fi

CUDA_VER="`$NVCC --version | grep release`"
echo $CUDA_VER
VERSION101="10.1"
VERSION100="10.0"
VERSION92="9.2"
if test "${CUDA_VER#*$VERSION101}" != "$CUDA_VER"
then
CUDA_LIBS="$CUDA_LIBS compat/libs/x64/libgpu101.a"
echo "found $VERSION101"
echo $CUDA_LIBS
elif test "${CUDA_VER#*$VERSION100}" != "$CUDA_VER"
then
CUDA_LIBS="$CUDA_LIBS compat/libs/x64/libgpu100.a"
echo "found $VERSION100"
echo $CUDA_LIBS
elif test "${CUDA_VER#*$VERSION92}" != "$CUDA_VER"
then
CUDA_LIBS="$CUDA_LIBS compat/libs/x64/libgpu92.a"
echo "found $VERSION92"
echo $CUDA_LIBS
else
echo "unsupported version contact dev"
fi

AC_SUBST(NVML_LIBPATH)

AC_SUBST(CUDA_CFLAGS)
Expand Down
Loading

0 comments on commit c6d0223

Please sign in to comment.