Dynamic Memory Allocation to Multidimensional Array with MPI

Tim Broslav Source

I am currently working on modeling a diffusion process through a drug patch, which involves solving a PDE using numerical methods. My current issue is trying to dynamically allocate memory to a multidimensional array in C.

The array I am trying to allocate memory to is:

double marray[1000][1000][1000];

Also would it be possible to dynamically allocate memory to an array with another dimension? I am writing code on a 64 bit system, however, I am using a shell (Bitvise SSH client) to compile the code so that I may run it on a supercomputer(BlueShark?).

double marray[1000][1000][1000][1000];

I was given a hint at using MPI for this task?

Thank you for your interest and help!

cmultidimensional-arraympidynamic-memory-allocation

Answers

comments powered by Disqus