prime_mpi, a Fortran90 code which counts the number of primes between 1 and N, using MPI to carry out the calculation in parallel.
The algorithm is completely naive. For each integer I, it simply checks whether any smaller J evenly divides it. The total amount of work for a given N is thus roughly proportional to 1/2*N^2.
This program is mainly a starting point for investigations into parallelization.
The information on this web page is distributed under the MIT license.
prime_mpi is available in a C version and a C++ version and a Fortran90 version and a Python version.
mpi_test, a Fortran90 code which use the message passing interface (MPI) for parallel computations in a distributed memory environment.