Skip to content

Commit

Permalink
v3.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDDee committed Nov 11, 2021
1 parent 1a234cb commit e6fd9b1
Show file tree
Hide file tree
Showing 13 changed files with 1,198 additions and 829 deletions.
79 changes: 2 additions & 77 deletions INSTALL_WINDOWS
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ mkdir $HOME/usr/lib
version available in the repositories.

Download the following source code packages from their respective and
respected download locations, copy them to ~/usr/lib/ and uncompress them.
respected download locations, copy them to $HOME/usr/lib/ and uncompress them.

openssl: https://github.com/openssl/openssl/releases

Expand Down Expand Up @@ -149,85 +149,10 @@ Copy cpuminer.exe to the release directory, compress and copy the release direct

Run cpuminer

In a command windows change directories to the unzipped release folder. to get a list of all options:
In a command windows change directories to the unzipped release folder. To get a list of all options:

cpuminer.exe --help

Command options are specific to where you mine. Refer to the pool's instructions on how to set them.





















Create a link to the locally compiled version of gmp.h

$ ln -s $LOCAL_LIB/gmp-version/gmp.h ./gmp.h

Edit configure.ac to fix lipthread package name.

sed -i 's/"-lpthread"/"-lpthreadGC2"/g' configure.ac


7. Compile

you can use the default compile if you intend to use cpuminer-opt on the
same CPU and the virtual machine supports that architecture.

./build.sh

Otherwise you can compile manually while setting options in CFLAGS.

Some common options:

To compile for a specific CPU architecture:

CFLAGS="-O3 -march=znver1 -Wall" ./configure --with-curl

This will compile for AMD Ryzen.

You can compile more generically for a set of specific CPU features
if you know what features you want:

CFLAGS="-O3 -maes -msse4.2 -Wall" ./configure --with-curl

This will compile for an older CPU that does not have AVX.

You can find several examples in build-allarch.sh

If you have a CPU with more than 64 threads and Windows 7 or higher you
can enable the CPU Groups feature:

-D_WIN32_WINNT==0x0601

Once you have run configure successfully run make with n CPU threads:

make -j n

Copy cpuminer.exe to the release directory, compress and copy the release
directory to a Windows system and run cpuminer.exe from the command line.

Run cpuminer

In a command windows change directories to the unzipped release folder.
to get a list of all options:

cpuminer.exe --help

Command options are specific to where you mine. Refer to the pool's
instructions on how to set them.
17 changes: 16 additions & 1 deletion RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,22 @@ If not what makes it happen or not happen?
Change Log
----------

v3.8.2
v3.19.0

Windows binaries now built with support for CPU groups, requires Windows 7.

Changes to cpu-affinity:
- PR#346: Fixed incorrect CPU affinity on Windows built for CPU groups,
- added support for CPU affinity for up to 256 threads or CPUs,
- streamlined code for more efficient initialization of miner threads,
- precise affining of each miner thread to a specific CPU,
- added an option to disable CPU affinity with "--cpu-affinity 0"

Faster sha256t with AVX512 & AVX2.

Added stratum error count to stats log, reported only when non-zero.

v3.18.2

Issue #342, fixed Groestl AES on Windows, broken in v3.18.0.

Expand Down
23 changes: 17 additions & 6 deletions algo/sha/sha-hash-4way.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ void sha256_4way_transform_le( __m128i *state_out, const __m128i *data,
const __m128i *state_in );
void sha256_4way_transform_be( __m128i *state_out, const __m128i *data,
const __m128i *state_in );
void sha256_4way_prehash_3rounds( __m128i *state_mid, __m128i *X,
const __m128i *W, const __m128i *state_in );
void sha256_4way_final_rounds( __m128i *state_out, const __m128i *data,
const __m128i *state_in, const __m128i *state_mid, const __m128i *X );
int sha256_4way_transform_le_short( __m128i *state_out, const __m128i *data,
const __m128i *state_in );

#endif // SSE2

Expand All @@ -84,10 +90,12 @@ void sha256_8way_transform_le( __m256i *state_out, const __m256i *data,
void sha256_8way_transform_be( __m256i *state_out, const __m256i *data,
const __m256i *state_in );

void sha256_8way_prehash_3rounds( __m256i *state_mid, const __m256i *W,
const __m256i *state_in );
void sha256_8way_prehash_3rounds( __m256i *state_mid, __m256i *X,
const __m256i *W, const __m256i *state_in );
void sha256_8way_final_rounds( __m256i *state_out, const __m256i *data,
const __m256i *state_in, const __m256i *state_mid );
const __m256i *state_in, const __m256i *state_mid, const __m256i *X );
int sha256_8way_transform_le_short( __m256i *state_out, const __m256i *data,
const __m256i *state_in );

#endif // AVX2

Expand All @@ -109,10 +117,13 @@ void sha256_16way_transform_le( __m512i *state_out, const __m512i *data,
const __m512i *state_in );
void sha256_16way_transform_be( __m512i *state_out, const __m512i *data,
const __m512i *state_in );
void sha256_16way_prehash_3rounds( __m512i *state_mid, const __m512i *W,
const __m512i *state_in );
void sha256_16way_prehash_3rounds( __m512i *state_mid, __m512i *X,
const __m512i *W, const __m512i *state_in );
void sha256_16way_final_rounds( __m512i *state_out, const __m512i *data,
const __m512i *state_in, const __m512i *state_mid );
const __m512i *state_in, const __m512i *state_mid, const __m512i *X );

int sha256_16way_transform_le_short( __m512i *state_out, const __m512i *data,
const __m512i *state_in );

#endif // AVX512

Expand Down
19 changes: 11 additions & 8 deletions algo/sha/sha2.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,11 @@ static inline int scanhash_sha256d_8way_pooler( struct work *work,

#endif /* HAVE_SHA256_8WAY */

int scanhash_sha256d_pooler( struct work *work,
uint32_t max_nonce, uint64_t *hashes_done, struct thr_info *mythr )
int scanhash_sha256d_pooler( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr )
{
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
uint32_t *pdata = work->data;
uint32_t *ptarget = work->target;
uint32_t _ALIGN(128) data[64];
uint32_t _ALIGN(32) hash[8];
uint32_t _ALIGN(32) midstate[8];
Expand All @@ -626,12 +626,12 @@ int scanhash_sha256d_pooler( struct work *work,
int thr_id = mythr->id; // thr_id arg is deprecated

#ifdef HAVE_SHA256_8WAY
if (sha256_use_8way())
return scanhash_sha256d_8way_pooler( work, max_nonce, hashes_done, mythr );
if ( sha256_use_8way() )
return scanhash_sha256d_8way_pooler( work, max_nonce, hashes_done, mythr );
#endif
#ifdef HAVE_SHA256_4WAY
if (sha256_use_4way())
return scanhash_sha256d_4way_pooler( work, max_nonce, hashes_done, mythr );
if ( sha256_use_4way() )
return scanhash_sha256d_4way_pooler( work, max_nonce, hashes_done, mythr );
#endif

memcpy(data, pdata + 16, 64);
Expand Down Expand Up @@ -695,8 +695,11 @@ bool register_sha256d_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT | AVX2_OPT | AVX512_OPT;
#if defined(SHA256D_16WAY)
gate->scanhash = (void*)&scanhash_sha256d_16way;
//#elif defined(SHA256D_8WAY)
// gate->scanhash = (void*)&scanhash_sha256d_8way;
#else
gate->scanhash = (void*)&scanhash_sha256d_pooler;
// gate->scanhash = (void*)&scanhash_sha256d_4way;
#endif
// gate->hash = (void*)&sha256d;
return true;
Expand Down
Loading

0 comments on commit e6fd9b1

Please sign in to comment.