Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: mikaelh on July 19, 2013, 02:50:16 PM



Title: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 02:50:16 PM
Here are some Linux compiling instructions for my high performance version of Primecoin. There are plenty of other guides out there but none of them seem to address all the issues. Now I'm writing my own guide. This should be the definitive guide on how to compile Primecoin on Linux. Commands need to be entered exactly as they appear, so copy and pasting is recommended.

Link to the main high performance thread:
https://bitcointalk.org/index.php?topic=255782.0

Another guide written by eCoinomist is available here:
http://ecoinomist.com/xpm-primecoin-mining-guide-on-linux

Please note that if you are new to Linux, it's best to stick with one guide. Mixing the instructions from different guides may produce errors later.

Tested with the following Linux distributions:
 - Ubuntu 13.04
 - CentOS 6.4

Step 1. Installing the required dependencies

Using apt-get with latest Ubuntu 13.04:
Code:
sudo apt-get install -y build-essential m4 libssl-dev libdb++-dev libboost-all-dev libminiupnpc-dev

The 'sudo' command requires you to type the password for the current user. If you don't have sudo working, you need to manually switch to root with 'su' before running those commands.

Warning: If you have installed a specific version such as libdb5.3++-dev before, then don't install the meta-package libdb++-dev which may pull a different version.

Alternative for CentOS users:
Code:
su -c 'yum install gcc-c++ m4 openssl-devel db4-devel boost-devel'

Step 2. Compiling GMP

Latest version supports all the new CPUs.

Code:
cd
rm -rf gmp-5.1.2.tar.bz2 gmp-5.1.2
wget http://mirrors.kernel.org/gnu/gmp/gmp-5.1.2.tar.bz2
tar xjvf gmp-5.1.2.tar.bz2
cd gmp-5.1.2
./configure --enable-cxx
make
sudo make install

The configure script will attempt to automatically detect the host CPU and enable the best optimizations for it.

Step 2b. Compiling OpenSSL (for CentOS and Fedora users)

This step is only required if you're using CentOS. Red Hat has removed support for elliptic curve cryptography from the OpenSSL it supplies.

Code:
cd
rm -rf openssl-1.0.1e.tar.gz openssl-1.0.1e
wget ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/openssl-1.0.1e.tar.gz
tar xzvf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config shared --prefix=/usr/local --libdir=lib
make
sudo make install

Step 2c. Compiling miniupnpc (for CentOS users)

Code:
cd
rm -rf miniupnpc-1.6.20120509.tar.gz
wget http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.20120509.tar.gz
tar xzvf miniupnpc-1.6.20120509.tar.gz
cd miniupnpc-1.6.20120509
make
sudo INSTALLPREFIX=/usr/local make install

Step 3. Compiling primecoind

Code:
cd
rm -rf primecoin-0.1.2-hp12.tar.bz2 primecoin-0.1.2-hp12
wget http://sourceforge.net/projects/primecoin-hp/files/0.1.2-hp12/primecoin-0.1.2-hp12.tar.bz2/download -O primecoin-0.1.2-hp12.tar.bz2
tar xjvf primecoin-0.1.2-hp12.tar.bz2
cd primecoin-0.1.2-hp12/src
cp makefile.unix makefile.my
sed -i -e 's/$(OPENSSL_INCLUDE_PATH))/$(OPENSSL_INCLUDE_PATH) \/usr\/local\/include)/' makefile.my
sed -i -e 's/$(OPENSSL_LIB_PATH))/$(OPENSSL_LIB_PATH) \/usr\/local\/lib)/' makefile.my
sed -i -e 's/$(LDHARDENING) $(LDFLAGS)/$(LDHARDENING) -Wl,-rpath,\/usr\/local\/lib $(LDFLAGS)/' makefile.my
make -f makefile.my
strip primecoind
sudo cp -f primecoind /usr/local/bin/

The last line will install the primecoind binary to /usr/local/bin.

CentOS users: Use the following 'make' command instead:
Code:
make -f makefile.my BOOST_LIB_SUFFIX=-mt

Step 4. Configuration

Create a configuration file:

Code:
cd
mkdir -p .primecoin
echo 'server=1
gen=1
rpcallowip=127.0.0.1
rpcuser=primecoinrpc
rpcpassword=SOME_SECURE_PASSWORD
sievesize=1000000' > .primecoin/primecoin.conf
sed -i -e "s/SOME_SECURE_PASSWORD/`< /dev/urandom tr -cd '[:alnum:]' | head -c32`/" .primecoin/primecoin.conf

You may optinally customize the configuration file. The last line puts a random password in the configuration file automatically, so you don't need to change anything if you're only sending RPC commands from localhost.

Type these commands to create an auto-restart script:

Code:
cd
echo '#!/bin/bash
export PATH="/usr/local/bin:$PATH"
killall --older-than 10s -q run-primecoind primecoind
function background_loop
        while :; do
                primecoind >/dev/null 2>&1
                sleep 1
        done
background_loop &' > run-primecoind
chmod +x run-primecoind

CentOS users may want to remove the 'killall' command from this script because the version that comes with CentOS does not support the --older-than option.

And for convenience, create a stopping script:

Code:
cd
echo '#!/bin/bash
killall -q run-primecoind
primecoind stop' > stop-primecoind
chmod +x stop-primecoind

Step 5. Starting mining

Simply type the following to start mining:
Code:
./run-primecoind

It will take a while for it to sync up with the network. The script will continue running in the background, automatically restarting primecoind if it crashes.

Step 6. Monitoring the progress

Checking that the primecoind process is runnning:
Code:
ps xuf |grep primecoind

RPC commands can be sent to the daemon like this:
Code:
primecoind getprimespersec
primecoind listtransactions
primecoind getinfo
primecoind getmininginfo
primecoind getdifficulty

Any combination of these can be used with the 'watch' command like this:
Code:
watch 'primecoind getinfo && primecoind listtransactions'

Press Ctrl + C to terminate the watch command.

You can also look at the output in debug.log:
Code:
grep primemeter ~/.primecoin/debug.log

If you want to see those in real-time, try this:
Code:
tail -f ~/.primecoin/debug.log |grep primemeter

Step 7. Stopping mining

Run the stop script:
Code:
./stop-primecoind


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: bidji29 on July 19, 2013, 03:08:58 PM
Thanks a lot !

You kept the 1M sievesize? I thought the 2M was better


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 03:13:45 PM
Thanks a lot !

You kept the 1M sievesize? I thought the 2M was better

It's there so that people can change it if they want.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 19, 2013, 03:16:21 PM
Thanks for a complete guide!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: DigitalMan on July 19, 2013, 03:16:34 PM
Is linux better for mining or should i keep my system on Windows 7?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 03:19:38 PM
Is linux better for mining or should i keep my system on Windows 7?

I think at least my 64-bit Windows build should be nearly as fast for all practical purposes.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: cryptohunter on July 19, 2013, 03:21:54 PM
please can you make one for centos, i tried for 20 hours to get centos to work and i could not. thanks :)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 03:28:57 PM
Updated the guide a bit to add -march=native to CXXFLAGS. If you already used the guide, you only need to do step 3 again to optimize for host CPU.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 19, 2013, 03:57:55 PM
Updated the guide a bit to add -march=native to CXXFLAGS. If you already used the guide, you only need to do step 3 again to optimize for host CPU.

Awesome, have sent you 13 XPM to thank for this guide. I will donate a lot more later on ;)
Transaction ID: e9e80fd0deab2878d2918e98d28291a04475044f6a64d35e0d95b5f1d8cc856b-000


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: cryptohunter on July 19, 2013, 04:00:42 PM
Updated the guide a bit to add -march=native to CXXFLAGS. If you already used the guide, you only need to do step 3 again to optimize for host CPU.

1. can you modify these commands for Centos 6.3 64bit because most servers run this OS.

2. when you say create a bash script

cd
echo '#!/bin/bash
killall --older-than 10s -q run-primecoind primecoind
function background_loop
        while :; do
                primecoind >/dev/null 2>&1
                sleep 1
        done
background_loop &' > run-primecoind
chmod +x run-primecoind


do i type these commands into putty or do i put that all in a text file, call it something, upload to the server and then somehow run this?

thanks


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: gateway on July 19, 2013, 04:02:35 PM
Do you recommend compiling gmp? Is their a list of supported CPUs ?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: blastbob on July 19, 2013, 04:05:06 PM
Sent you a 1BTC for good community work!

bca82b59aa139da4bdb1127257431f282fd924b540a0566d9adfe3eb0af3bc76


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 04:05:57 PM
1. can you modify these commands for Centos 6.3 64bit because most servers run this OS.

I think you only need to pull different dependencies but I'm going to check that.

2. when you say create a bash script

cd
echo '#!/bin/bash
killall --older-than 10s -q run-primecoind primecoind
function background_loop
        while :; do
                primecoind >/dev/null 2>&1
                sleep 1
        done
background_loop &' > run-primecoind
chmod +x run-primecoind


do i type these commands into putty or do i put that all in a text file, call it something, upload to the server and then somehow run this?

thanks

Those are the commands you should copy and paste into PuTTY.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 19, 2013, 04:11:19 PM
Woudn't it be better to:
Code:
cd ~
After step 2?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 04:14:35 PM
Woudn't it be better to:
Code:
cd ~
After step 2?

I added 'cd' to the start of steps 2 and 3 just to be safe.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 04:59:41 PM
1. can you modify these commands for Centos 6.3 64bit because most servers run this OS.

Ok, I tried compiling on CentOS, and I ran into some issues with OpenSSL. Apparently Red Hat went and removed support for elliptic curve cryptography...


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Moebius327 on July 19, 2013, 05:42:44 PM
Thanks a lot !

You kept the 1M sievesize? I thought the 2M was better

Has someone made a comparison on testnet? Thanks.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: gateway on July 19, 2013, 05:44:55 PM
ran this guide on one of my new ubuntu 12.x servers and when running the command to start it i get these errors

gateway@a:~/work$ ./run-primecoind: line 1: 14844 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14847 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14850 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14853 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14856 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: cryptohunter on July 19, 2013, 05:46:12 PM
1. can you modify these commands for Centos 6.3 64bit because most servers run this OS.

Ok, I tried compiling on CentOS, and I ran into some issues with OpenSSL. Apparently Red Hat went and removed support for elliptic curve cryptography...

Hello,

Ok, thanks very much for trying to help. That is not good news, bloody red hat :)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 05:51:18 PM
ran this guide on one of my new ubuntu 12.x servers and when running the command to start it i get these errors

gateway@a:~/work$ ./run-primecoind: line 1: 14844 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14847 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14850 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14853 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14856 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1

You can type killall run-primecoind to kill the script if you haven't already.

GCC is misdetecting your CPU and compiling wrong set of instructions into the binary. I removed the -march=native compiler flag from the instructions. I guess I'll have to leave it out if it's causing too many problems.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: gateway on July 19, 2013, 06:09:53 PM
ran this guide on one of my new ubuntu 12.x servers and when running the command to start it i get these errors

gateway@a:~/work$ ./run-primecoind: line 1: 14844 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14847 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14850 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14853 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14856 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1

You can type killall run-primecoind to kill the script if you haven't already.

GCC is misdetecting your CPU and compiling wrong set of instructions into the binary. I removed the -march=native compiler flag from the instructions. I guess I'll have to leave it out if it's causing too many problems.

Ok ill try again, this is my cpu's

processor       : 4
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping        : 7
microcode       : 0x70d
cpu MHz         : 2600.072
cache size      : 20480 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 10
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes hypervisor lahf_lm ida arat epb pln pts dtherm
bogomips        : 5200.14
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Entz on July 19, 2013, 06:11:31 PM
Good guide. Always best to compile your own, Once you learn how it empowers you for the future (especially on windows)

I have been using mpir (natively compiled) instead of libgmp on both windows and linux. The PPS is higher than the pre-compiled libgmp (~5%, varies), not sure how it will stack up against the natively compiled libgmp (I would expect similar)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 06:19:49 PM
I managed to compile Primecoin on CentOS 6.4. I added some extra steps and notes to the guide.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: gateway on July 19, 2013, 06:28:13 PM
ran this guide on one of my new ubuntu 12.x servers and when running the command to start it i get these errors

gateway@a:~/work$ ./run-primecoind: line 1: 14844 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14847 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14850 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14853 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14856 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1

You can type killall run-primecoind to kill the script if you haven't already.

GCC is misdetecting your CPU and compiling wrong set of instructions into the binary. I removed the -march=native compiler flag from the instructions. I guess I'll have to leave it out if it's causing too many problems.

ok great that worked, but seems slower than yesterday.. cheers for your work

btw those you want something better than ps command install htop

sudo apt-get install htop

then run it..



Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: bidji29 on July 19, 2013, 07:02:04 PM
ran this guide on one of my new ubuntu 12.x servers and when running the command to start it i get these errors

gateway@a:~/work$ ./run-primecoind: line 1: 14844 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14847 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14850 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14853 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14856 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1

You can type killall run-primecoind to kill the script if you haven't already.

GCC is misdetecting your CPU and compiling wrong set of instructions into the binary. I removed the -march=native compiler flag from the instructions. I guess I'll have to leave it out if it's causing too many problems.

I get the same error.
But the process is still active, and show the same amount of pps.
It's bad if i let run like that?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: gateway on July 19, 2013, 07:59:13 PM
ran this guide on one of my new ubuntu 12.x servers and when running the command to start it i get these errors

gateway@a:~/work$ ./run-primecoind: line 1: 14844 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14847 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14850 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14853 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1
./run-primecoind: line 1: 14856 Illegal instruction     (core dumped) primecoind > /dev/null 2>&1

You can type killall run-primecoind to kill the script if you haven't already.

GCC is misdetecting your CPU and compiling wrong set of instructions into the binary. I removed the -march=native compiler flag from the instructions. I guess I'll have to leave it out if it's causing too many problems.

I get the same error.
But the process is still active, and show the same amount of pps.
It's bad if i let run like that?

re go though the steps, if you did this earlier a change was made to remove something that might cause this, the error should go away then



Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 19, 2013, 08:19:22 PM
mikaelh, can you provide the same steps for UBU 12.04 LTS?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: dego on July 19, 2013, 08:23:10 PM
mikaelh, can you provide the same steps for UBU 12.04 LTS?

Did you at least try it with exactly the same steps? Ubu13 is not that different from Ubu12..


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 09:35:53 PM
sudo make install
command gets me this...  is this normal?

Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 gmp.h '/usr/local/include'
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 gmpxx.h '/usr/local/include'
make  install-data-hook
make[4]: Entering directory `/root/gmp-5.1.2'

+-------------------------------------------------------------+
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so.                                        |
|                                                             |
| GMP has been carefully tested by its authors, but compilers |
| are all too often released with serious bugs.  GMP tends to |
| explore interesting corners in compilers and has hit bugs   |
| on quite a few occasions.                                   |
|                                                             |
+-------------------------------------------------------------+


make[4]: Leaving directory `/root/gmp-5.1.2'
make[3]: Leaving directory `/root/gmp-5.1.2'
make[2]: Leaving directory `/root/gmp-5.1.2'
make[1]: Leaving directory `/root/gmp-5.1.2'


Looks perfectly normal.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 19, 2013, 09:42:48 PM
Also, I am getting a blank screen when I run the RPC commands:

root@nc-ph-0105-03:~# primecoind getprimespersec

doesn't go back to # I have to use CTRL + C

and when I use the command line to watch, its blank.

Note: I am using ubu 12.04


or even when I do this. Run is fine, it goes to the next command line, but ./stop-primecoind goes to a blank section

root@nc-ph-0105-03:~# ./run-primecoind
root@nc-ph-0105-03:~# ./stop-primecoind

Solved: killall -9 primecoind
then redo it. thanks mikaelh


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: gateway on July 19, 2013, 10:08:10 PM
mikaelh, can you provide the same steps for UBU 12.04 LTS?

I used the steps on my ubuntu server 12.0x


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 19, 2013, 10:45:16 PM
Having trouble compiling primecoind...I get the following:

make: *** [bitcoinrpc.o] Error 4

It's a vps, 512mb ram, and 1gb swap, fresh boot. Ubuntu 12.10
I could compile it with ecoinomist's guide previously, but this one won't budge.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 10:49:42 PM
Having trouble compiling primecoind...I get the following:

make: *** [bitcoinrpc.o] Error 4

It's a vps, 512mb ram, and 1gb swap, fresh boot. Ubuntu 12.10
I could compile it with ecoinomist's guide previously, but this one won't budge.

What's the full error message before that?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 19, 2013, 11:02:17 PM
Having trouble compiling primecoind...I get the following:

make: *** [bitcoinrpc.o] Error 4

It's a vps, 512mb ram, and 1gb swap, fresh boot. Ubuntu 12.10
I could compile it with ecoinomist's guide previously, but this one won't budge.
Updated the guide, it also works with hp5 version.
http://ecoinomist.com/xpm-primecoin-mining-guide-on-linux


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 19, 2013, 11:03:10 PM
Having trouble compiling primecoind...I get the following:

make: *** [bitcoinrpc.o] Error 4

It's a vps, 512mb ram, and 1gb swap, fresh boot. Ubuntu 12.10
I could compile it with ecoinomist's guide previously, but this one won't budge.

What's the full error message before that?

Can't copy from tightvnc (couldn't manage to use putty with this vps provider) -I did type the commands 100% right though-

http://img9.imageshack.us/img9/8161/b4v4.jpg

In the other server, which is running hp5, compiled using ecoinomist's guide, I get constant crashes. The program either closes itself, and after a few hours I get an error and I have to reboot to be able to mine again.
Don't have the error message atm, I'll post it later.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 19, 2013, 11:29:39 PM
Well, it certainly looks like an out of memory issue. Not sure how that's possible with a swap file. And yes, there are still bugs causing random crashes. They were present in Sunny King's original release and I haven't had the time to iron them out.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: nabworth on July 19, 2013, 11:43:29 PM
on the first step, I am getting this :
The following packages have unmet dependencies:
 libminiupnpc-dev : Depends: libminiupnpc8 (= 1.6-3ubuntu1) but 1.6-precise2 is to be installed

I guess i already have libminiupnpc8 installed but just the wrong version? someone know what i need to do to correct it ?

thanks in advance


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 19, 2013, 11:48:23 PM
Well, it certainly looks like an out of memory issue. Not sure how that's possible with a swap file. And yes, there are still bugs causing random crashes. They were present in Sunny King's original release and I haven't had the time to iron them out.

I'll keep trying, had the same kind of problems with the other methods I tried, and eventually I managed to compile succesfully.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: nabworth on July 19, 2013, 11:59:59 PM
Here's what I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
libssl-dev is already the newest version.
libboost-all-dev is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libdb++-dev : Depends: libdb5.1++-dev (>= 5.1.25-2~) but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.

How do I fix this? o.O


libdb++-dev  without a version number assumes version 5.1 but if you're on ubuntu 13.10 , you'll want version 5.3  so just change libdb++-dev to libdb5.3++-dev and you're golden


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Entz on July 20, 2013, 12:00:23 AM
I'll keep trying, had the same kind of problems with the other methods I tried, and eventually I managed to compile succesfully.
1GB swap is likely not enough, try moving to 2GB (just add another swap file) . From what I understand the optimize flag -O2 can easily eat up 2GB of free ram by itself.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 20, 2013, 12:00:27 AM
I've gotten that before, I reinstalled ubuntu after panicking lol


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 20, 2013, 12:01:55 AM
I'll keep trying, had the same kind of problems with the other methods I tried, and eventually I managed to compile succesfully.
1GB swap is likely not enough, try moving to 2GB (just add another swap file) . From what I understand the optimize flag -O2 can easily eat up 2GB of free ram by itself.

Thanks! I'mma try right away.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 20, 2013, 01:14:41 AM
Well, it certainly looks like an out of memory issue. Not sure how that's possible with a swap file. And yes, there are still bugs causing random crashes. They were present in Sunny King's original release and I haven't had the time to iron them out.

I'll keep trying, had the same kind of problems with the other methods I tried, and eventually I managed to compile succesfully.

Same thing, even with 2gb of swap. :/
Gonna revert to ecoinomist's method if I can't get this to run.
More than 512mb ram is prohibitive, costs wise...how much better is this method mikaelh?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: LlamaMaster on July 20, 2013, 02:18:47 AM
Is there any way to set the sievesize parameter for the windows client?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 20, 2013, 03:15:30 AM
Is there any way to set the sievesize parameter for the windows client?

Create a conf file, add a line that reads: sievesize=x (replace x by 1000000 or 2000000, or whatever)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 20, 2013, 05:12:43 AM
Ok, I'm not sure if this is just luck or not, but my simple linux XPM compiling (http://ecoinomist.com/xpm-primecoin-mining-guide-on-linux) using the same HP5 client seems to yield a lot more blocks:
http://ecoinomist.com/images/ecoinomist-hp5-build.png

VS. this compilation guide (exact spec and number of machines as above, only compiled differently):

http://ecoinomist.com/images/hp5-mikaelh-build.png


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 20, 2013, 06:39:10 AM
Attempting with it, but no success thus far. Here is my errors:

EDIT: This was mainly a RAM issue. Since primecoin doesn't need a lot of ram, except only when compiling the make.
I was using 512 MB to lower my cost, but 1024MB would do... or Solution B) setup a SWAP file, you can ask me how and I will help you.

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make: *** [obj/alert.o] Error 4

This happens during the make file .unix any thoughts?  

and... I did try swap - Here is my error:

root@:~/primecoin/src# sudo dd if=/dev/zero of=/swapfile bs=64M count=16
dd: opening â/swapfileâ: Text file busy

root@:~/primecoin/src# sudo mkswap /swapfile
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=9f78b9b8-39b1-4087-9d56-77cefc172fa8

root@:~/primecoin/src# sudo swapon /swapfile
swapon: /swapfile: swapon failed: Device or resource busy


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 20, 2013, 06:48:17 AM
@eCoinomist

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make: *** [obj/alert.o] Error 4

This happens during the make file .unix any thoughts?

Lacking ram, try a swap file...

I'm getting this after running the daemon: ivanlabrie@ivanlabrie2:~$ primecoind --daemon
ivanlabrie@ivanlabrie2:~$ Primecoin server starting
: Error opening block database.
Do you want to rebuild the block database now?

What's wrong?
Used ecoinomist's guide, and the auto restart script as well...I think I should reinstall ubuntu and start from scratch.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 07:06:30 AM
@mikaelh

How do I know the custom gmp for my CPU is working as it should be if I've already installed primecoind? Thanks.  :)

Assuming that you have 'lsof' installed and that primecoind is running, you can type:
Code:
lsof -n |grep libgmp.so

And then check that the library path says /usr/local/lib/libgmp.so.10.

Another alternative that doesn't require running primecoind:
Code:
ldd /usr/local/bin/primecoind |grep libgmp.so


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 07:08:30 AM
When I type: ./configure --enable-cxx

I get this error:


checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin
 (see config.log for reasons).


Am I missing something?

Install the 'm4' package that's required to compile libgmp.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 07:17:45 AM
@eCoinomist

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make: *** [obj/alert.o] Error 4

This happens during the make file .unix any thoughts?

Lacking ram, try a swap file...

I'm getting this after running the daemon: ivanlabrie@ivanlabrie2:~$ primecoind --daemon
ivanlabrie@ivanlabrie2:~$ Primecoin server starting
: Error opening block database.
Do you want to rebuild the block database now?

What's wrong?
Used ecoinomist's guide, and the auto restart script as well...I think I should reinstall ubuntu and start from scratch.

I think you somehow managed to link against a different version of Berkeley DB. It's probably an older library not understanding a newer database format.

You can try removing a specific version of libdb:
Code:
apt-get remove libdb5.1 libdb5.1++ libdb5.1++-dev libdb5.1-dev

And then recompile.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 07:19:18 AM
# apt-get install build-essential libssl-dev libboost-all-dev libdb5.3++-dev -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libdb5.3++-dev
E: Couldn't find any package by regex 'libdb5.3++-dev

Any fixes for this?

Older versions of Ubuntu may not provide libdb5.3++-dev.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: relm9 on July 20, 2013, 07:41:01 AM
I'm getting this immediately on startup

Quote
************************
EXCEPTION: N5boost21thread_resource_errorE
boost::thread_resource_error
primecoin in AppInit(

Any ideas? Running CentOS here. Bitcoin and Litecoin run fine on the same machine. RAM shouldn't be an issue - have 64GB. The weird thing is it ran fine once - had it going for 3 days straight. I restarted the process today and now getting that error. I tried clearing the ~/.primecoin folder as well.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 07:47:39 AM
I'm getting this immediately on startup

Quote
************************
EXCEPTION: N5boost21thread_resource_errorE
boost::thread_resource_error
primecoin in AppInit(

Any ideas? Running CentOS here. Bitcoin and Litecoin run fine on the same machine. RAM shouldn't be an issue - have 64GB. The weird thing is it ran fine once - had it going for 3 days straight. I restarted the process today and now getting that error. I tried clearing the ~/.primecoin folder as well.

Never seen that one before. Is that the only error you're getting?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 20, 2013, 07:50:29 AM
sudo apt-get remove libdb5.1 libdb5.1++ libdb5.1++-dev libdb5.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libdb5.1++' is not installed, so not removed
Package 'libdb5.1++-dev' is not installed, so not removed
Package 'libdb5.1-dev' is not installed, so not removed

Seems like that's not the case...512mb ram, 1.1gb swap.
Does hdd encryption mess with this?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: relm9 on July 20, 2013, 07:51:11 AM
I'm getting this immediately on startup

Quote
************************
EXCEPTION: N5boost21thread_resource_errorE
boost::thread_resource_error
primecoin in AppInit(

Any ideas? Running CentOS here. Bitcoin and Litecoin run fine on the same machine. RAM shouldn't be an issue - have 64GB. The weird thing is it ran fine once - had it going for 3 days straight. I restarted the process today and now getting that error. I tried clearing the ~/.primecoin folder as well.

Never seen that one before. Is that the only error you're getting?

Yup. It's really strange :\ I did a recompile with the latest version just now and still getting it.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: tonyback on July 20, 2013, 07:51:33 AM
Thank you for this guide


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 08:21:36 AM
sudo apt-get remove libdb5.1 libdb5.1++ libdb5.1++-dev libdb5.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libdb5.1++' is not installed, so not removed
Package 'libdb5.1++-dev' is not installed, so not removed
Package 'libdb5.1-dev' is not installed, so not removed

Seems like that's not the case...512mb ram, 1.1gb swap.
Does hdd encryption mess with this?

No, HDD encryption should not mess with this (even if you have it enabled). In general there are two common cases for block database errors:
1) Incompatible database format
2) Corrupted database

In the second case you can try removing database files from the .primecoin folder. Remove all files except primecoin.conf, wallet.dat and maybe peers.dat.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 20, 2013, 08:36:10 AM
Anyone having problems with my guide, just reinstall the whole Ubuntu 13.04 OS from fresh start. The guide is designed to work perfectly on fresh install of any Ubuntu 13.04. Even if you get client crash, it will be restarted automatically with cron job every minute, so downtime is really minimal.

If you get error on make file compiling, it's likely due to lack of RAM and you need to run the swap command.

If for whatever reason you can't get fresh Ubuntu install, run these before following my guide:
Code:
cd
rm -rf gmp-5.1.2.tar.bz2 gmp-5.1.2
rm -rf primecoin-0.1.1-hp5.tar.bz2 primecoin-0.1.1-hp5 primecoin
sudo apt-get remove python-software-properties screen python-rrdtool python-pygame python-scipy python-twisted python-twisted-web python-imaging build-essential libglib2.0-dev libglibmm-2.4-dev python-dev autoconf automake ncurses-dev sysstat gcc-mingw32 libmysql++-dev cloog-ppl build-essential automake gcc libevent-dev libmemcached-dev libcurl4-openssl-dev zlib1g-dev libjansson-dev curl memcached libtool unzip freeglut3-dev libxi-dev libxmu-dev build-essential freeglut3-dev libxi-dev libxmu-dev mpich2 libdb-dev libminiupnpc-dev libboost-all-dev libdb++-dev git uthash* libgmp3-dev
sudo apt-get remove -y build-essential m4 libssl-dev libdb++-dev libboost-all-dev libminiupnpc-dev
sudo apt-get remove build-essential libssl-dev libboost-all-dev libdb5.3++-dev -y
sudo apt-get remove libgmp-dev

The screenshots of block finding on my site are from actual DO droplets ($5 and $20 ones - they have never crashed so far for me, been running for nearly a week now, and upgrading from hp2, hp3, hp4 to hp5 without OS resinstall).

Note: you must run everything exactly as my guide, if you change OS to something I haven't tested and I'm just a Linux newbie, so can't help much with other compiling problems on CentOS, etc.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 20, 2013, 08:47:38 AM
Thanks guys...
I'm starting over.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: dudeofthestick on July 20, 2013, 09:21:51 AM
Can I use a headless 13.04 ubuntu server version? I'm considering running it in an idle platform that uses Ubuntu cloud images


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 09:23:06 AM
Can I use a headless 13.04 ubuntu server version? I'm considering running it in an idle platform that uses Ubuntu cloud images

Headless should be fine.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 20, 2013, 09:46:10 AM
Thanks guys...
I'm starting over.

I may have found your problem as it was a problem of mine too.

The make file was killing me and my swap wasn't working

so I did the following

sudo swapoff /swapfile
sudo rm /swapfile

then tried these commands:

sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile

then went into
make -f makefile.unix USE_UPNP=-


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: dudeofthestick on July 20, 2013, 10:37:57 AM
I have access to big clusters of virtual servers running on KVM. Clearly the more cores the better, but what about memory, disk, swap and so on?

Thank you very much, the information in this thread is awesome!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Moebius327 on July 20, 2013, 11:42:18 AM
Thanks for this new release. I just found one block.

I am getting only around 8-9 connections compared to 20-25 with hp2. Is there going to be a problem if I don't add nodes manually?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 20, 2013, 01:34:29 PM
I have access to big clusters of virtual servers running on KVM. Clearly the more cores the better, but what about memory, disk, swap and so on?

Thank you very much, the information in this thread is awesome!

Memory requirements:
0.5 GB is enough to run the client currently
Each mining thread probably needs a few megabytes
Memory requirements will increase a bit once the blockchain gets longer

Disk:
Few hundred megabytes for Linux base system and libraries
Few megabytes for the binary
63 MB for the blockchain currently


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: relm9 on July 20, 2013, 07:57:11 PM
Finally fixed my issue. I had to increase the virtual memory ulimit for some reason.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: rethaw on July 20, 2013, 08:00:01 PM
Has anyone shown increased performance using the locally compiled libgmp?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: relm9 on July 20, 2013, 08:48:49 PM
Has anyone shown increased performance using the locally compiled libgmp?

Using newer libgmp made a difference here, but the one on my server was rather outdated. 4.3.1 I get 3k PPS, with 5.1.2 8k PPS - dual E5-2620


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: LlamaMaster on July 20, 2013, 08:53:00 PM
Is there any way to set the sievesize parameter for the windows client?

Create a conf file, add a line that reads: sievesize=x (replace x by 1000000 or 2000000, or whatever)
I created a primecoin.conf with notepad and pasted that sievesize line in it, but I can't figure out how I am supposed to tell if it's working.  I tried putting the file in several different directories (including the one in appdata), but I didn't see any difference when I ran the client.  

Also, is there any logic behind choosing between a 1M and 2M sievesize at this point, or is it just speculation?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 21, 2013, 03:26:29 AM
Does anyone know how to delete the transaction id off the screen after you've already exported immature block to main wallet?

and what does genproclimit=-1 do?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 21, 2013, 03:49:09 AM
Does anyone know how to delete the transaction id off the screen after you've already exported immature block to main wallet?

and what does genproclimit=-1 do?

genproclimit defines the amount of cpu cores used to mine. -1 = all

Hit control + c or pause key


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: rethaw on July 21, 2013, 05:47:37 AM
Does anyone know how to delete the transaction id off the screen after you've already exported immature block to main wallet?

and what does genproclimit=-1 do?

Hey maco, remove the wallet.dat to get a new set of keys.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 21, 2013, 05:49:19 AM
Does anyone know how to delete the transaction id off the screen after you've already exported immature block to main wallet?

and what does genproclimit=-1 do?

Hey maco, remove the wallet.dat to get a new set of keys.

Oh, my lack of sleep made me misunderstand that xD


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: dudeofthestick on July 21, 2013, 09:17:29 AM
Ok. I have my VM up, running and mining in my Cloud.

Now I want to launch several instances of a snapshot of this VM. Before launching, I should delete the wallet.dat, to start from scratch on each mining node.

But what would happen if I try to mine using the same the old wallet.dat file in all my servers? All mined coins will be assigned to the same address?

Thanks again!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: dudeofthestick on July 21, 2013, 09:46:20 AM
Actually my company bundles OpenStack as a product for Hosters and Services Providers. OpenStack Nova supports snapshotting/cloning by default. Sadly, most companies disable this feature as a vendor-locking strategy. We don't.

We have our own cloud for testing, and one of the applications we run to stress test the cloud is... Mining. Obviously we normally connect to a pool of btc or ltc, something it's too early for xpm.

What I can tell you is most of the cloud providers don't want to host applications like mining rigs because they put all virtual CPUs at %100 for long periods of time. Since they oversubscribe the CPUs a lot, it means that less intensive apps hosted in the same server will have the performance severely affected.

Heavy users are not welcomed in the Clouds. Just like body builders are not welcomed in a gym ;-)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 21, 2013, 11:42:29 AM
This is killing me...  i can't shut down primecoind, its always running, and has incorrect rpcuser and password. It doesn't let me edit or attempt to shut down using pkill, primecoind stop.

cd
echo '#!/bin/bash
killall --older-than 10s -q run-primecoind primecoind
function background_loop
        while :; do
                primecoind >/dev/null 2>&1
                sleep 1
        done
background_loop &' > run-primecoind
chmod +x run-primecoind


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 21, 2013, 11:44:55 AM
This is killing me...  i can't shut down primecoind, its always running, and has incorrect rpcuser and password. It doesn't let me edit or attempt to shut down using pkill, primecoind stop.

cd
echo '#!/bin/bash
killall --older-than 10s -q run-primecoind primecoind
function background_loop
        while :; do
                primecoind >/dev/null 2>&1
                sleep 1
        done
background_loop &' > run-primecoind
chmod +x run-primecoind

You need to kill the auto-restart script first (that's what my stop script does).
Code:
killall run-primecoind


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: bidji29 on July 21, 2013, 06:51:01 PM
If i want to install HP6 on HP5, i just need to do the Step 3, right?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 21, 2013, 06:59:56 PM
If i want to install HP6 on HP5, i just need to do the Step 3, right?

I downloaded the hp6 binaries for linux, did the tar xvjf command, cd into the bin/64 dir and do a sudo cp -f primecoind /usr/local/bin/
That replaces the old primecoind program.
I use the original run-primecoind script I created and erased the hp6 folder...all good.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 21, 2013, 07:28:08 PM
@mikaelh, it seems to be crashing a lot with HP6:
Code:
primecoind: checkqueue.h:171: CCheckQueueControl<T>::CCheckQueueControl(CCheckQueue<T>*) [with T = CScriptCheck]: Assertion `pqueue->nTotal == pqueue->nIdle' failed.

I get a crash on 70% of machines in 5 minutes gap (16cores).

Though I did not use your Linux compliation, (used my own, since it worked better for me).

Do I need to install it your way for HP6 to work? Or perhaps Reboot?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eCoinomist on July 21, 2013, 07:33:42 PM
I do notice ~15% increase in PPS from 8.3k to 9.5k pps, and chain/hr seems to average 20, just found a block,


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Tamis on July 21, 2013, 10:12:31 PM
I did manage to make hp6 running with your already compiled files.
It runs fine but I do not see any wallet.dat anywhere ! I'm afraid there is none...
My primecoin directory has a /bin/64 folder with primecoind and primecoin-qt, I did not run primecoin-qt is this the reason ?

edit : ok I found it, all is well.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 21, 2013, 10:22:51 PM
@mikaelh, it seems to be crashing a lot with HP6:
Code:
primecoind: checkqueue.h:171: CCheckQueueControl<T>::CCheckQueueControl(CCheckQueue<T>*) [with T = CScriptCheck]: Assertion `pqueue->nTotal == pqueue->nIdle' failed.

I get a crash on 70% of machines in 5 minutes gap (16cores).

Though I did not use your Linux compliation, (used my own, since it worked better for me).

Do I need to install it your way for HP6 to work? Or perhaps Reboot?

No, that just means the bug isn't fixed. I'll look at it again tomorrow.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 21, 2013, 10:47:20 PM
Still no solution for this... Swap doesn't work for me. It's restricted by host.
I got up all the way to the make -f makefile.unix   and this is what I get:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [obj/alert.o] Error 4


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Entz on July 21, 2013, 11:30:40 PM
If you cannot increase your swap. Edit makefile.unix and remove -O2 from the xCXXFLAGS (line 108)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eule on July 21, 2013, 11:34:54 PM
Or compile on a machine that has enough RAM (like a VM on your Windows PC).


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 21, 2013, 11:38:19 PM
If you cannot increase your swap. Edit makefile.unix and remove -O2 from the xCXXFLAGS (line 108)

ohh that's why. I'll try that and report back. That sounds about right as I did that a while back and it worked.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eule on July 21, 2013, 11:42:40 PM
Note that this will probably lead to a lower mining performance, don't know by how much though.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 22, 2013, 01:08:50 AM
If you cannot increase your swap. Edit makefile.unix and remove -O2 from the xCXXFLAGS (line 108)

ohh that's why. I'll try that and report back. That sounds about right as I did that a while back and it worked.

can you give me the exact line? I removed -O2 and kept xCXXFLAGS=
and I still get the same error. This is how it looks now. and it wasn't -O2 it was -O3

xCXXFLAGS= -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \




Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Entz on July 22, 2013, 01:45:23 AM
That is the correct line, the key is to have no -O#    (as mentioned above this is likely a bad thing, no optimizations). Not sure why you have -O3

Should be:
xCXXFLAGS=-pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \

Which is what you have. If you are compiling from source you really should have (assuming its not on a vps that hides the cpu info)

xCXXFLAGS=-march=native -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \

How much ram does the machine have?  and you are sure you cannot add swap?  If not then chances are you are going to have to build it on another machine or use the linux pre-compiled binaries listed in the official HP thread (https://bitcointalk.org/index.php?topic=255782.0 -- paying attention to the warning)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 22, 2013, 02:00:43 AM
That is the correct line, the key is to have no -O#    (as mentioned above this is likely a bad thing, no optimizations). Not sure why you have -O3

Should be:
xCXXFLAGS=-pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \

Which is what you have. If you are compiling from source you really should have (assuming its not on a vps that hides the cpu info)

xCXXFLAGS=-march=native -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \

How much ram does the machine have?  and you are sure you cannot add swap?  If not then chances are you are going to have to build it on another machine or use the linux pre-compiled binaries listed in the official HP thread (https://bitcointalk.org/index.php?topic=255782.0 -- paying attention to the warning)

Thanks for the quick reply. Trying this now. You are right! I used Chemsist build before this and i had to change those settings to the one you saw with O3 in order to optimize it and get it t work. Yes, I am sure I cannot use swap because the company has restricted my use of it, even though I expanded to larger ram space. I have 512 MB RAM right now.

Do I need to use make clean? before configuring?

Edit: SOLVED. I upgraded to 1024 MB RAM and got it working just fine. The company doesn't want to give me permission to enable swap so this was an easier fix than I thought. Simply Upgrade, then downgrade if you need to, to save the $2.00 I would just keep it at 1024 MB. It seems more stable now.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Entz on July 22, 2013, 03:56:42 AM
Glad you got it working.

To answer your question, I almost always delete the primecoin source directory and rebuild from scratch when a major release (i.e. HP4 to HP5) is done to avoid having an old files around. I would only do a make clean if you are changing compiler flags imo. In the case of a "killed" gcc you dont want to recompile more than you have to.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 22, 2013, 03:58:32 AM
Glad you got it working.

To answer your question, I almost always delete the primecoin source directory and rebuild from scratch when a major release (i.e. HP4 to HP5) is done to avoid having an old files around. I would only do a make clean if you are changing compiler flags imo. In the case of a "killed" gcc you dont want to recompile more than you have to.

Awesome Thanks! Which directory/source exactly? /.primecoin/ correct?
I think you are right about that because the problem is re-occurring with rpcuser/password. It might have my old settings.
error: incorrect rpcuser or rpcpassword (authorization failed)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Entz on July 22, 2013, 04:17:06 AM
the directory you uncompressed the code into (i.e. the one one with the src folder, bitcoin-qt.pro, INSTALL, COPYING etc) and are compiling from.

Not familiar with that error sorry.

*Never * delete .primecoin as it contains your wallet and conf files.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 22, 2013, 07:21:03 AM
Thanks entz


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: wetroof on July 22, 2013, 11:09:21 AM
nvm..


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eule on July 22, 2013, 11:18:44 AM
For comparison: 7 cores of an i7 930 get ~2100pps on Debianx64. Core2Duo 2.13GHz gets ~600pps on Win7 x64. Interestingly about the same performance per core although the i7 should be a faster. I set the sievesize of the i7 to 4096000 and the C2D to 2048000, not sure if those are good values, in testnet they seemed pretty fine. i7 got no blocks for over a week while the Core2Duo just found one tonight, so it's still got a lot to do with luck.

edit: Great, now you replaced your question with nvm and my post is pretty much useless.  :P


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: adambeazley on July 22, 2013, 06:44:05 PM
Very strange...

I do
./run-primecoind
then
primecoind getmininginfo
error: couldn't connect to server


So i try forceing it to start with
primecoind --daemon
I get
Error: Failed to read block
Error: Failed to Connect best block


any ideas?

It was working before i restarted...


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: cryptohunter on July 23, 2013, 12:40:49 AM
after step 1 i get this??


Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package build-essential
E: Unable to locate package m4
E: Unable to locate package libssl-dev
E: Unable to locate package libdb++-dev
E: Couldn't find any package by regex 'libdb++-dev'
E: Unable to locate package libboost-all-dev
E: Unable to locate package libminiupnpc-dev


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Bitmong on July 23, 2013, 12:52:19 AM
Run:

apt-get update

This will update the package lists, and after that the packages should be installable.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: cryptohunter on July 23, 2013, 01:02:33 AM
thanks for trying to help however after running that command i see this


W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/raring-backports/universe/i18n/Translation-en  Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: leif1981 on July 23, 2013, 01:21:16 AM
Thanks

How to  on Centos 5?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: relm9 on July 23, 2013, 02:32:05 AM
For comparison: 7 cores of an i7 930 get ~2100pps on Debianx64. Core2Duo 2.13GHz gets ~600pps on Win7 x64. Interestingly about the same performance per core although the i7 should be a faster. I set the sievesize of the i7 to 4096000 and the C2D to 2048000, not sure if those are good values, in testnet they seemed pretty fine. i7 got no blocks for over a week while the Core2Duo just found one tonight, so it's still got a lot to do with luck.

edit: Great, now you replaced your question with nvm and my post is pretty much useless.  :P
i7 930 doesn't have 7 cores, it has 4 cores plus 4 HT threads.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: cryptohunter on July 23, 2013, 04:25:03 AM
followed all of this but now the dual xeon l5420 is only getting 8 PPS

what could be wrong with that? should be more like 8000 not 8 right?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: arnuschky on July 23, 2013, 06:38:43 AM
thanks for trying to help however after running that command i see this

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/raring-backports/universe/i18n/Translation-en  Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)

Your network configuration is broken, so you cannot download new packages. Fix it first:
https://help.ubuntu.com/12.04/serverguide/network-configuration.html


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: arnuschky on July 23, 2013, 06:40:31 AM
followed all of this but now the dual xeon l5420 is only getting 8 PPS

what could be wrong with that? should be more like 8000 not 8 right?

Many people are currently reporting very low PPS. There seems to be a problem with the network. Wait for mikaelh to fix it, then redownload & recompile.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eule on July 23, 2013, 07:01:26 AM
i7 930 doesn't have 7 cores, it has 4 cores plus 4 HT threads.
You're right of course, thanks! I use genproclimit 6 or 7 though in Linux or the CPU won't be used fully, that's what made me think 8 cores. My pps went far down too btw, chainspermin is stable. ;D


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: rethaw on July 23, 2013, 09:47:52 AM
If I want to use the new fix you posted here: https://bitbucket.org/mikaelh/primecoin-hp

I am using these directories from the wget HP6 download:  /primecoin/src folder and did sudo mv primecoind /usr/local/bin/.

Do I just git clone the url and sudo mv primecoind /usr/local/bin/.

or how would you go about upgrading it?


Code:
git pull
make -f makefile.unix
primecoind stop
sudo mv /usr/local/bin/primecoind /usr/local/bin/primecoind_723
sudo mv primecoind /usr/local/bin/primecoind
primecoind --daemon


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 23, 2013, 09:51:02 AM
Code:
git pull
make -f makefile.unix
primecoind stop
sudo mv /usr/local/bin/primecoind /usr/local/bin/primecoind_723
sudo mv primecoind /usr/local/bin/primecoind
primecoind --daemon

You are always there when quick help is needed. Thanks!
Do I need make -f makefile.unix clean before hand? and during make -f makefile.unit (should I be at cd ) or cd ~/primecoin/src ?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: rethaw on July 23, 2013, 09:52:55 AM
Code:
git pull
make -f makefile.unix
primecoind stop
sudo mv /usr/local/bin/primecoind /usr/local/bin/primecoind_723
sudo mv primecoind /usr/local/bin/primecoind
primecoind --daemon

You are always there when quick help is needed. Thanks!
Do I need make -f makefile.unix clean before hand? and during make -f makefile.unit (should I be at cd ) or cd ~/primecoin/src ?

You don't need a clean, and yes, in the src directory.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: rethaw on July 23, 2013, 10:04:07 AM
Code:
git pull
make -f makefile.unix
primecoind stop
sudo mv /usr/local/bin/primecoind /usr/local/bin/primecoind_723
sudo mv primecoind /usr/local/bin/primecoind
primecoind --daemon

You are always there when quick help is needed. Thanks!
Do I need make -f makefile.unix clean before hand? and during make -f makefile.unit (should I be at cd ) or cd ~/primecoin/src ?

You don't need a clean, and yes, in the src directory.

I tried with both primecoind running and primecoind stopped but I get the following during make.

/usr/bin/ld: cannot find -lminiupnpc
collect2: ld returned 1 exit status
make: *** [primecoind] Error 1


Code:
make -f makefile.unix USE_UPNP=-


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 23, 2013, 10:10:38 AM
 git pull
fatal: Not a git repository (or any of the parent directories): .git

I tried even using git pull https://bitbucket.org/mikaelh/primecoin-hp.git
and git pull alone

for the make part it compiled too fast and got this error:

make -f makefile.unix USE_UPNP=-
/bin/sh ../share/genbuild.sh obj/build.h
fatal: Not a git repository (or any of the parent directories): .git

wget http://sourceforge.net/projects/primecoin-hp/files/0.1.1-hp6/primecoin-0.1.1-hp6.tar.bz2/download -O primecoin-0.1.1-hp6.tar.bz2
tar xjvf primecoin-0.1.1-hp6.tar.bz2


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: rethaw on July 23, 2013, 10:11:51 AM
git pull
fatal: Not a git repository (or any of the parent directories): .git

I tried even using git pull https://bitbucket.org/mikaelh/primecoin-hp.git
and git pull alone

for the make part it compiled too fast and got this error:

make -f makefile.unix USE_UPNP=-
/bin/sh ../share/genbuild.sh obj/build.h
fatal: Not a git repository (or any of the parent directories): .git


Run git clone in a fresh directory.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: woodrake on July 23, 2013, 07:35:07 PM
Thanks for the comprehensive instructions. :)

I have got a bit stuck though and I'm hoping someone can help. I got HP5 working and am now trying HP7. I am trying under three different distros: Debian 6, Ubuntu 12.4 and Centos 6.

I was getting some failures due to  this bug (https://bbs.archlinux.org/viewtopic.php?pid=1126374), but got around that using the recommended s/TIME_UTC/TIME_UTC_/g.

CentOS

This one fails not finding lib boost I think, but the latest versions are installed:

Code:
# make -f makefile.unix USE_UPNP=-
/bin/sh ../share/genbuild.sh obj/build.h
which: no git in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
g++ -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0.1.1-hp7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoin-0.1.1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -o primecoind leveldb/libleveldb.a obj/alert.o obj/version.o obj/checkpoints.o obj/netbase.o obj/addrman.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/rpcnet.o obj/rpcmining.o obj/rpcwallet.o obj/rpcblockchain.o obj/rpcrawtransaction.o obj/script.o obj/sync.o obj/util.o obj/wallet.o obj/walletdb.o obj/hash.o obj/bloom.o obj/noui.o obj/leveldb.o obj/txdb.o obj/prime.o obj/checkpointsync.o -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/lib  -L/usr/local/lib -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -l gmp -Wl,-Bdynamic -l z -l dl -l pthread /root/primecoin-0.1.1-hp7/src/leveldb/libleveldb.a /root/primecoin-0.1.1-hp7/src/leveldb/libmemenv.a
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
make: *** [primecoind] Error 1

Ubuntu

Compiler crashes without any particularly helpful info:

Code:
# make -f makefile.unix
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0
p7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoi
1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/m
main.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [obj/main.o] Error 4

Debian

Similar to Ubuntu in terms of compiler crash, but the message about git might be helpful to someone more clueful than me?

Code:
# make -f makefile.unix
/bin/sh ../share/genbuild.sh obj/build.h
fatal: Not a git repository (or any of the parent directories): .git
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0.1.1-hp7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoin-0.1.1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/main.o main.cpp
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
make: *** [obj/main.o] Error 1

Any suggestions welcome! :)

Kate.

PS. I expect my guys will fix this in the next day or so but I was having a go while they are busy with the main mining estate. Since I've got stuck I expect others will too!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Tamis on July 23, 2013, 07:49:11 PM
Have no problem compiling on Ubuntu 13.04 x 64... Compiled today several time without a flaw


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: JohnDorien on July 23, 2013, 10:22:18 PM
Thanks for the comprehensive instructions. :)

I have got a bit stuck though and I'm hoping someone can help. I got HP5 working and am now trying HP7. I am trying under three different distros: Debian 6, Ubuntu 12.4 and Centos 6.

I was getting some failures due to  this bug (https://bbs.archlinux.org/viewtopic.php?pid=1126374), but got around that using the recommended s/TIME_UTC/TIME_UTC_/g.

CentOS

This one fails not finding lib boost I think, but the latest versions are installed:

Code:
# make -f makefile.unix USE_UPNP=-
/bin/sh ../share/genbuild.sh obj/build.h
which: no git in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
g++ -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0.1.1-hp7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoin-0.1.1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -o primecoind leveldb/libleveldb.a obj/alert.o obj/version.o obj/checkpoints.o obj/netbase.o obj/addrman.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/rpcnet.o obj/rpcmining.o obj/rpcwallet.o obj/rpcblockchain.o obj/rpcrawtransaction.o obj/script.o obj/sync.o obj/util.o obj/wallet.o obj/walletdb.o obj/hash.o obj/bloom.o obj/noui.o obj/leveldb.o obj/txdb.o obj/prime.o obj/checkpointsync.o -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/lib  -L/usr/local/lib -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -l gmp -Wl,-Bdynamic -l z -l dl -l pthread /root/primecoin-0.1.1-hp7/src/leveldb/libleveldb.a /root/primecoin-0.1.1-hp7/src/leveldb/libmemenv.a
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
make: *** [primecoind] Error 1

Ubuntu

Compiler crashes without any particularly helpful info:

Code:
# make -f makefile.unix
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0
p7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoi
1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/m
main.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [obj/main.o] Error 4

Debian

Similar to Ubuntu in terms of compiler crash, but the message about git might be helpful to someone more clueful than me?

Code:
# make -f makefile.unix
/bin/sh ../share/genbuild.sh obj/build.h
fatal: Not a git repository (or any of the parent directories): .git
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0.1.1-hp7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoin-0.1.1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/main.o main.cpp
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
make: *** [obj/main.o] Error 1

Any suggestions welcome! :)

Kate.

PS. I expect my guys will fix this in the next day or so but I was having a go while they are busy with the main mining estate. Since I've got stuck I expect others will too!


the Ubuntu problem is caused by too little RAM. I think the debian error has the same cause.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: relm9 on July 23, 2013, 10:41:44 PM
For CentOS if you installed Boost from an rpm distribution you'll probably have to edit the makefile to include boost_thread-mt instead of boost_thread.

Or just do this, as the guide points out:

Quote
make -f makefile.unix BOOST_LIB_SUFFIX=-mt


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: monsterer on July 24, 2013, 06:57:36 AM
This guide is awesome; I tried to get this running on centos myself for ages without success; now it's up and running!

One quick question: how do I tell how many coins I've mined?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Tamis on July 24, 2013, 09:40:01 AM
One quick question: how do I tell how many coins I've mined?

Hi,

just watch 'primecoind getbalance' or 'primecoind listtransactions' or both...
I don't know if immature coins are listed though.

edit :

primecoind listaccounts will show all coins immature or not.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 24, 2013, 09:41:39 AM
There is a few ways to fix this. Trust me, I had a lot of slip and falls, but thanks to the assistance of the community, I got back up.

Plan A) execute swap file commands
cd
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile

Plan B)  Before make file execution, use this command: sed -i 's/O2/O3/g' makefile.unix
then try this again -> make -f makefile.unix USE_UPNP=-

Still don't work?

Plan C) Get upgraded to 1024 MB of RAM and you are good to go. Only do this step if necessary and Plan A & Plan B has failed.

Best of luck!


Thanks for the comprehensive instructions. :)

I have got a bit stuck though and I'm hoping someone can help. I got HP5 working and am now trying HP7. I am trying under three different distros: Debian 6, Ubuntu 12.4 and Centos 6.

I was getting some failures due to  this bug (https://bbs.archlinux.org/viewtopic.php?pid=1126374), but got around that using the recommended s/TIME_UTC/TIME_UTC_/g.

CentOS

This one fails not finding lib boost I think, but the latest versions are installed:

Code:
# make -f makefile.unix USE_UPNP=-
/bin/sh ../share/genbuild.sh obj/build.h
which: no git in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
g++ -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0.1.1-hp7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoin-0.1.1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -o primecoind leveldb/libleveldb.a obj/alert.o obj/version.o obj/checkpoints.o obj/netbase.o obj/addrman.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/rpcnet.o obj/rpcmining.o obj/rpcwallet.o obj/rpcblockchain.o obj/rpcrawtransaction.o obj/script.o obj/sync.o obj/util.o obj/wallet.o obj/walletdb.o obj/hash.o obj/bloom.o obj/noui.o obj/leveldb.o obj/txdb.o obj/prime.o obj/checkpointsync.o -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/lib  -L/usr/local/lib -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -l gmp -Wl,-Bdynamic -l z -l dl -l pthread /root/primecoin-0.1.1-hp7/src/leveldb/libleveldb.a /root/primecoin-0.1.1-hp7/src/leveldb/libmemenv.a
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
make: *** [primecoind] Error 1

Ubuntu

Compiler crashes without any particularly helpful info:

Code:
# make -f makefile.unix
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0
p7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoi
1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/m
main.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [obj/main.o] Error 4

Debian

Similar to Ubuntu in terms of compiler crash, but the message about git might be helpful to someone more clueful than me?

Code:
# make -f makefile.unix
/bin/sh ../share/genbuild.sh obj/build.h
fatal: Not a git repository (or any of the parent directories): .git
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/primecoin-0.1.1-hp7/src -I/root/primecoin-0.1.1-hp7/src/obj -I/usr/local/include -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/primecoin-0.1.1-hp7/src/leveldb/include -I/root/primecoin-0.1.1-hp7/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/main.o main.cpp
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
make: *** [obj/main.o] Error 1

Any suggestions welcome! :)

Kate.

PS. I expect my guys will fix this in the next day or so but I was having a go while they are busy with the main mining estate. Since I've got stuck I expect others will too!



Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: maco on July 24, 2013, 09:44:44 AM
One quick question: how do I tell how many coins I've mined?

Hi,

just watch 'primecoind getbalance' or 'primecoind listtransactions' or both...
I don't know if immature coins are listed though.

Hi,

When you type in primecoind listtransactions, do you see an address? or do you see a blank [ ] or { } ?

If the brackets or braces are blank, no blocks yet.

You will see it listed as 'generate' full address info, coin amount (11 xpm estimated currently), and immature or mature depending on when you seen it. Also, if you used this guide, you will see a balance. If you see 0.00000 that means no coins mined. If you see 11.xxx or 10.xxx instead of 0.0000 you got some coins, but double check with primecoind listtransaction.

You'll know its there when you see the added text.

Best of luck
maco


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: monsterer on July 24, 2013, 12:25:48 PM
Fantastic, thanks guys :)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Transisto on July 25, 2013, 06:53:14 PM
For those that didn't use their free Amazon 100$ in AWS credit.

Fill this form : http://aws.amazon.com/big-data/powerof60/terms/

You'll receive a code by email almost instantly.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: ivanlabrie on July 25, 2013, 07:05:08 PM
For those that didn't use their free Amazon 100$ in AWS credit.

Fill this form : http://aws.amazon.com/big-data/powerof60/terms/

You'll receive a code by email almost instantly.

Thanks!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: bidji29 on July 26, 2013, 10:57:10 AM
Now there is so many parameter. It's very hard to know what to do.
Did the basic setting have been tested on the testnet and appears ok?
I doesn"t ask if they are the best, just if they are ok


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: PicassoRoll on July 26, 2013, 11:27:11 AM
this is great not only for XPM, but for building any other cryptos on Linux. great guide.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on July 26, 2013, 12:14:22 PM
Now there is so many parameter. It's very hard to know what to do.
Did the basic setting have been tested on the testnet and appears ok?
I doesn"t ask if they are the best, just if they are ok

The basic settings should be fine for both mainnet and testnet. In fact some of the current defaults are specifically targeting optimal mainnet performance. Unless you know how to do statistics properly, you will probably only end up hurting your miner's performance.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: adambeazley on July 26, 2013, 03:56:37 PM
Can someone help me with instructions to upgrade from hp5 to the new hp8 on ubuntu 13.04. I followed all of the instructions by the OP as it was written then.

Thanks


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Lollaskates on July 26, 2013, 07:34:26 PM
Here is a shell script for CentOS (tested with 6.4 minimal) to automate the install. Currently written for -hp8 and especially useful for spinning up cloud VPS instances with minimal intervention. Copy the following snippet and save it as build-primecoind-centos.sh, and run it. It is assumed you are logged in as root as no sudo commands are used.

Steps to copy the shell script:
1) Open a file for writing

Code:
vi build-primecoind-centos.sh

2) Press 'i' to enter edit mode, and paste the large snippet below:

Code:
#!/bin/sh

echo 'NOTICE: Switching to /root directory…'
cd /root

echo 'NOTICE: Installing dependencies via yum…'
yum -y install gcc-c++ m4 openssl-devel db4-devel boost-devel wget git ntp
yum -y groupinstall "Development Tools"

echo 'Configuring and starting NTPd...'
chkconfig ntpd on
ntpdate 0.pool.ntp.org
service ntpd start

echo 'NOTICE: Clearing work environment…'
rm -rf gmp-5.1.2.tar.bz2 gmp-5.1.2
rm -rf openssl-1.0.1e.tar.gz openssl-1.0.1e
rm -rf primecoin-0.1.1-hp8.tar.bz2 primecoin-0.1.1-hp8
rm -rf miniupnpc-1.6.20120509.tar.gz

echo 'NOTICE: Downloading OpenSSL 1.0.1e...'
wget ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/openssl-1.0.1e.tar.gz
tar xzvf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
echo 'NOTICE: Configuring OpenSSL 1.0.1e...'
./config shared --prefix=/usr/local --libdir=lib
echo 'NOTICE: Compiling OpenSSL 1.0.1e...'
make
echo 'NOTICE: Installing OpenSSL 1.0.1e…'
make install

cd /root
echo 'NOTICE: Downloading GMP 5.1.2…'
wget http://mirrors.kernel.org/gnu/gmp/gmp-5.1.2.tar.bz2
tar xjvf gmp-5.1.2.tar.bz2
cd gmp-5.1.2
echo 'NOTICE: Configuring GMP 5.1.2…'
./configure --enable-cxx
echo 'NOTICE: Compiling GMP 5.1.2…'
make
echo 'NOTICE: Installing GMP 5.1.2…'
make install

cd /root
echo 'NOTICE: Downloading miniupnpc 1.6.2…'
wget http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.20120509.tar.gz -O  miniupnpc-1.6.20120509.tar.gz
tar xzvf miniupnpc-1.6.20120509.tar.gz
cd miniupnpc-1.6.20120509
echo 'NOTICE: Compiling miniupnpc 1.6.2…'
make
echo 'NOTICE: Installing miniupnpc 1.6.2…'
INSTALLPREFIX=/usr/local make install

cd /root
echo 'NOTICE: Downloading XPM -hp8…'
wget http://sourceforge.net/projects/primecoin-hp/files/0.1.1-hp8/primecoin-0.1.1-hp8.tar.bz2/download -O primecoin-0.1.1-hp8.tar.bz2
tar xjvf primecoin-0.1.1-hp8.tar.bz2
cd primecoin-0.1.1-hp8/src
sed -i -e 's/$(OPENSSL_INCLUDE_PATH))/$(OPENSSL_INCLUDE_PATH) \/usr\/local\/include)/' makefile.unix
sed -i -e 's/$(OPENSSL_LIB_PATH))/$(OPENSSL_LIB_PATH) \/usr\/local\/lib)/' makefile.unix
sed -i -e 's/$(LDHARDENING) $(LDFLAGS)/$(LDHARDENING) -Wl,-rpath,\/usr\/local\/lib $(LDFLAGS)/' makefile.unix
echo 'NOTICE: Compiling XPM -hp8…'
make -f makefile.unix BOOST_LIB_SUFFIX=-mt
echo 'NOTICE: Installing XPM -hp8…'
strip primecoind
cp -f primecoind /usr/local/bin/

cd /root
echo 'NOTICE: Writing configuration for XPM -hp8…'
mkdir -p .primecoin
echo 'server=1
gen=1
rpcallowip=127.0.0.1
rpcuser=primecoinrpc
rpcpassword=SOME_SECURE_PASSWORD
sievesize=1000000' > .primecoin/primecoin.conf
sed -i -e "s/SOME_SECURE_PASSWORD/`< /dev/urandom tr -cd '[:alnum:]' | head -c32`/" .primecoin/primecoin.conf

echo 'NOTICE: Finished'

3) Save and exit Vim by pressing ESC, then typing ':x' (without quotes) and pressing Enter.

4) set the shell script as executable, and run it (as root).

Code:
chmod +x build-primecoind-centos.sh
./build-primecoind-centos.sh

Once completed, you will simply be able to type primecoind anywhere and run the client.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Tamis on July 29, 2013, 06:44:46 PM
For those that didn't use their free Amazon 100$ in AWS credit.

Fill this form : http://aws.amazon.com/big-data/powerof60/terms/

You'll receive a code by email almost instantly.

That worked just fine ! Thanks a lot for the tip.
Now I wonder what would be the best choice for the available credits  regarding primecoin mining...

What instance did you choose and how do we make sure AWS credits are used and instance is not debited on credit card ?
Payment options only show my credit card.

Edit :

I'm testing this instance : High-CPU Reserved Instances - Medium
Getting 4400pps with default settings.

Now I need to see if it is my credit card that gets debited or my AWS credits.
I will probably test the bigger high cpu instance tomorow depending on what gets debited.
If any of you already tested the high ones please post performance.    


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: samos123 on August 16, 2013, 06:18:16 AM
Is there a big difference in performance between pre-compiled binaries and self-compiled?

I'm thinking about only compiling libgmp from source and using the precompiled binaries for primecoind.

Thanks a lot for your guide btw!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: boldar on August 16, 2013, 02:36:42 PM
Hey mikaelh,

I just finished writing a quick install guide for BAMT 1.1, a Debian distro for Litecoin.

https://bitcointalk.org/index.php?topic=274897 (https://bitcointalk.org/index.php?topic=274897)

Feel free to add it to your compilation.  Thanks for all your hard work!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: redtwitz on August 20, 2013, 01:14:39 AM
This is what I had to do on a fresh Fedora 19 install before being able to compile:

Code:
yum install boost-devel gcc-c++ gmp-devel libdb-cxx-devel miniupnpc-devel wget

cd
wget -O - ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/openssl-1.0.1e.tar.gz | tar zx
cd openssl-1.0.1e
./config shared --prefix=/usr/local --libdir=lib
make
make install
ln -s /usr/local/lib/libssl.so /usr/lib64/libssl.so.1.0.0
ln -s /usr/local/lib/libcrypto.so /usr/lib64/libcrypto.so.1.0.0


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: nanobtc on August 23, 2013, 02:38:38 PM
Thanks for the clear instructions, worked easily on 12.04 w/updates. I have one chugging away on pretty old hardware, was rewarded finally with 1.

Can anyone give examples for proxy use? I have .bashrc environment variables set up already, but does not seem to be used. I see the setting as null whille watching.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mechs on August 31, 2013, 08:09:16 PM
Thanks for the clear instructions, worked easily on 12.04 w/updates. I have one chugging away on pretty old hardware, was rewarded finally with 1.

Can anyone give examples for proxy use? I have .bashrc environment variables set up already, but does not seem to be used. I see the setting as null whille watching.
Any changes required for compiling -hp10 on Ubuntu?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Myerss on October 28, 2013, 10:38:04 AM
Strange everything compiled without error but when I try to start I only get this.
Running on Xubuntu 13.04

Code:
./run-primecoind
Terminated


Code:
ps xuf |grep primecoind
miner     6464  0.0  0.0  17844   976 pts/1    S+   11:31   0:00      \_ grep --color=auto primecoind

primecoind getinfo
error: couldn't connect to server

Heres my script:
Code:
#!/bin/bash
export PATH="/usr/local/bin:$PATH"
killall --older-than 10s -q run-primecoind primecoind
function background_loop
        while :; do
                primecoind >/dev/null 2>&1
                sleep 1
        done
background_loop &


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on October 28, 2013, 12:00:32 PM
The killall command in the script occasionally kills the script itself (it's supposed to only kill previously started scripts). Try commenting out the line:
Code:
killall --older-than 10s -q run-primecoind primecoind


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: j28 on November 03, 2013, 08:55:33 AM
hi guys,

everything went well on ubuntu for me but I dont get this

Code:
test@kitchenpc:~$ ps xuf |grep primecoind
test     17600  0.0  0.0  16580   660 pts/1    S    09:34   0:00 /bin/bash ./run-primecoind
test     17601  282  2.3 1581368 90680 pts/1   SLl  09:34  44:52  \_ primecoind
test     17758  0.0  0.0  13636   972 pts/1    S+   09:50   0:00      \_ grep --color=auto primecoind

looks like its runing right?

but where can I see how fast am I hashing?
and where are my coins stored?
and how can I send them to my online wallet?
 
is there any gui for this?



Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: paulthetafy on November 03, 2013, 09:19:55 AM
hi guys,

everything went well on ubuntu for me but I dont get this

Code:
test@kitchenpc:~$ ps xuf |grep primecoind
d315     17600  0.0  0.0  16580   660 pts/1    S    09:34   0:00 /bin/bash ./run-primecoind
d315     17601  282  2.3 1581368 90680 pts/1   SLl  09:34  44:52  \_ primecoind
d315     17758  0.0  0.0  13636   972 pts/1    S+   09:50   0:00      \_ grep --color=auto primecoind

looks like its runing right?

but where can I see how fast am I hashing?
and where are my coins stored?
and how can I send them to my online wallet?
 
is there any gui for this?
 

If you want to see a GUI you need to run the primecoin-qt which is similar to the wallet app for most coins.  I'm not sure it if is built when you follow the compilation guide, but you can download it.  I don't think you can run it at the same time as the primecoind daemon though, it's one or the other.

To see how fast you are "hashing" you need to use change to the folder that has the primecoind dameon and type "./primecoind getmininginfo".  This will give you some stats including your chainspermin, chainsperday, and primespersec values which indicate how fast it is mining. 

Your coins are stored in a wallet.dat file in your ~/.primecoin folder.  If you use the primecoin-qt GUI then you can see your balance and send coins from there.  Otherwise you can again use the daemon and call "./primecoind getbalance" to see your cleared balance, "./primecoind listaccounts" to see your balance including any blocks that have not matured, and then finally "./primecoind sendtoaddress XXXX" to send cleared coins to your "online wallet" wherever that is.

The getmininginfo command, along with a heap of others, can also be run from the debug console in the GUI (Help->Debug Window->Console).  Type help for a full list of commands. 


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: j28 on November 03, 2013, 09:41:40 AM
THANKS A LOT  :)


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Greenny on November 13, 2013, 01:02:55 PM
Thanks, the instruction worked flawless on fresh Debian install on the Hetzner EX40 server.


P.S.
Is it possible to use Prime Coin mining in the pool? How?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: altsay on November 17, 2013, 08:22:27 PM
I completely followed the instructions and run on two different computers with Ubuntu 12.04 and 13.04

On either one i get the following error after a random amount of time the daemon began:
Code:
primecoind: checkqueue.h:171: CCheckQueueControl<T>::CCheckQueueControl(CCheckQueue<T>*) [with T = CScriptCheck]: Assertion `pqueue->nTotal == pqueue->nIdle' failed.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: eadmanday on December 03, 2013, 09:36:28 PM
I am trying to get this installed on an online AWS server. like digital Ocean. I have compiled everything and i am trying to run everything. but when i check the mining, i get little to nothing.

2013-12-03 21:30:27 primemeter     86321 prime/h   1368657 test/h    0 5-chains/h 0.012314 chain/d
2013-12-03 21:31:28 primemeter    110984 prime/h   1721939 test/h   59 5-chains/h 0.016618 chain/d
2013-12-03 21:32:29 primemeter    114366 prime/h   1822189 test/h    0 5-chains/h 0.016676 chain/d
2013-12-03 21:33:29 primemeter    105579 prime/h   1629647 test/h    0 5-chains/h 0.013099 chain/d
2013-12-03 21:34:29 primemeter    105275 prime/h   1566544 test/h    0 5-chains/h 0.014631 chain/d

it seems like its very low for the server.

also i have changed my rpcuser to my beeeeer address and password. was that where i mine for a pool? or could i put my wallet address in  the config somewhere?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Airbete on December 06, 2013, 08:45:12 PM
When i use primecoin-hp11 binary (downloaded from sourceforge) everything runs fine. Let's call this one A.

When i use the binary i get after compiling from source (either sourceforge, github or bitbucket) -- let's call this one B --, i get these kind of messages in debug.log:
Code:
received block 1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b
ERROR: CScriptCheck() : 0ef6ec05ffdc0a1fcc54efbe10ab2ba90359f0038c75278382e3358b8014602e VerifySignature failed
InvalidChainFound: invalid block=1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b  height=297777  log2_work=43.922259  date=2013-12-06 19:46:32
InvalidChainFound:  current best=389d7b3c8f4b5ea6ff76504e837942f0e2d58a40d7bac74da4a6faba491ee8b9  height=297776  log2_work=43.92224  date=2013-12-06 19:44:57
InvalidChainFound: invalid block=1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b  height=297777  log2_work=43.922259  date=2013-12-06 19:46:32
InvalidChainFound:  current best=389d7b3c8f4b5ea6ff76504e837942f0e2d58a40d7bac74da4a6faba491ee8b9  height=297776  log2_work=43.92224  date=2013-12-06 19:44:57
ERROR: SetBestBlock() : ConnectBlock 1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b failed
ERROR: AcceptBlock() : AddToBlockIndex failed
ERROR: ProcessBlock() : AcceptBlock FAILED
In fact, no new "ProcessBlock: ACCEPTED" ever happens. Even if I return to A, the same error is now showing (it looks like the chain was corrupted by B). I am, unable to reindex the chain with B (InvalidChainFound appears around height 85431).

Any idea what's wrong?

I am on a Fedora 19 box.

AB


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: rethaw on December 07, 2013, 04:37:07 AM
I am trying to get this installed on an online AWS server. like digital Ocean. I have compiled everything and i am trying to run everything. but when i check the mining, i get little to nothing.

2013-12-03 21:30:27 primemeter     86321 prime/h   1368657 test/h    0 5-chains/h 0.012314 chain/d
2013-12-03 21:31:28 primemeter    110984 prime/h   1721939 test/h   59 5-chains/h 0.016618 chain/d
2013-12-03 21:32:29 primemeter    114366 prime/h   1822189 test/h    0 5-chains/h 0.016676 chain/d
2013-12-03 21:33:29 primemeter    105579 prime/h   1629647 test/h    0 5-chains/h 0.013099 chain/d
2013-12-03 21:34:29 primemeter    105275 prime/h   1566544 test/h    0 5-chains/h 0.014631 chain/d

it seems like its very low for the server.

also i have changed my rpcuser to my beeeeer address and password. was that where i mine for a pool? or could i put my wallet address in  the config somewhere?

If you want to pool mine, you need to use a pool miner, not the full client. There are a number of threads on this, check out this one! https://bitcointalk.org/index.php?topic=252944.0


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on December 07, 2013, 09:34:05 AM
When i use primecoin-hp11 binary (downloaded from sourceforge) everything runs fine. Let's call this one A.

When i use the binary i get after compiling from source (either sourceforge, github or bitbucket) -- let's call this one B --, i get these kind of messages in debug.log:
Code:
received block 1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b
ERROR: CScriptCheck() : 0ef6ec05ffdc0a1fcc54efbe10ab2ba90359f0038c75278382e3358b8014602e VerifySignature failed
InvalidChainFound: invalid block=1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b  height=297777  log2_work=43.922259  date=2013-12-06 19:46:32
InvalidChainFound:  current best=389d7b3c8f4b5ea6ff76504e837942f0e2d58a40d7bac74da4a6faba491ee8b9  height=297776  log2_work=43.92224  date=2013-12-06 19:44:57
InvalidChainFound: invalid block=1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b  height=297777  log2_work=43.922259  date=2013-12-06 19:46:32
InvalidChainFound:  current best=389d7b3c8f4b5ea6ff76504e837942f0e2d58a40d7bac74da4a6faba491ee8b9  height=297776  log2_work=43.92224  date=2013-12-06 19:44:57
ERROR: SetBestBlock() : ConnectBlock 1512dbec68b62a277efddb631a3de13fc6293f6906a2386bdedf7e7157c5218b failed
ERROR: AcceptBlock() : AddToBlockIndex failed
ERROR: ProcessBlock() : AcceptBlock FAILED
In fact, no new "ProcessBlock: ACCEPTED" ever happens. Even if I return to A, the same error is now showing (it looks like the chain was corrupted by B). I am, unable to reindex the chain with B (InvalidChainFound appears around height 85431).

Any idea what's wrong?

I am on a Fedora 19 box.

Well, it could be a compiler issue in Fedora 19. Did you use any special compiler flags when compiling? Also, it could be an issue in your version of OpenSSL. In the past Redhat has removed support for EC crypto from their version of OpenSSL. Did you compile your own version of OpenSSL, or did you use Fedora's version?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Airbete on December 07, 2013, 06:10:14 PM
Quote
Well, it could be a compiler issue in Fedora 19. Did you use any special compiler flags when compiling? Also, it could be an issue in your version of OpenSSL. In the past Redhat has removed support for EC crypto from their version of OpenSSL. Did you compile your own version of OpenSSL, or did you use Fedora's version?

Thank you for your reply! Here is some additionnal information:

1) Before compiling, I made no change to makefile.unix. Thus the flags were:
Code:
-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -DUSE_UPNP=0 -DUSE_IPV6=1 -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2
2) I am using the OpenSSL from Fedora:
Code:
openssl-devel-1.0.1e-30.fc19.x86_64
openssl-1.0.1e-30.fc19.x86_64
openssl-libs-1.0.1e-30.fc19.x86_64
3) During compilation there are no errors but some warnings, namely:
Code:
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c db/memtable.cc -o db/memtable.o
db/memtable.cc: In member function ‘void leveldb::MemTable::Add(leveldb::SequenceNumber, leveldb::ValueType, const leveldb::Slice&, const leveldb::Slice&)’:
db/memtable.cc:104:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   assert((p + val_size) - buf == encoded_len);
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c table/table.cc -o table/table.o
table/table.cc: In member function ‘leveldb::Status leveldb::Table::InternalGet(const leveldb::ReadOptions&, const leveldb::Slice&, void*, void (*)(void*, const leveldb::Slice&, const leveldb::Slice&))’:
table/table.cc:231:13: warning: variable ‘handle’ set but not used [-Wunused-but-set-variable]
       Slice handle = iiter->value();
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c util/bloom.cc -o util/bloom.o
util/bloom.cc: In member function ‘virtual void leveldb::{anonymous}::BloomFilterPolicy::CreateFilter(const leveldb::Slice*, int, std::string*) const’:
util/bloom.cc:50:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (size_t i = 0; i < n; i++) {
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c util/cache.cc -o util/cache.o
util/cache.cc: In member function ‘void leveldb::{anonymous}::HandleTable::Resize()’:
util/cache.cc:119:15: warning: variable ‘key’ set but not used [-Wunused-but-set-variable]
         Slice key = h->key();
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c util/logging.cc -o util/logging.o
util/logging.cc: In function ‘bool leveldb::ConsumeDecimalNumber(leveldb::Slice*, uint64_t*)’:
util/logging.cc:67:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           (v == kMaxUint64/10 && delta > kMaxUint64%10)) {
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/init.d -o obj/init.o init.cpp
In file included from bitcoinrpc.h:18:0,
                 from init.cpp:10:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/bitcoinrpc.d -o obj/bitcoinrpc.o bitcoinrpc.cpp
In file included from bitcoinrpc.h:18:0,
                 from bitcoinrpc.cpp:12:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/rpcdump.d -o obj/rpcdump.o rpcdump.cpp
In file included from bitcoinrpc.h:18:0,
                 from rpcdump.cpp:7:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/rpcnet.d -o obj/rpcnet.o rpcnet.cpp
In file included from bitcoinrpc.h:18:0,
                 from rpcnet.cpp:8:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/rpcmining.d -o obj/rpcmining.o rpcmining.cpp
In file included from bitcoinrpc.h:18:0,
                 from rpcmining.cpp:10:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/rpcwallet.d -o obj/rpcwallet.o rpcwallet.cpp
In file included from bitcoinrpc.h:18:0,
                 from rpcwallet.cpp:11:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/rpcblockchain.d -o obj/rpcblockchain.o rpcblockchain.cpp
In file included from bitcoinrpc.h:18:0,
                 from rpcblockchain.cpp:8:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/rpcrawtransaction.d -o obj/rpcrawtransaction.o rpcrawtransaction.cpp
In file included from bitcoinrpc.h:18:0,
                 from rpcrawtransaction.cpp:9:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/noui.d -o obj/noui.o noui.cpp
In file included from bitcoinrpc.h:18:0,
                 from noui.cpp:8:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/jrostand/primecoin/src -I/home/jrostand/primecoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/jrostand/primecoin/src/leveldb/include -I/home/jrostand/primecoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/checkpointsync.d -o obj/checkpointsync.o checkpointsync.cpp
In file included from bitcoinrpc.h:18:0,
                 from checkpointsync.cpp:70:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;
4) Other packages installed
boost-devel-1.53.0-14.fc19.x86_64
miniupnpc-devel-1.6-9.fc19.x86_64
libdb4-devel-4.8.30-10.fc19.x86_64
libdb-devel-5.3.21-11.fc19.x86_64
libdb-cxx-devel-5.3.21-11.fc19.x86_64
gcc-4.8.2-1.fc19.x86_64
libgcc-4.8.2-1.fc19.x86_64
5) "make -f makefile.unix test" returns a long list of errors (only beginning and end shown here):
Code:
/bin/sh ../share/genbuild.sh obj/build.h
./test_primecoin
Running 93 test cases...
test/key_tests.cpp(59): error in "key_test1": check bsecret1.SetString (strSecret1) failed
test/key_tests.cpp(60): error in "key_test1": check bsecret2.SetString (strSecret2) failed
test/key_tests.cpp(61): error in "key_test1": check bsecret1C.SetString(strSecret1C) failed
test/key_tests.cpp(62): error in "key_test1": check bsecret2C.SetString(strSecret2C) failed
unknown location(0): fatal error in "key_test1": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/key_tests.cpp(76): last checkpoint
unknown location(0): fatal error in "CreateNewBlock_validity": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/miner_tests.cpp(58): last checkpoint
test/transaction_tests.cpp(81): error in "tx_valid": [[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1",0,"1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000490047304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000",true]
test/transaction_tests.cpp(81): error in "tx_valid": [[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1",0,"1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004A0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000",true]
test/transaction_tests.cpp(81): error in "tx_valid": [[["406b2b06bcd34d3c8733e6b79f7a394c8a431fbf4ff5ac705c93f4076bb77602",0,"DUP HASH160 0x14 0xdc44b1164188067c3a32d4780f5996fa14a4f2d9 EQUALVERIFY CHECKSIG"]],"01000000010276b76b07f4935c70acf54fbf1f438a4c397a9fb7e633873c4dd3bc062b6b40000000008c493046022100d23459d03ed7e9511a47d13292d3430a04627de6235b6e51a40f9cd386f2abe3022100e7d25b080f0bb8d8d5f878bba7d54ad2fda650ea8d158a33ee3cbd11768191fd004104b0e2c879e4daf7b9ab68350228c159766676a14f5815084ba166432aab46198d4cca98fa3e9981d0a90b2effc514b76279476550ba3663fdcaff94c38420e9d5000000000100093d00000000001976a9149a7b0f3b80c6baaeedce0a0842553800f832ba1f88ac00000000",true]
test/transaction_tests.cpp(70): error in "tx_valid": [[["0000000000000000000000000000000000000000000000000000000000000100",0,"DUP HASH160 0x14 0x5b6462475454710f3c22f5fdf0b40704c92f25c3 EQUALVERIFY CHECKSIGVERIFY 1"]],"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000",true]
test/transaction_tests.cpp(71): error in "tx_valid": check state.IsValid() failed
test/transaction_tests.cpp(81): error in "tx_valid": [[["0000000000000000000000000000000000000000000000000000000000000100",0,"DUP HASH160 0x14 0x5b6462475454710f3c22f5fdf0b40704c92f25c3 EQUALVERIFY CHECKSIGVERIFY 1"]],"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000",true]

[ ... ]

test/base58_tests.cpp(192): error in "base58_keys_valid_gen": result mismatch: ["5KL6zEaMtPRXZKo1bbMq7JDjjo1bJuQcsgL33je3oY8uSJCR5b4","c7666842503db6dc6ea061f092cfb9c388448629a6fe868d068c42a488b478ae",{"isCompressed":false,"isPrivkey":true,"isTestnet":false}]
test/base58_tests.cpp(192): error in "base58_keys_valid_gen": result mismatch: ["KwV9KAfwbwt51veZWNscRTeZs9CKpojyu1MsPnaKTF5kz69H1UN2","07f0803fc5399e773555ab1e8939907e9badacc17ca129e67a2f5f2ff84351dd",{"isCompressed":true,"isPrivkey":true,"isTestnet":false}]
test/base58_tests.cpp(217): error in "base58_keys_valid_gen": mismatch: ["13p1ijLwsnrcuyqcTvJXkq2ASdXqcnEBLE","1ed467017f043e91ed4c44b4e8dd674db211c4e6",{"addrType":"pubkey","isPrivkey":false,"isTestnet":false}]
test/base58_tests.cpp(217): error in "base58_keys_valid_gen": mismatch: ["3ALJH9Y951VCGcVZYAdpA3KchoP9McEj1G","5ece0cadddc415b1980f001785947120acdb36fc",{"addrType":"script","isPrivkey":false,"isTestnet":false}]
unknown location(0): fatal error in "multisig_verify": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/base58_tests.cpp(253): last checkpoint
unknown location(0): fatal error in "multisig_IsStandard": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/base58_tests.cpp(253): last checkpoint
unknown location(0): fatal error in "multisig_Solver1": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/base58_tests.cpp(253): last checkpoint
unknown location(0): fatal error in "multisig_Sign": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/base58_tests.cpp(253): last checkpoint
unknown location(0): fatal error in "script_CHECKMULTISIG12": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/script_tests.cpp(196): last checkpoint
unknown location(0): fatal error in "script_CHECKMULTISIG23": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/script_tests.cpp(196): last checkpoint
unknown location(0): fatal error in "script_combineSigs": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/script_tests.cpp(196): last checkpoint
test/bloom_tests.cpp(74): error in "bloom_create_insert_key": check vchSecret.SetString(strSecret) failed
unknown location(0): fatal error in "bloom_create_insert_key": std::runtime_error: CKey::CKey() : EC_KEY_new_by_curve_name failed
test/bloom_tests.cpp(74): last checkpoint
unknown location(0): fatal error in "merkle_block_1": memory access violation at address: 0x00000000: no mapping at fault address
test/bloom_tests.cpp(166): last checkpoint

*** 144 failures detected in test suite "Bitcoin Test Suite"
make: *** [test] Error 201

If you need more details, please let me know and thank you again.

AB.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on December 07, 2013, 11:38:23 PM
Ok, it looks like Redhat is indeed shipping a crippled version of OpenSSL in Fedora 19. So you need to compile your own version. Step 2b in my guide shows how to do that.

Some references:
http://bitcoin.stackexchange.com/questions/7940/how-do-i-build-bitcoin-in-fedora-18
https://bugzilla.redhat.com/show_bug.cgi?id=319901


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Airbete on December 08, 2013, 01:59:39 AM
Thanks, i'll try that.

AB.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: deltaman on December 09, 2013, 04:02:41 PM
Hi,

On the digital ocean server I have used these steps to install in CentOS 6.4;
Code:
mkdir /install
cd /install
yum install gcc-c++ m4 openssl-devel db4-devel boost-devel screen

cd /install
rm -rf gmp-5.1.2.tar.bz2 gmp-5.1.2
rm -rf gmp-5.1.3.tar.bz2 gmp-5.1.3
wget http://mirrors.kernel.org/gnu/gmp/gmp-5.1.3.tar.bz2
tar xjvf gmp-5.1.3.tar.bz2
cd gmp-5.1.3
./configure --enable-cxx
make
make install

cd /install
rm -rf openssl-1.0.1e.tar.gz openssl-1.0.1e
wget ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/openssl-1.0.1e.tar.gz
tar xzvf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config shared --prefix=/usr/local --libdir=lib
make
make install

cd /install
rm -rf miniupnpc-1.6.20120509.tar.gz
wget http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.20120509.tar.gz
tar xzvf miniupnpc-1.6.20120509.tar.gz
cd miniupnpc-1.6.20120509
make
sudo INSTALLPREFIX=/usr/local make install

cd /install
rm -rf primecoin-0.1.2-hp11.tar.bz2 primecoin-0.1.2-hp11
wget http://sourceforge.net/projects/primecoin-hp/files/0.1.2-hp11/primecoin-0.1.2-hp11.tar.bz2/download -O primecoin-0.1.2-hp11.tar.bz2
tar xjvf primecoin-0.1.2-hp11.tar.bz2
cd primecoin-0.1.2-hp11/src
cp makefile.unix makefile.my
sed -i -e 's/$(OPENSSL_INCLUDE_PATH))/$(OPENSSL_INCLUDE_PATH) \/usr\/local\/include)/' makefile.my
sed -i -e 's/$(OPENSSL_LIB_PATH))/$(OPENSSL_LIB_PATH) \/usr\/local\/lib)/' makefile.my
sed -i -e 's/$(LDHARDENING) $(LDFLAGS)/$(LDHARDENING) -Wl,-rpath,\/usr\/local\/lib $(LDFLAGS)/' makefile.my
make -f makefile.my USE_UPNP=- BOOST_LIB_SUFFIX=-mt
strip primecoind
rm -rf /usr/local/bin/primecoind
cp primecoind /usr/local/bin/

After these staps I start screen and run primecoind:
Code:
primecoind -deamon - printtoconsole
When running in screen, detach the screen console with crtl+a+d. and you can logout of the server. When reconnecting with ssh to the server you can reconnect to screen to see how you are doing with
Code:
screen -a -r

Regards,
Deltaman


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Sadrachss on December 18, 2013, 07:16:37 PM
Does anyone have any idea what could be the problem?
It has over 40 minutes so

trying connection 69.164.204.19:9911 lastseen=91.9hrs
connection timeout
trying connection 69.164.204.19:9911 lastseen=91.9hrs
connection timeout
trying connection 76.74.177.224:9911 lastseen=105.1hrs
connect() failed after select(): Connection refused
trying connection 69.164.204.19:9911 lastseen=91.9hrs
connection timeout
trying connection 69.164.204.19:9911 lastseen=91.9hrs
connection timeout
trying connection 69.164.204.19:9911 lastseen=91.9hrs
connection timeout
Flushed 4 addresses to peers.dat  26ms
trying connection 69.164.204.19:9911 lastseen=91.9hrs
connection timeout
trying connection 76.74.177.224:9911 lastseen=105.1hrs
connect() failed after select(): Connection refused
trying connection 76.74.177.224:9911 lastseen=105.1hrs
connect() failed after select(): Connection refused


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: DieJohnny on January 03, 2014, 02:00:26 AM
I am not a developer but am willing to tackle this thread if someone can give me some feedback.

I have 40 circa 2008 poweredge servers (xeon 2.2 ghz processors) sitting around doing nothing.

They have no OS, so I am contemplating buying 40 usb thumb drives and booting linux and mining PrimeCoin with them.

Any thoughts?


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: AnhBen on January 15, 2014, 03:29:22 AM
How can I send my XPM automatically to an address?
I'm using Spot Instances on AWS and you will never know when it's terminated but if someone can have a little script to send it out to an address. I'm offering a couple of XPM for a few lines of code.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: Dumbo on January 29, 2014, 01:22:57 AM
So if I want to use the primecoind just as a node, and interact with php for payment ...

the .primecoin/primecoin.conf file should just include :

server=1
daemon=1
rpcuser=primecoinrpc
rpcpassword=SOME_SECURE_PASSWORD

right?



Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: nanobtc on January 31, 2014, 05:49:25 PM
AnhBen: Try this article. (http://www.primecoiner.com/how-to-combine-multiple-wallets-into-main-wallet/) It's about combining outputs of miners to a common wallet.

DieJohnny: They have no OS? Do they have drives? Seems like it would be easier installing on regular drives if they are unused. Mining these is CPU intensive, don't think it's so I/O intensive, so it would probably work OK on USB. Once you get one configged on USB you could easily clone it with dd if=/dev/completedusbdrive of=/dev/otherusbdrive   You'd have to change /etc/hostname of each one so they're not all named the same.

Do you have free electricity? If so, you've got nothing to lose.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: joele on February 05, 2014, 12:11:08 AM
I followed the instruction how to solo mine using this high performance client, but after finding a block the address is different from my primecoin addresses.

 primecoind listreceivedbyaddress 1 true
[
    {
        "address" : "AXWGZBhBK3vbYMEKs7YcXmW1z2XNatZM9s",
        "account" : "AbEddedSP754fNzKQErezFWVPxzkVcZbBw",
        "amount" : 0.00000000,
        "confirmations" : 0
    },
    {
        "address" : "AbEddedSP754fNzKQErezFWVPxzkVcZbBw",
        "account" : "",
        "amount" : 0.00000000,
        "confirmations" : 0
    }
]


 primecoind listtransactions
[
    {
        "account" : "",
        "address" : "AHDwCjwr4zq5P8axJUhmma2Si2vfnTJugp",
        "category" : "immature",
        "amount" : 9.20000000,
        "confirmations" : 828,
        "generated" : true,
        "blockhash" : "ea5203c0c981399abee0fd4e0265fb9bdaeaee552f34420f1d08c3b7fdc7fd0f",
        "blockindex" : 0,
        "blocktime" : 1391475398,
        "txid" : "acdba94a35dcbbf2f28115e500b78356f36939019863c8b1b54c173aa6c4cb18",
        "time" : 1391475398,
        "timereceived" : 1391475398
    }
]


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: mikaelh on February 05, 2014, 08:48:29 AM
That's normal. The miner chooses an unused address from the wallet.


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: joele on February 06, 2014, 02:54:35 PM
That's normal. The miner chooses an unused address from the wallet.
Great, thanks!


Title: Re: [XPM] Primecoin High Performance Linux Compilation Guide
Post by: m3ct0n on March 03, 2014, 01:43:04 PM
How long does the transaction to move from "immature" mode to "send" ?

Code:
primecoind getmininginfo
{
    "blocks" : 423,
    "chainspermin" : 210,
    "chainsperday" : 2461.18083308,
    "currentblocksize" : 1000,
    "currentblocktx" : 0,
    "difficulty" : 7.03459001,
    "errors" : "",
    "generate" : true,
    "genproclimit" : -1,
    "primespersec" : 28795,
    "pooledtx" : 0,
    "sieveextensions" : 9,
    "sievepercentage" : 10,
    "sievesize" : 1000000,
    "testnet" : false
}
Code:
{
    "version" : "v0.1.2.0xpm-hp11-unk-beta",
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 423,
    "moneysupply" : 8573.75000000,
    "timeoffset" : 0,
    "connections" : 1,
    "proxy" : "",
    "testnet" : false,
    "keypoololdest" : 1393852700,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}