Pages

Showing posts with label how to. Show all posts
Showing posts with label how to. Show all posts

Working with MPI: Everything you need to know if you use HPC for science and engineering applications.

The usual questions for a beginner are.

What is MPI?
Why should we use it?
Is it a separate programming language compared to C/C++?
Is it compatible with Fortran/Python/C/C++?
What is the best language to learn MPI programming?
When do I need to use MPI programming?
What is "$PBS_O_DIR" and why should we use it in the script?
What are the commonly used tags in mpirun scripts?
What are some best practices of running MPI scripts?
What is a best program to illustrate the usefulness of MPI programming?
How to compile and run mpi program or script?
How to use laptop for dft or quantum chemistry or computational calculations?
How to compile and run mpi program or script in your laptop?
What is the difference or relation between qsub and MPI?

(add your questions. the questions will be answered one by one.)

Here I will discuss MPI and its usage in high performance computing for beginners in HPC usage.

How to know which version of MPI is installed in my cluster or supercomputer or system?

mpirun -version
You will get:
mpirun: IBM Platform MPI Community Edition: 09.x.x.x [BASELINE_MPI_POST_09xxxxx] [] Linux x86-64

How to check mpirun is successfully installed or not?

To check, simply check the version as above. In addition to that, you can run a simple program (C/C++, Fortran, or Python) that can tell you whether MPI is installed or not.

Now the simple program.

Here is a python program to check whether you have installed MPI or not (MPI Hello World program).

(if you get following error, you probably need to install the package.
"mpi_helloworld.c:10:17: fatal error: mpi.h: No such file or directory
compilation terminated."

(to be added more later)

Every compiler has an mpi version of it, usually with 'mpi' infront of it.

For example:

icpc - mpiicpc
g++ - mpig++
f90  - mpif90
f77  - mpif77
ifort - mpifort (note that one 'i' is missing here)

To run programs/codes compiled using these compilers, you need to use
"mpirun" command to run the jobs.







You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...