Pages:
Author

Topic: [XPM] Primecoin High Performance Linux Compilation Guide - page 2. (Read 43554 times)

hero member
Activity: 820
Merit: 1000
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. 
j28
newbie
Activity: 4
Merit: 0
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?

sr. member
Activity: 301
Merit: 250
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
newbie
Activity: 6
Merit: 0
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 &
full member
Activity: 210
Merit: 100
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?
hero member
Activity: 605
Merit: 634
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.
full member
Activity: 231
Merit: 100
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
full member
Activity: 139
Merit: 100
Hey mikaelh,

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

https://bitcointalksearch.org/topic/xpm-install-and-run-primecoin-high-performance-linux-on-bamt-11-for-litecoin-274897

Feel free to add it to your compilation.  Thanks for all your hard work!
newbie
Activity: 25
Merit: 0
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!
sr. member
Activity: 476
Merit: 250
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.    
sr. member
Activity: 249
Merit: 250
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.
newbie
Activity: 17
Merit: 0
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
sr. member
Activity: 301
Merit: 250
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.
newbie
Activity: 8
Merit: 0
this is great not only for XPM, but for building any other cryptos on Linux. great guide.
sr. member
Activity: 392
Merit: 250
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
hero member
Activity: 812
Merit: 1000
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!
donator
Activity: 1731
Merit: 1008
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.
legendary
Activity: 1008
Merit: 1007
Fantastic, thanks guys Smiley
sr. member
Activity: 294
Merit: 250
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
sr. member
Activity: 294
Merit: 250
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. Smiley

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, 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 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 for instructions.
make: *** [obj/main.o] Error 1

Any suggestions welcome! Smiley

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!

Pages:
Jump to: