- In order to compile the code do as follows:
- mpif77 program.f -o program
- (for Fortran code)
- mpicc program.c -o program
- (for C code)
- Test run interactively : mpirun -np n executable
- ( will run your executable with n tasks)
- Batch mode using mpi.queue after testing
- (typing mpi.queue on the command line will give you the self explanatory menu).
As a last resort you may look the Answer files.
1. Copy few of the following codes to your work directory and compile/run them on 2, 4 processors using mpirun as well as mpi.queue command.
3. Take the following serial algorithm and implement it in parallel.
Dot product of two arrays B(1000000) in to C(1000000)
- Use MPI_SENDRECV function in place of send/recv separate calls (Answer: poissonsendrecv-Fortran C )
- Convert the non blocking send/recv calls in poisson: Fortran C to blocking send recv calls, and write down your experience.
- Correct the code poisson- Fortran C with blocking calls in order it to work (Answer: poissonblock- Fortran C )
- Compare the timings for all these versions of runs for poisson and suggest the best one (timing comes in the output of batch job)