The authors study the the problem of automatically choosing data distributions for irregular problems, which are programs where the data access patterns cannot be determined during compiliation. They describe a method by which data arrays can be automatically mapped at runtime. The mapping is based on the computational patterns in one or more user specified loops. A distributed memory compiler generates code that at runtime generates a distributed data structure to represent the computational pattern of the chosen loop. This computational pattern is used to determine how data arrays are to be partitioned. The compiler generates code to pass the distributed data structure to a partitioner.