Megaprocessor

Today I visited the Cambridge History of Computing Museum: http://www.computinghistory.org.uk/

I met James Newman, the inventor of the megaprocessor. He described the process of designing and building the machine, and stepped us through some clock cycles.

Compiling Fortran

Mixing of Fortran types occurs, and often results in problems when mixing free-form Fortran with older styles of Fortran, and when using different compilers.

As pointed out at Geek Tricks.

In Fortran 90/95, a “&” at the end of a line, or in the front of a line, is treated as line continuation sign. But in Fortran 77, it has to be a character at the sixth column. In the code I get, most “&”‘s comply to the Fortran 77 format, but some are not. So I move all “&”‘s to the sixth column, and now the code compile with gfortran.

If you want to replace lots ampersands from the ‘first column’ to the ‘sixth column’ on a lot of lines you could use ‘sed’ string editor to do that.

sed 's/^&/ &/g' input.f > output.f

You also need to check for lines which are too long in your input.

Many errors can be suppressed for now, with command such as gfortran -std=legacy output.f -o justwork

Software defined radio

There are a number of cheap devices which allow you to listen to radio signals, these devices were originally intended for watching TV, digital TV and radio signals through the computer. By using available software it is possible to tune into many radio broadcasts/signals, e.g. HAM radio, AM, FM, commercial airline signals, etc.

To take a look at some devices search for “sdr usb” or “rtl usb”, prices vary from around 5-20 pounds depending on branding / accessories.

If you are interested to listen to voices from around the world, some of these software defined radios are possible to use over the internet. This has the advantage that you can access better hardware and also listen to stations based across the world.

A list of stations is available here: http://websdr.org/

Overheating the i7 620M processor in my laptop (Lenovo T410)

Having fun causing my laptop to shutdown trying to run some density functional theory code (CASTEP) on my laptop. Usually firefox is the culprit.

I installed cpufreq tools which seem to make no difference.

Installing thermald seems to help.

The fist time I ran simulations with castep.serial, i.e. compiled to run on one processor core, and it ran fine. To try and speed up calculations I managed to compile using intel ifort and supporting mpi. I actually managed to slow down the calculation the first time trying to run on 4 cores… the i7-620M only has 2 cores, but supports hyper-threading to add an additional 2 virtual cores.

After that I also need to make sure I don’t do a bandstructure calculation using multi-cores again, CASTEP will happily perform the calculation on 4 cores, but the output file informs there is no parallelisation implemented yet for this task.

This command lets me know temperatures, fanspeed, cpu frequency etc.

watch -n 2 -d cpufreq-info -c 0 -fm; cpufreq-info -c 1 -fm; cpufreq-info -c 2 -fm; cpufreq-info -c 3 -fm; sensors

Running castep.serial compiled with gfortran / fftw3 ?

Pseudo atomic calculation performed for Ni 3d8 4s2

Converged in 38 iterations to a total energy of -1355.3473 eV

Charge spilling parameter for spin component 1 = 0.20%
Charge spilling parameter for spin component 2 = 0.27%

Initialisation time = 17.13 s
Calculation time = 2663.64 s
Finalisation time = 0.42 s
Total time = 2681.19 s
Peak Memory Use = 397444 kB

Running castep.mpi compiled with ifort / mkl

Pseudo atomic calculation performed for Ni 3d8 4s2

Converged in 38 iterations to a total energy of -1355.3473 eV

Charge spilling parameter for spin component 1 = 0.20%
Charge spilling parameter for spin component 2 = 0.27%

Initialisation time = 10.33 s
Calculation time = 996.47 s
Finalisation time = 1.26 s
Total time = 1008.06 s
Peak Memory Use = 430140 kB

You will notice I haven’t yet tried mpi with gfortran or serial with ifort. These are just the options I tried so far. Also thermal management was different between these two calculations. But it seems playing around with compilation, thermal management, and using parallelisation can more than double the speed of the calculations.

System details:
3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux

Megaprocessor!

Digital electronics engineer James Newman, has built a ten meter long, two meter tall processor using transistors. Running at speeds up to 8 kHz the project ran out of control with total spend of forty thousand UK pounds (£40k). Unlike a computer on a chip, the system allows visualisation of the processes and architecture of a modern computer central processing unit (CPU). James is looking to site the computer in a museum or have it tour the UK to educate the public. Currently it’s possible to visit the computer during open days in James’ lounge were the machine was built.

A physically large chunk of memory built using LEDs allows visualisation of the data stored, and can be used to play Tetris!

Megaprocessor

Megaprocessor

Take the tour:

More info on the Magaprocessor website: http://www.megaprocessor.com/.

Other homebew machines can be seen here: Home Brew Computer Ring.