Month: March 2009
-
Simple Speed Tests
OCZ 30GB SSD $ hdparm -Tt /dev/sdb /dev/sdb: Timing cached reads: 3358 MB in 2.00 seconds = 1679.46 MB/sec Timing buffered disk reads: 452 MB in 3.01 seconds = 150.05 MB/sec Western Digital WD10EADS 1TB $ hdparm -Tt /dev/sdb /dev/sdb: Timing cached reads: 3372 MB in 2.00 seconds = 1685.85 MB/sec Timing buffered disk reads:…
-
Open MPI Master & Servant Example – BogoMips
In yesterdays post I introduced a simple ‘master & servant’ technique where I used the rank-0 node to collate results from all the other nodes. To do this I used the methods MPI_Send and MPI_Recv to send/recv 128-byte MPI_CHAR strings. Today I am extending the example by sending/receiving MPI_FLOAT‘s to demonstrate that native C/C++ numerical…
-
An Open MPI Master & Servant Example
Building on the Getting started… post from last week I’ve knocked up a quick example showing one way to get your MPI processes to communicate with one another. master_servant.c: #include <stdio.h> #include <mpi.h> #include <unistd.h> int main(int argc, char *argv[]) { int numprocs, rank, namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor_name(processor_name, &namelen);…