From bc96040e1c740c80eeae4bec02ae7319aadb9fb1 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 24 Mar 2006 15:39:09 +0000 Subject: [PATCH] - Add Cisco copyright - Add comment explaining why we used INT_MAX - Update NEWS This commit was SVN r9415. --- NEWS | 2 ++ orte/tools/orterun/orterun.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 23575847ea..430a0e0b18 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,8 @@ version 1.0. 1.0.2 ----- +- Fixed a problem with handling long mpirun app files. Thanks to Ravi + Manumachu for identifying the problem. - Fix handling of strings in several of the Fortran 77 bindings. - Fix LinuxPPC assembly issues. Thanks to Julian Seward for reporting the problem. diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index eedf1e67e0..010a340338 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -10,6 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2006 Cisco Systems, Inc. * $COPYRIGHT$ * * Additional copyrights may follow @@ -824,6 +825,11 @@ static int parse_locals(int argc, char* argv[]) temp_argc = 0; temp_argv = NULL; opal_argv_append(&temp_argc, &temp_argv, argv[0]); + /* Make the max size of the array be INT_MAX because we may be + parsing an app file, in which case we don't know how many + entries there will be. The max size of an orte_pointer_array + is only a safety net; it only initially allocates block_size + entries (2, in this case) */ orte_pointer_array_init(&apps_pa, 1, INT_MAX, 2); /* NOTE: This bogus env variable is necessary in the calls to