aboutsummaryrefslogtreecommitdiff
path: root/src/SetupPGV.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/SetupPGV.c')
-rw-r--r--src/SetupPGV.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c
index 3eca95e..05ead64 100644
--- a/src/SetupPGV.c
+++ b/src/SetupPGV.c
@@ -192,7 +192,7 @@ pConnectivity *PUGH_SetupConnectivity(int dim,
this->perme = malloc(dim*sizeof(int));
this->neighbours = malloc(total_procs*sizeof(int *));
- if(this->neighbours)
+ if(! dim || this->neighbours)
{
this->neighbours[0] = malloc(total_procs*2*dim*sizeof(int));
}
@@ -203,9 +203,7 @@ pConnectivity *PUGH_SetupConnectivity(int dim,
}
- if(!this->nprocs ||
- !this->perme ||
- !this->neighbours)
+ if((dim && ! this->nprocs) || (dim && ! this->perme) || ! this->neighbours)
{
if(this->neighbours)
{