tromp / cuckoo

a memory-bound graph-theoretic proof-of-work system
Other
822 stars 173 forks source link

Compilation error #39

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi John,

First of all, "Merry Xmas"!

I've a little problem compiling your code on my laptop:

$ export LD_LIBRARY_PATH=$PWD $ make gcc -m64 -std=gnu11 -O -fPIC -shared -o libblake2b.so blake2b-ref.c echo "add build dir to LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on Mac OSX) if library not found" add build dir to LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on Mac OSX) if library not found g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o lean20 -DATOMIC -DEDGEBITS=19 lean_miner.cpp -L. -lblake2b gcc -m64 -std=gnu11 -O -o verify20 -DEDGEBITS=19 cuckoo.c -L. -lblake2b ./lean20 -n 38 | grep ^Sol | ./verify20 -n 38 Verifying size 42 proof for cuckoo20("",38) Verified with cyclehash 2f0e43de86b8ca70e73170d54750d0dc86dcdbf5563265911d981801b929dd63 g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o lean4 -DSHOW -DIDXSHIFT=0 -DPROOFSIZE=6 -DEDGEBITS=3 simple_miner.cpp -L. -lblake2b ./lean4 -h 211 Looking for 6-cycle on cuckoo4("211") with 50% edges 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 0 (6,15) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:06 2 (2,15) 1: 2:15 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:06 3 (6,5) 1: 2:15 3: 4: 5:06 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:06 4 (12,11) 1: 2:15 3: 4: 5:06 6: 7: 8: 9: 10: 11:12 12: 13: 14: 15:06 5 (2,11) 1: 2:15 3: 4: 5:06 6: 7: 8: 9: 10: 11:02 12:11 13: 14: 15:06 6 (4,11) 1: 2:15 3: 4:11 5:06 6: 7: 8: 9: 10: 11:02 12:11 13: 14: 15:06 7 (4,5) 6-cycle found at 87% Solution 0 2 3 5 6 7 g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o lean28stx8 -mavx2 -DNSIPHASH=8 -DEDGEBITS=27 lean_miner.cpp -L. -lblake2b g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o mean28x8 -mavx2 -DXBITS=6 -DCOMPRESSROUND=10 -DNSIPHASH=8 -DEDGEBITS=27 mean_miner.cpp -L. -lblake2b g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o lean30stx8 -mavx2 -DNSIPHASH=8 -DEDGEBITS=29 lean_miner.cpp -L. -lblake2b g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o mean30x8 -mavx2 -DNSIPHASH=8 -DEDGEBITS=29 mean_miner.cpp -L. -lblake2b g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o lean32stx8 -mavx2 -DNSIPHASH=8 -DEDGEBITS=31 lean_miner.cpp -L. -lblake2b g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o mean32x8 -mavx2 -DEXPANDROUND=8 -DCOMPRESSROUND=22 -DXBITS=8 -DNSIPHASH=8 -DEDGEBITS=31 mean_miner.cpp -L. -lblake2b gcc -m64 -std=gnu11 -O -o verify28 -DEDGEBITS=27 cuckoo.c -L. -lblake2b gcc -m64 -std=gnu11 -O -o verify30 -DEDGEBITS=29 cuckoo.c -L. -lblake2b gcc -m64 -std=gnu11 -O -o verify32 -DEDGEBITS=31 cuckoo.c -L. -lblake2b g++ -march=native -m64 -std=c++11 -Wall -Wno-format -Wno-deprecated-declarations -D_POSIX_C_SOURCE=200112L -O3 -DPREFETCH -I. -pthread -o mean30sx8 -mavx2 -DSAVEEDGES -DNSIPHASH=8 -DEDGEBITS=29 mean_miner.cpp -L. -lblake2b time ./mean30sx8 -n 63 Looking for 42-cycle on cuckoo30("",63) with 50% edges Using 3168MB bucket memory at 7fc335202010, 1x21MB thread memory at 7fc333d11010, 8-way siphash, and 128 buckets. nonce 63 0.12user 2.36system 0:23.55elapsed 10%CPU (0avgtext+0avgdata 3268776maxresident)k 16inputs+0outputs (0major+816560minor)pagefaults 0swaps make: *** [Makefile:105: demo30x8] Error 4

Could you help me, please? Thanks, Marco

tromp commented 6 years ago

Happy holidays, Marco!

I've a little problem compiling your code on my laptop:

time ./mean30sx8 -n 63 Looking for 42-cycle on cuckoo30("",63) with 50% edges Using 3168MB bucket memory at 7fc335202010, 1x21MB thread memory at 7fc333d11010, 8-way siphash, and 128 buckets. nonce 63 0.12user 2.36system 0:23.55elapsed 10%CPU (0avgtext+0avgdata 3268776maxresident)k 16inputs+0outputs (0major+816560minor)pagefaults 0swaps make: *** [Makefile:105: demo30x8] Error 4

This looks like an execution problem rather than a compilation problem. Did you perhaps run out of memory? You'd need to have at least 3200MB memory freely available...

You can also try running ./mean28x8, which needs only 800MB.

regards, -John

ghost commented 6 years ago

Hi John, my laptop has 16GB RAM and this is the output of free command:

$ free total used free shared buff/cache available Mem: 16324572 3241124 4887944 329360 8195504 12286772 Swap: 8191996 1804 8190192

Running mean28x8 I have the following error:

$ ./mean28x8 Looking for 42-cycle on cuckoo28("",0) with 50% edges Using 536MB bucket memory at 7fd87ad88010, 1x10MB thread memory at 7fd87a30f010, 8-way siphash, and 64 buckets. nonce 0 Illegal instruction (core dumped)

Regards, Marco

tromp commented 6 years ago

dear Marco,

my laptop has 16GB RAM and this is the output of free command:

Illegal instruction (core dumped)

Oh, in that case you have an older CPU with no avx2 support. So you cannot run the x8 executables. Try the x1 versions, e.g. make demo30x1

regards, -John

ghost commented 6 years ago

ok thanks. I wrote you an email regarding a project that I'm developing. Regards, Marco