Ubunutu machine with OpenMPI and OpenMP

Ubuntu with OpenMPI and OpenMP

This project provides scripts and tutorial to install OpenMPI and OpenMP on a Ubuntu Linux.


  • Ubuntu Linux 18.04 LTS Server Edition
  • SSH Key


Run the script on you machine source install.sh.

The program will create a new user pcpc and exchanges the given ssh keys.

How to generate your SSH keys

Execute che command ssh-keygen.

Built environment

  • user: pcpc
  • vim
  • htop
  • OpenMPI 4.0
  • OpenMP included in the GNU GCC (last version)

Test the environment

You can test your local environment using the program test.c.

  1. Compile the program: mpicc test.c -o test
  2. Run the porgram: mpirun -np 2 test

You can run directly on an homogeneous cluster machine that has been built using the same install script. You can run: mpirun -np 2 --hostfile hfile test. An example host-file is:

# This is an example hostfile.  Comments begin with #
# The following node is a single processor machine:
# The following node is a dual-processor machine:
bar.example.com slots=2
# The following node is a quad-processor machine, and we absolutely
# want to disallow over-subscribing it:
yow.example.com slots=4 max-slots=4

Download Star


Back to top ↑


New site online

less than 1 minute read

New site style and template made using Jekyll. I have changed my hosting because, for several problem using an Outlook mail account, I have missed the mail b...

Counting Sort Sequential vs Parallel

1 minute read

Counting sort is an efficient algorithm for sorting an array of elements that each have a nonnegative integer key, for example, an array, sometimes called a ...

Back to top ↑