Optimization of storage mappings for parallel programs