The maximum number of parallels is determined for each PC.
The easiest way to find out how many parallels you can have on that PC is
Linux
$top
Press 1
as it is
In this case, 8 parallels are possible.
Windows
Right-click > Task Manager > Performance Tab > CPU Tab > Right-click > Modify Graph > Logical Processor
in the taskbarIn this case, 8 parallels are possible.
If the execution binary of a properly written Fortran program in MPI is a.out
and the number of parallels is 8
,
mpirun-np8./a.out
will be
In addition, OMP_NUM_THREADS
is an environment variable for the number of parallels when using OpenMP.It's similar to MPI, so first of all, if you look at whether you're trying to run an MPI or OpenMP program, you'll get a quick resolution.
© 2024 OneMinuteCode. All rights reserved.