News:

Main Menu

SETI Optimised application for Linux

Started by Dingo, August 15, 2019, 01:07:01 AM

Previous topic - Next topic

Dingo

This is the link to my machine that has a 1080Ti and it does tasks between 37 and 68 seconds.  As the application works it must fine tune itself for your setup because the times get lower the longer you run tasks.  I started out with tasks running over a minute and a half and now as low as 30 seconds.   https://setiathome.berkeley.edu/results.php?hostid=8773560&offset=0&show_names=0&state=4&appid=


There is a lot of extra stuff in here but it as if you have a new install of Ubuntu 18.04
I use VIM thoughout this post.:

vi file name  ---->  edits the file
i  ----->  turn on insert mode
escape  ----- out of Insert Mode
:x   ----> save and exit file

**** Whereever you see I say :x to exit make sure you press Escape first   ****


I am using Ubuntu 18.04.3 LTS and because ypu cannot normally run as root there are instructions below:

Ubuntu allow root login Ubuntu 18

By default in Ubuntu Linux operating system the root user comes in disabled state for security reason and you can't login using root. The reason behind this is there is risk of any by mistake changes of any important files or configurations, someone can misuse of this feature and so on. Hence in Ubuntu to do any administrative changes or important changes you can use sudo command.

sudo passwd root

sudo passwd -u root

sudo vi /etc/gdm3/custom.conf


[security]
AllowRoot=true  // add this line

:x to save

sudo vi /etc/pam.d/gdm-password

# auth   required   pam_succeed_if.so user != root quiet_success  // comment out this line

:x to save

sudo vi /root/.profile

Change the last part of the file to look like this:

# ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then
 if [ -f ~/.bashrc ]; then
   . ~/.bashrc
 fi
fi



if `tty -s`; then
  mesg n
fi


:x to save


If you haven't already change this file to allow root to login over ssh so you can use Putty  or simalar app to login from another machine if you want to do that.

sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config


sudo vi /etc/ssh/sshd_config

# Port 22
to
Port 22

:x to save

Restart the service

service ssh restart


Big thank you to tazzduke for his earlier post.  I do it almost the same way except I install BOINC from the UBuntu repository.



Installing the special app the way I did it from the command line.

Install 7zip

apt install p7zip p7zip-full

Install Nvidia repositories

add-apt-repository ppa:graphics-drivers/ppa // Ubuntu 18.04
add-apt-repository ppa:xorg-edgers/ppa -y  // Ubuntu 14
apt update

I found that this is a good starting point.

apt install nvidia-driver-418 nvidia-settings

reboot

Install the latest version

    sudo apt-get install nvidia-current    // this may error but don't worry

shutdown machine

start machine back up

I installed BOINC from the Ubuntu repository as it is easier for updating etc.

apt install boinc

I also change files so that I can use BOINCTasks and BOINCManager from other computers

This is optional depending on if you want to do this:

cd /etc/init.d

rm boinc-client

vi boinc

Insert the following and save:

###
#!/bin/bash
# BOINC start/stop
#
if [ $1 == start ];then
cd /usr/bin
./boinc --daemon --allow_remote_gui_rpc
fi
if [ $1 == stop ];then
  pkill boinc
fi
###


:x   closes VI and saves the file

chmod 755 /etc/init.d/boinc

update-rc.d boinc defaults

vi /etc/boinc-client/gui_rpc_auth.cfg   ---->   insert a password

vi /usr/bin/gui_rpc_auth.cfg            ---->   insert a password

vi /etc/boinc-client/remote_hosts.cfg   ---->  Add the ip addresses of machines to use BoincManager

vi /var/lib/boinc-client/remote_hosts.cfg  ---->    same as above

/etc/init.d/boinc stop


Set up persistant Firewall settings

apt -y install iptables-persistent

vi iptables.sh

**Add the following to the file**

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 31416 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 5901 -j ACCEPT   # only add this line if you intend to use vncserver / vnc viewer
iptables -A INPUT -p tcp --dport 18080 -j ACCEPT  # Can't remember why I add this one ??
iptables -A INPUT -p icmp -j ACCEPT
iptables-save > /etc/iptables/rules.v4
iptables-save > /etc/iptables/rules.v6


:x  saves the file then run it

sh iptables.sh  

**** Check the file to see if it was created OK

cat /etc/iptables/rules.v4
cat /etc/iptables/rules.v6

rm iptables.sh  ------>  if the file is OK delete the script

/etc/init.d/boinc stop  ---->  should already be stopped but make sure

/etc/init.d/boinc start   --------> Start boinc

Open the BOINC Manager and start attaching to projects  // from the ip address in remote_hosts or local boincmanager if you have gui

add this project
http://wuprop.boinc-af.org/

add SETI
http://setiathome.berkeley.edu/

Immediately change to "No New Tasks"

Stop and start BOINC
/etc/init.d/boinc stop
/etc/init.d/boinc start

----------------------------------------------------------------------------
Added as this was the easiest way I found to install Virtualbox

To install VirtualBox on Debian/Ubuntu run this command.  

Make sure that thee extensions are active on the machine

grep --color vmx /proc/cpuinfo
OR
grep --color svm /proc/cpuinfo


apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox


****************************************************

Install 7zip

apt install p7zip p7zip-full


Install the Video Drivers

setup the ppa for updates
   sudo add-apt-repository ppa:graphics-drivers/ppa  // Ubuntu 18:04
    sudo add-apt-repository ppa:xorg-edgers/ppa -y   // Ubuntu 14
    sudo apt-get update

Install Drivers -- Install the number driver from the list above for youe video card

  apt install nvidia-driver-418 nvidia-settings

shutdown and restart


Install the latest version

    sudo apt-get install nvidia-current   // This did not work for me but my drivers still worked

 
Okay this is how I did it. on the command line


Download the application

cd /tmp

wget http://www.arkayn.us/lunatics/BOINC.7z

Extract the files, a new folder will be created called BOINC.

cd /tmp

7z x BOINC.7z

Do all the following under user - root

Navigate into this new folder :

cd /tmp/BOINC/projects/setiathome.berkeley.edu

Copy all thats inside this folder to the boinc folder

cp -rf  * /usr/bin/projects/setiathome.berkeley.edu

cd /usr/bin/projects/setiathome.berkeley.edu

Edit the app_info file, to change the following lines to read

vi app_info.xml

<app>
    <name>setiathome_v8</name>
 </app>
   <file_info>
     <name>setiathome_x41p_V0.98b1_x86_64-pc-linux-gnu_cuda101</name> // change 90 to 101
     <executable/>
   </file_info>
   <app_version>
     <app_name>setiathome_v8</app_name>
     <platform>x86_64-pc-linux-gnu</platform>
     <version_num>801</version_num>
     <plan_class>cuda10</plan_class> // chane 90 to 10
     <cmdline></cmdline>
     <coproc>
       <type>NVIDIA</type>
       <count>1</count>
     </coproc>
     <avg_ncpus>0.1</avg_ncpus>
     <max_ncpus>0.1</max_ncpus>
     <file_ref>
        <file_name>setiathome_x41p_V0.98b1_x86_64-pc-linux-gnu_cuda101</file_name> // change 90 to 101
         <main_program/>
     </file_ref>
   </app_version>

Also if you have a cpu that supports AVX2 then change both occurrences of

MBv8_8.22r3711_sse41_intel_x86_64-pc-linux-gnu
TO
MBv8_8.22r4008_avx2_intel_x86_64-pc-linux-gnu

Leave all the other part of the app_info intact.

Save and close.
:x and enter to save from vi

Check to see that the executable files are executable.

ls -l


***These are the files

-rwxr-xr-x 1 root root   4929176 Aug 10 21:37 MBv8_8.22r3711_sse41_intel_x86_64-pc-linux-gnu
-rwxr-xr-x 1 root root   4929176 Aug 10 21:37 MBv8_8.22r4008_avx2_intel_x86_64-pc-linux-gnu
-rwxr-xr-x 1 root root   4929176 Aug 10 21:37 setiathome_x41p_V0.98b1_x86_64-pc-linux-gnu_cuda101



If the -x is not on the end of the permissions then change them with

chmod +x filename   eg chmod +x setiathome_x41p_V0.98b1_x86_64-pc-linux-gnu_cuda101

Shutdown / start machine

Start BOINC, Make sure BOINC Preferences are setup so "Safe at least X days work" and "Store up to and aditional X days of work"  are set to 0

check event log to see if the Video Cards are recognised, they should be.

If not then you are in trouble.  

shutdown the machine
 shutdown

Take out all the video cards except one

restart machine
Start BOINC, look in the event log and should be recognised.
/etc/init.d/boinc start

do the above again and add another card till all cards are recognised.

Once everything is up and running change the  "Safe at least X days work" and "Store up to and aditional X days of work"  to at least 1 as SETI goes down for a day on Tuesdays, their time.  I have mine set to 3 to be sure I get enough work.

Hope this might help at least I can look back and see how I did it.


Radioactive@home graph
Have a look at the BOINC@AUSTRALIA Facebook Page and join and also the Twitter Page.

Proud Founder and member of BOINC@AUSTRALIA

My Luck Prime 1,056,356 digits.
Have a look at my  Web Cam of Parliament House Ottawa, CANADA

Dingo

#1
I created a script from the instuctions in the first post.  It keeps my old mind active as I don't get about very well these days.

I could not put the file in but just create a file with a .sh extension like run_special_app.sh and then run it in the command line with sh run_special_app.sh.

I tested it and it worked on Ubuntu 18.04.


Put the following in the file:


!/bin/bash
BLACK=`tput setaf 0`
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
BLUE=`tput setaf 4`
MAGENTA=`tput setaf 5`
CYAN=`tput setaf 6`
WHITE=`tput setaf 7`
BOLD=`tput bold`
RESET=`tput sgr0`
#
# Load up BOINC on 64-bit Ubuntu 18.04
#
# Step 1 - Update Linux

apt -y update
apt -y upgrade


#
# Step 2 - Install boinc
#

apt -y install boinc
cd /etc/init.d
rm boinc-client
touch /etc/init.d/boinc
#echo "i" >> /etc/init.d/boinc
echo "# BOINC start/stop" >> /etc/init.d/boinc
echo "#" >> /etc/init.d/boinc
echo 'if [ $1 == start ];then' >> /etc/init.d/boinc
echo "cd /usr/bin" >> /etc/init.d/boinc
echo  './boinc --daemon --allow_remote_gui_rpc' >> /etc/init.d/boinc
echo "fi" >> /etc/init.d/boinc
echo 'if [ $1 == stop ];then' >> /etc/init.d/boinc
echo 'pkill boinc' >> /etc/init.d/boinc
echo "fi" >> /etc/init.d/boinc
chmod 755 /etc/init.d/boinc
update-rc.d boinc defaults
echo "Enter the password that will be used to access this machine from BoincManager or BoincTasks"
read -p 'Password: ' passvar
touch /etc/boinc-client/gui_rpc_auth.cfg
#echo "i" >> /etc/boinc-client/gui_rpc_auth.cfg
echo $passvar >> /etc/boinc-client/gui_rpc_auth.cfg
touch /usr/bin/gui_rpc_auth.cfg
#echo "i" >> /usr/bin/gui_rpc_auth.cfg
echo $passvar >> /usr/bin/gui_rpc_auth.cfg
touch /etc/boinc-client/remote_hosts.cfg
#echo "i" >> /etc/boinc-client/remote_hosts.cfg
echo "Enter the IP address of the machine that will look at this machine with BoincManager or BoincTasks"
read -p 'IP address: ' ipvar
echo $ipvar >> /etc/boinc-client/remote_hosts.cfg
# Stop boinc
/etc/init.d/boinc stop
/etc/init.d/boinc stop
#
# Step 3 - Get some firewall action

#
apt -y install iptables-persistent
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 31416 -j ACCEPT
iptables -A INPUT -p tcp --dport 5901 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables-save > /etc/iptables/rules.v4
iptables-save > /etc/iptables/rules.v6

#
# Step 4 - Start boinc
#
/etc/init.d/boinc start

echo -e  "${YELLOW}  Use BoincManager or BoincTasks to add ${RESET}"
echo -e  "${YELLOW} these projects http://wuprop.boinc-af.org/  http://setiathome.berkeley.edu/ ${RESET}"
echo -e  "${YELLOW}  Also change Seti to No New Tasks ${RESET}"
echo -e  "${RED}  Once that is done press Return to continue ${RESET}"
read  -p "Press Enter to continue" key

#
# Step 5 - install VirtualBox
#

echo "Make sure that thee extensions are active on the machine"

grep --color vmx /proc/cpuinfo
grep --color svm /proc/cpuinfo
echo Would you like to install? "(Y or N)"
read x
# now check if $x is "y"
if [ "$x" = "y" ]; then
   apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox
fi

#
# Step 6 - install Video Drivers
#
apt -y install p7zip p7zip-full
echo " Add Nvidia repository so we can update"
add-apt-repository ppa:graphics-drivers/ppa
apt -y update
apt -y upgrade
echo "Install Nvidia Driver 418"
apt -y install nvidia-driver-418 nvidia-settings

#
# Step 6 - install SETI special application
#
echo " "
echo -e  "${YELLOW}  Now start the actual install of the special app ${RESET}"
sleep 5
cd /tmp
echo " Download the file"
wget http://www.arkayn.us/lunatics/BOINC.7z
echo " "
echo "Extract the files, a new folder will be created called BOINC."
7z x BOINC.7z
sleep 5
cd /tmp/BOINC/projects/setiathome.berkeley.edu
echo "Copying new files"
cp -rf * /usr/bin/projects/setiathome.berkeley.edu
echo " New files copied to /usr/bin/projects"
sleep 5
echo " "
cd /usr/bin/projects/setiathome.berkeley.edu
echo -e  "${YELLOW}  Open another terminal and Edit the app_info file, ${RESET}"
echo ""
echo -e  "${YELLOW}  to change the following lines to read ${RESET}"
echo ""
echo -e  "${GREEN}  <name>setiathome_x41p_V0.98b1_x86_64-pc-linux-gnu_cuda90</name> // change 90 to 101 ${RESET}"
echo ""
echo -e  "${GREEN} <plan_class>cuda90</plan_class> // chane 90 to 10 ${RESET}"
echo ""
echo -e  "${GREEN}<file_name>setiathome_x41p_V0.98b1_x86_64-pc-linux-gnu_cuda90</file_name> // change 90 to 101 ${RESET}"
echo ""
echo -e  "${WHITE} Change the above lines before continuing ${RESET}"
read -p "Press Enter to continue" key3
grep --color avx2 /proc/cpuinfo
echo ""

echo " "
echo "Did you see text with avx2 on the output? (Y or N)"
read x
# now check if $x is "y"
if [ "$x" = "y" ]; then
 echo -e  "${BLUE} Change MBv8_8.22r3711_sse41_intel_x86_64-pc-linux-gnu TO MBv8_8.22r4008_avx2_intel_x86_64-pc-linux-gnu ${RESET}"
else
    echo "No need to change anything else in the file"
fi

echo "Save and close app_info.xml"
echo ""
echo -e  "${GREEN} When you press Enter that is the end of the script ${RESET}"
echo ""
echo -e  "${GREEN} the machine will reboot and then you can open a terminal and start boinc ${RESET}"
echo ""
echo -e  "${YELLOW} you will need to stop it first /etc/init.d/boinc/stop /etc/init.d/boinc/stop ${RESET}"
echo ""
echo -e  "${YELLOW} then start it /etc/init.d/boinc/start ${RESET}"
echo ""
echo -e  "${YELLOW} look in boincmanager for BoincTasks and see if the GPU's are recognised ${RESET}"
echo ""
echo -e  "${WHITE} If not then shutdown completely instead of reboot ${RESET}"
echo ""
read -p "Press Enter to continue to REBOOT the machine." key
reboot
#end




EDIT :  Had to enter some inputs from user,  just testing now  I could not test the Nvidia Driver install but should work ?
If it doesn't then just use the manual method.
"




Radioactive@home graph
Have a look at the BOINC@AUSTRALIA Facebook Page and join and also the Twitter Page.

Proud Founder and member of BOINC@AUSTRALIA

My Luck Prime 1,056,356 digits.
Have a look at my  Web Cam of Parliament House Ottawa, CANADA

tazzduke

Greetings Dingo

Excellent work, must give it a try sometime soon.

Got another 970 onboard, so that should help a bit lol.

Are you still down in the country near batemans bay area, well its the closest place I could remember to where you were lol.

Cheers



 AA 24 - 53 participant

Dingo

Quote from: tazzduke on August 17, 2019, 03:38:06 PM
Greetings Dingo

Excellent work, must give it a try sometime soon.

Got another 970 onboard, so that should help a bit lol.

Are you still down in the country near batemans bay area, well its the closest place I could remember to where you were lol.

Cheers

Yes moved a bit further south to Merimbula.  Nice area and I have a view of the water from my apartment so pleasant.


Radioactive@home graph
Have a look at the BOINC@AUSTRALIA Facebook Page and join and also the Twitter Page.

Proud Founder and member of BOINC@AUSTRALIA

My Luck Prime 1,056,356 digits.
Have a look at my  Web Cam of Parliament House Ottawa, CANADA

tazzduke

Hi Dingo

Thats a beautiful area down that way, also a view of the water is fantastic as well  :cheers:

Cheers



 AA 24 - 53 participant