setting up network for prime searching
William Labbett

Yup.

I got a super fan for the CPU but I was awaiting my Power Supplies I'd ordered which
are quiet too.

I've got ubuntu 12 point something (64-bit). I thought I'd use this machine as the main machine which is 'in charge' of all the other machines.

So now it's time to try and set up the network.

I've got an ethernet switch and a bunch of ethernet cables. My other 4-core machine will be up and running soon (I was waiting for the quiet PSU).

I reckon allegro.cc can get the network running despite I not having a clue about networks. I think I've got everything that's needed.

I'd be grateful if allegro.cc could temporarily make-believe that I'm on a remote planet trying to set up a surface to air missile strike on a meteor that is bound for earth at hyperspeed.

I await your instructions.

Thomas Fjellstrom

So, is this a separate switch to your internet modem/router? If its a separate switch, plug all of the machines into the switch, and that switch into your router. Or if you don't have a separate switch, just plug them into your router. If they don't need to be connected to the internet, just don't plug them into the router (you will need a separate switch for that).

Modern ethernet is pretty plug and play (if you have a router of some kind). So yeah, easiest way is to plug the machines into your switch, and the switch into your modem/router.

William Labbett

Thanks Thomas.

So, is this a separate switch to your internet modem/router?

Yes. It's a unit.

Quote:

If its a separate switch, plug all of the machines into the switch, and that switch into your router.

Done that (I think). The switch has got 8 ethernet lead sockets on the back. All the sockets look the same.

I've plugged the main machine in, plus my 4-core that's now working. Also I've plugged a lead in which connects to my router.

Now to be able to control the 4-core from the main machine and to be able to monitor what's going on on it. Is this possible?

Thomas Fjellstrom

Just install SSH and log into each one :) Probably want to start that program inside of tmux or screen, so you can log out and it'll keep running.

William Labbett

Right. I think ssh is installed. Can you explain what I need to do to login to another machine connected to the switch.

I know how to start : Ctrl Alt T to open a terminal. What after that ?

Thomas Fjellstrom

Heh. Install Putty or Kitty (if you're in windows), and use that to connect to the other machines. You'll need to find their IP address from your router, it should have a list of addresses it's recently given out to machines. Otherwise you'll have to log into their console and get the ip from them directly using the ifconfig command.

William Labbett

I've installed Putty.

I've got to the page for the router but I can only see one ip address.

Where do I find the ip addesses of the other machines ?

Thomas Fjellstrom

on your router you'd look for the DHCP settings. Should have a list of mac->ip addresses somewhere. Might not, but some ISP routers really suck.

If you cant find it there, you can scan for the machines using ping, going through all 254 ip addresses :-x

William Labbett

I've got to that kind of page.

There were some old entries for when I had my machines connected to the router.

Refreshing the list got them deleted.

It doesn't say anything about any other machine being connected. I've got a feeling that the ethernet lead from the 2nd machine should be connected to the router itself.

At the moment the ethernet switch is connected to the router and the two machines are connected to the switch.

I can't get on to the internet with the other machine so I guess I've not connected it up properly.

Thomas Fjellstrom

Hm, when did you connect those machines? after or before you started them up?

You can either log into them and run ifdown eth0 && ifup eth0, or you can just reboot. And they should come online.

William Labbett

Nope. It didn't work but I've plugged the computer straight into the router (ie not into the switch) and now it connects. So I presume any PC I plug into the router will
connect and so I could form a network that way but I've only got 5 ports on the router.

Thomas Fjellstrom

Hm, any normal switch should work fine... What kind of switch is it? can you post the model/brand? How old are the other computers? It's possible they don't like the type of cables you're using.

Or, you haven't plugged the switch into the power outlet. ;)

William Labbett

Yup. That's what it is.

I couldn't find the adapter when I was sorting things out and then I forget that I'd never found it before I got started. I've been looking around my flat but can't find it. I've a horrible feeling I threw it out when I was sorting things out. I'll to get a power supply for it somehow.

:P

Until then I can try with the router. I've got to get on with the maths right now though but I'll be back later.

Thanks very much for the help.

Thomas Fjellstrom

No problem.

William Labbett

Great news.

Found the adapter in one of my kitchen cupboards.

EDIT :

I've tried it with the power plugged in but I get the same problem.

The ethernet switch is EDIMAX ES-3208P

Thomas Fjellstrom

reboot one of the computers when its plugged into the switch.

Peter Hull

Are both machines running linux of some sort? If so, try plugging them both into your router and running nmap on the main computer.
To do this run ifconfig on the main computer to find your network address, look for a line like (x, y, z will be numeric)

inet addr:x.y.z.4  Bcast:x.y.z.255  Mask:255.255.255.0

then run

nmap x.y.z.0/24

should show all the machines on that network (one will be the router itself)
For each one that you want to connect to, nmap should show ssh is open:

22/tcp  open  ssh

If not install openssh-server on that computer
Then you should be able to connect from your main computer to the others e.g.

ssh user@host


where host is an ip address of a computer (listed by nmap) and user is your username on that computer.

If that's OK you can try connecting them through the switch instead and confirming it still works.

pete

William Labbett

Hi Pete.

Thanks for the help.

I've run nmap (after installing it) on the main machine (with ubuntu on).

I ran ifconfig. Got 192.168.1.68 for the this machine.

I therefore know that my other linux machine has ip address 192.168.1.66 (because there's only three listed on the BTHomeHub screen and the other one's got windows on it).

I then ran nmap and this seems to be of great significance :-

report on william-PC.home (192.168.1.66) All 1000 scanned ports are closed.

When I try to connect to the machine with ssh - I always get 'connection refused'.

Should I be logging in with the Administrator's username for the machine I'm trying to log onto - or some other username ?

Thomas Fjellstrom

If the ports are closed, ssh isn't running, and may not be installed. You'll need to make sure its installed and running.

And you'd need to use the admin creds for the machine you're logging into.

Peter Hull

If the port is closed that implies the ssh service (sshd) is not running on William-PC.home.

If you're using Debian or Ubuntu you might well need to install sshd on William-PC.home. Use your package manager/software centre and look for openssh-server. If using Ubuntu software centre you'll need to 'Show technical items'

You can test it by logging into the same machine with

ssh localhost

(see attachment)
Fingers crossed.

[edit] Beaten!

Thomas Fjellstrom

[edit] Beaten!

Thats ok, you totally win the thread with the nmap comment. I didn't want to get into that... It would have been fine if he just logged in to the machine and did an ifconfig like I suggested....

William Labbett

I've installed ssh server thing on 'the other machine'.

I do ssh WilliamLabbett@192.168.1.66 then it asks for the password 'for the machine'.

I type in the password for WilliamLabbett and it always says Permission denied, please try again (everytime I try again).

Peter Hull

Obvious things to check:

  • nmap is showing port 22 is open on 192.168.1.66

  • WilliamLabbett is a valid username on 192.168.1.66

  • You're sure you're typing the password right

If you're sitting in front of 192.168.1.66 try 'whoami' to check username and 'ssh localhost' to check you log in locally.

William Labbett

Thanks Peter.

The whoami command revealed that I should have been using william as the username.

I'm a bit confused now because I log in as WilliamLabbett but my username is william ???

So now I can control one machine from another! Pleased about that.

Now mprime starts up when I boot the other machine, so I'm not sure what I'm doing when I run the program from my 'main machine'. What I mean is, I don't know whether I'm opening an interface to the program that's already running or whether I'm opening an new instance of the program.

I've got tmux installed on the main machine.

Thanks for the help guys. Any further thoughts would be welcome.

Peter Hull

Almost there I csan feel it in my bones!

The next step is going to be tmux/screen so you can start a job and detach. Thomas is the expert there, I've never done it.
Pete

William Labbett

Thanks Peter!!

I just got a new heatsink system in the post. Well chuffed.

Check it out : http://www.quietpc.com/fx100

(It's my celebration but in case you can be happy for me).

Thomas Fjellstrom

You want tmux installed on the machines you want to run the programs on. you ssh in, start tmux, then start the program you want to keep running. If you already have your program starting up automatically, you can start it through tmux, iirc it is capable of immediately starting, and detaching, like a daemon. Then you can tmux attach at any time you like from an ssh or other console session to see what is going on with the program.

I'm assuming there is console output you want to look at, tmux will allow you to still see it.

type568

And without regard of technical side of the story. What's your philosophical background for engagement in the complex process of prime searching?

I'm asking you as an amateur Litecoin miner. :)

William Labbett

I've been doing a maths degrees for a number of years somewhere between 2 and 2.5 .
I've been hunting for primes for about 7 years. My current account on GIMPS boasts having discovered that 26 (in all) 17 million base 10 digit Mersenne numbers are not prime.

I suddenly starting taking the prospects of finding a new Mersenne prime much more seriously a month or so ago. Starting buying up broken down machines from second hand shops.

My best machines are 1 4-Core AMD (about 3.2 GHz) and a recently I set up a 6-core 3.5 Ghz AMD aswell. (These I bought brand new).

Those two alone can test 10 17 million digit Mersenne numbers in less than 3 months.

I'm nuts about maths. I've read loads of books on the subject. I've got an A-grade A-level and so far in my degree I've got one pass and one distinction on the two modules I've finished.

I'm doing well on the current module too.

I mention my good track record in case Allegro Developers or anyone with a maths problem could make use of me.

Linear Matrix Transformations, First and Second Order linear recurrence sequences, calculus, trigonometry, geometry, Group Theory, Newtonian Mechanics, Proof, Complex numbers, Conics, Iteration, Taylor Polynomials.

I've got some skills that might be useful.

Number theory I spend a lot of time doing - looking into unsolved problems.

I guess I like to go down in history for solving some old problem. Finding a Mersenne prime would be nice and achieve the same end. Also, there's about $10K
up for grabs to anyone who finds one.

Also, something David Hilbert said - "We must know, we will know."

:)

/* EDIT */

Sorry if this post was a bit disturbing. Just thought I try and explain a bit.

Anyway, I've been trying to get to grips with this new set up.

I've got tmux installed on the other machine. I'm not quite sure how to use it yet. Not sure how exactly I'm meant to benefit from it apart from the window being able to be recalled which is great.

The thing I really need to be able to do is call (from tmux) the system monitor on the other machine. I've googled and had a look around the filesystem to try to locate the executable but to no avail.
I also tried using saidar but there's a couple of things about it that cause problems : 1) I don't know how to get back to the tmux command line after calling it, and 2) It only seems to show the stats for 1 cpu core.

Thomas Fjellstrom

I'm not really following what you're trying to say there...

tmux runs on one system, it runs a program inside of it attached to a virtual terminal.

You can run and access it from a regular console or from ssh.

Even after you detach (Ctrl+b d) from tmux, it and the programs inside of it are still running.

You can open up more than one window in a single tmux instance at a time using Ctrl+b c. So if you need to open a new bash shell in there and run something else, you can. To switch between windows you use Ctrl+b N where N is a number from 0 to 9. I think there's a next and prev key press too, but I can't remember at the moment what it is as I never use it.

If you want to access your programs on different machines, you'd do it the same way as the first. Say you have one main box that you use all the time, and you want to access and monitor all of your number crunching boxes. What you do is open up a terminal emulator, konsole in kde, or gnome-terminal in gnome, one tab for each machine you want to access. Then in each tab, ssh into the machine you want to connect to. Assuming you haven't got tmux or your program already running, youd run tmux with no arguments. then you get a new shell, which you can then run your program in. Do that in each terminal emulator tab for each machine. Now you will have each machine running your program in tmux.

You can detach from tmux with ctrl-b d. and re-attach with tmux attach from any shell running on that system.

I hope that was clear, let me know if it wasn't.

Peter Hull

Just wondering how you were getting on with this?

Another thing you might find useful (if you haven't done this already) - use ssh-keygen and ssh-copy-id so you can securely log on to all your machines without using a password.

Cheers,
Pete

Thread #613921. Printed from Allegro.cc