[Beowulf] Generation of strings MPI fashion..

Skylar Thompson skylar.thompson at gmail.com
Sat Oct 8 07:20:20 PDT 2016


If you haven't used MPI before, I would break this up into chunks:

1. Write a MPI program that gathers a fixed amount of /dev/urandom
(Brian's suggestion is wise) data and sends it back to the master. This
will get you used to the basic MPI_Send/MPI_Recv commands.

2. Use the same program, but use MPI_Gather rather than MPI_Recv to
assemble the final array. That will get you used to collective
communication.

3. Find a parallel sorting algorithm and implement it. You'll still need
to have rank 0 do some work, but the point of the algorithm would be to
reduce the amount of work it has to do. I found a good description of
parallel merge sort here:

http://penguin.ewu.edu/~trolfe/ParallelMerge/ParallelMerge.html

Good luck!

Skylar

On 10/07/2016 10:19 AM, Darren Wise wrote:
> Heya folks, 
> 
> This may seem really simple to some and it is fairly simple from the
> terminal using bash of generation and sorting (examples below)
> 
> What I would like to do, to get started with making a program to run in
> MPI on my cluster.. I thought of a fairly simple bash script and this
> works fine for a single machine but what is the best way to go around it
> or converting this simple notion in to an MPI runable command.
> 
> Generates random strings of chars:
> $ tr -cd '[upper:]' < /dev/random | fold -w9 | head -c${1:-1000} | tee
> somefile.txt
> 
> Removes duplicate lines:
> $ sort filename.txt | uniq
> 
> This is fine for generation as I mention for a single machine, but
> what's the best way to turn this around and use MPI with a shared NFS
> mounted filesystem..
> 
> While this is an example im going to generate a bash script to allow me
> to generate every possible permutation of a desired string length along
> with types of chars a-z, A-Z, 0-9 along with symbols..
> 
> So any advice is welcome really and it's just an educational way for me
> to transpire into generating code that can be used within my small beowulf.
> 
>> Kind regards,
>> Darren Wise Esq.
>>
>> www.wisecorp.co.uk <http://www.wisecorp.co.uk>
>> www.wisecorp.co.uk/babywise <http://www.wisecorp.co.uk/babywise>
>> www.darrenwise.co.uk <http://www.darrenwise.co.uk>
> 
> 
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org sponsored by Penguin Computing
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
> 



More information about the Beowulf mailing list