I'm writing a small test problem in F77 (Yes, I know it's outdated, no I can't move to F90 for reasons I'm not going to go into), and I'm trying to parallelize it with MPI. I'm relatively familiar with SMP (specifically OpenMP), but I've run into a lack of understanding as to how MPI allocated memory. My current code structure grabs a large chunk of memory at the beginning of the program, and then carves out pieces of a statically dimensioned array (a way to get around the dynamic memory allocation problem without dynamically allocating memory). My problem is this: I allocate a lot of memory at the beginning of the program (usually the bulk of available RAM). If I try to do this will MPI, will it try to allocate the same large array for each process?
For example
Program MPI_SUM
Implicit Real*8(A-H,O-Z)
Include '/usr/include/mpi/mpif.h'
Parameter (MDV = MAX_MEM) ! Let's say I have MAX_MEM defined here
Dimension V(MDV)
Call MPI_Init(IErr)
Call MPI_WORLD_RANK(MPI_COMM_WORLD,myID,IErr)
Call MPI_WORLD_SIZE(MPI_COMM_WORLD,nProc,IErr)
Ect... Ect... Let's say MAX_Mem is a value such that allocating allocating two of them would exceed available RAM. Will each process try to allocate a new V array of dimension MDV?