diff options
| author | David Phillips <dbphillipsnz@gmail.com> | 2016-05-06 00:30:01 +1200 | 
|---|---|---|
| committer | David Phillips <dbphillipsnz@gmail.com> | 2016-05-06 00:30:01 +1200 | 
| commit | f3027f76a854c2a6734a2cfcfe229794cfd12190 (patch) | |
| tree | 5310898ba38bd8953ffe64ff793db548c1781e11 | |
| parent | 7bceb564014a97b780f3ecdefec55f88928e67bc (diff) | |
| download | fractal-gen-f3027f76a854c2a6734a2cfcfe229794cfd12190.tar.xz | |
Check cluster ID against node count
| -rw-r--r-- | fractal-gen.c | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/fractal-gen.c b/fractal-gen.c index 612e7ce..9b6b2e2 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -221,7 +221,13 @@ int parse_args(int argc, char **argv)  		return 1;  	} -	/* Interlacing is column-based, can't have more workers than columns */ +	if (clust_id >= clust_total) +	{ +		fprintf(stderr, "WARN: Node ID cannot be >= node count\n"); +		return 1; +	} + +	/* Interlacing is row-based, can't have more workers than columns */  	if (cores > size)  	{  		cores = size; | 
