---
# System prepended metadata

title: 'MPI (select,ncpus,-np)'
tags: [Classical Computing]

---

###### tags: `Classical Computing`

# MPI (select,ncpus,-np)

MPI is a module for parallel calculations. The following is shell script used when MPI calculations. 

```shell=
#PBS -l select=2:ncpus=96
mpiexec -np 128 python $INPUT
```

This page is aimed at understanding numbers appear (select,ncpus,-np) in the script. 

## select
"select" is number of nodes selected.

## ncpus
`ncpus` stands for number of CPUs per node, which effects the memory that can be used. 
> CPU (Central Processing Unit).
> How can we look up the maximum `ncpus`?

## -np
"mpiexec -np" stands for number of jobs that are parallelized during the calculations. 
> Large number of `-np` takes much time since many jobs needed to be parallelized with same number of CPUs. Thus `-np` is recomended to be small as possible. 


## References 
https://blog.codecamp.jp/visual-studio-ocde