Posts

Showing posts from May, 2016

An example using mpich in a cluster (updated 10.2016)

Here is a C program that shows an example of setting up a different task for each processor core in a cluster of computers. It's very simple but shows the minimum needed to be useful. /* domath.c - test of mpich on multi-processor system k theis 3/31/2016 to run: mpicc -o domath domath.c -lm mv domath /mnt/nfs/dist/domath cd /mnt/nfs/dist/ mpiexec -n 6 -f machinefile ./domath make sure machinefile exists in /mnt/nfs/dist */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <mpi.h> #define PI 3.141592654 int do_sin(void){ double n, res; FILE *sout; int err;     sout = fopen("sin.txt","w");     if (sout == NULL) return 1;     fprintf(sout,"Sin Table\n\n");     err = system("/bin/uname -a > sin_s.txt");    // show machine this is on     n = 0.0;     while (n <= PI/2.0){         res = sin(n);         fprintf(sout,"\nN: %f    Res: %f",n*(90.0/(PI/2.0))

Setting up a cluster of Raspberry Pi's

My mini-computer is basically a cluster of small computers running specialized software that I wrote. I saw a lot of basic information on setting up a cluster but no one really gave details. So I will. I'll add to this as needed, but here is a start: ############### Setting up a Cluster ############### This is assuming you are using a set of raspberry-pi computers. I use the current (2/20/2016) operating system Jessie for the Host computer, and Jessie-lite for the Client computers. The difference is Jessie-lite does not have a lot of un-needed packages and since the are headless, they also do not need x-windows etc. NOTE: it stopped working for me on or about 10/2016. I found I needed to add the package: mpi-default-bin on all processors except my primary. Even after I did the sudo apt-get update. In addition, the structure of the machine file changed as did the command syntax. read the man pages. You will have at a minimum of two computers: the Host and a Client

A description of my Mini-Computer

Image
My mini-computer. I've always wanted a mini-computer. So I made one. For those of you born after about 1975 you might think a mini-computer is just a small computer. So, a little history. The first computers were huge and full of vacuum tubes. Many took up an entire building. Later, they got smaller. IBM made some and they were called Main Frames. They were leased to big corporations for thousands of $$ every month. No one could afford to buy them. Main Frame computers are still used for large companies like airlines and the government. In the early to mid 1960's along came DEC (Digital Equipment Corporation). They made small computers that companies could actually buy. They were the price of a small house, but they could still be bought. One of the first really useful Mini's was DEC's PDP-8. It had a single processor, 4K of magnetic core memory, and some basic I/O including a front panel to set up the initial boot program. They had paper tape readers

Landfall.net now directs here

I let my landfall.net domain lapse. Frankly it was becoming a pain to manage and cost $$ for no return. This is an easier way to create & update content and it's less hassle on my end.