CG_OBUP Optimized BURSTcoin Plotter



  • Hello mates,
    Can someone help me to compile this plotter? CentOS 7 return this error:

    $ make
    gcc -Wall -m64 -O3 -mtune=skylake -D_FILE_OFFSET_BITS=64 -c -o shabal64.o shabal64.s
    gcc -Wall -m64 -O3 -mtune=skylake -D_FILE_OFFSET_BITS=64 -c -o helper64.o helper.c
    helper.c:1:0: error: bad value (skylake) for -mtune= switch
    #include <string.h>
    ^
    make: *** [helper64.o] Error 1

    Downloaded from: https://github.com/PoC-Consortium/cg_obup



  • @mrowcp

    Haven't looked at the code, just guessing:
    edit the Makefile, setting

    -mtune=arch

    will optimize for the machine you're compiling on.



  • It's not working again :(

    gcc -Wall -m64 -O3 -mtune=arch -D_FILE_OFFSET_BITS=64 -c -o helper64.o helper.c
    helper.c:1:0: error: bad value (arch) for -mtune= switch
    #include <string.h>
    ^
    make: *** [helper64.o] Error 1



  • @mrowcp then just omit -mtune.



  • If I remove it:

    $ make
    gcc -Wall -m64 -O3 -D_FILE_OFFSET_BITS=64 -c -o helper64.o helper.c
    gcc -Wall -m64 -O3 -D_FILE_OFFSET_BITS=64 -c -o mshabal_sse4.o mshabal_sse4.c
    gcc -Wall -m64 -O3 -D_FILE_OFFSET_BITS=64 -mavx2 -c -o mshabal256_avx2.o mshabal256_avx2.c
    mshabal256_avx2.c: In function 'mshabal256_compress':
    mshabal256_avx2.c:48:5: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint8_t j = 0; j < 12; j++) {
    ^
    mshabal256_avx2.c:48:5: note: use option -std=c99 or -std=gnu99 to compile your code
    mshabal256_avx2.c:67:9: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint8_t j = 0; j < 128; j += 8, o += 4) {
    ^
    mshabal256_avx2.c:78:22: error: redefinition of 'j'
    for (uint8_t j = 0; j < 16; j++)
    ^
    mshabal256_avx2.c:67:22: note: previous definition of 'j' was here
    for (uint8_t j = 0; j < 128; j += 8, o += 4) {
    ^
    mshabal256_avx2.c:78:9: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint8_t j = 0; j < 16; j++)
    ^
    mshabal256_avx2.c:84:22: error: redefinition of 'j'
    for (uint8_t j = 0; j < 16; j++)
    ^
    mshabal256_avx2.c:78:22: note: previous definition of 'j' was here
    for (uint8_t j = 0; j < 16; j++)
    ^
    mshabal256_avx2.c:84:9: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint8_t j = 0; j < 16; j++)
    ^
    mshabal256_avx2.c:230:18: error: redefinition of 'j'
    for (uint8_t j = 0; j < 12; j++) {
    ^
    mshabal256_avx2.c:48:18: note: previous definition of 'j' was here
    for (uint8_t j = 0; j < 12; j++) {
    ^
    mshabal256_avx2.c:230:5: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint8_t j = 0; j < 12; j++) {
    ^
    mshabal256_avx2.c: In function 'mshabal256_init':
    mshabal256_avx2.c:260:5: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint8_t u = 0; u < 16; u++) {
    ^
    mshabal256_avx2.c:282:18: error: redefinition of 'u'
    for (uint8_t u = 0; u < 16; u++) {
    ^
    mshabal256_avx2.c:260:18: note: previous definition of 'u' was here
    for (uint8_t u = 0; u < 16; u++) {
    ^
    mshabal256_avx2.c:282:5: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint8_t u = 0; u < 16; u++) {
    ^
    mshabal256_avx2.c: In function 'mshabal256_close':
    mshabal256_avx2.c:412:5: error: 'for' loop initial declarations are only allowed in C99 mode
    for (uint16_t z = 288; z < 352;) {
    ^
    make: *** [mshabal256_avx2.o] Error 1

    My CPU is:

    AMD Phenom(tm) II X4 945 Processor
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc art rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save



  • @mrowcp said in CG_OBUP Optimized BURSTcoin Plotter:

    My CPU is:
    AMD Phenom(tm) II X4 945 Processor

    you're trying to compile avx2 code on an eight year old processor, that is lacking the command set. You already compiled the sse4 version of the code - just omit the avx/avx2 version altogether. See the targets in the Makefile..