[mpich-discuss] array_of_argv in the MPI_Comm_spawn_multiple
Dave Goodell
goodell at mcs.anl.gov
Wed Jan 14 09:53:18 CST 2009
Hi Frederico,
I'm not aware of a particular limit to the arguments in
MPI_Comm_spawn_multiple (other than whatever your system limit is
[1]), but it's entirely possible that we have an undocumented limit or
bug that we don't know about. We can file a bug tracking ticket about
this if you'd like and try to track it down when we have some time.
In order to do that we'll need some more information, such as the
exact version of MPICH2 you are running, what system you are running
it on, and what configure options and process manager you are using.
In general, my experience is that you should switch to using a
configuration file instead of arguments when the number of arguments
goes above 10 or so. It's usually much easier to maintain and obtain
repeatable results with your software. Then instead of 72 arguments
you'll just pass one or two to your program that indicate where to
locate the configuration file. This also has the advantage that you
can use source code management tools like SVN and git to keep track of
what arguments you have used over time.
-Dave
[1] http://www.in-ulm.de/~mascheck/various/argmax/
On Jan 14, 2009, at 8:59 AM, Federico Golfrè Andreasi wrote:
> I add a printf and also checked using a debugger, but the program
> stops in the MPI_Comm_spawn_multiple.
>
> Do you think is a bug or there is a limitation of the argv dimension?
> If so can you advise me a possible solution to exchange the argv
> between the two program?
>
> thank you very much!
>
> Federico
>
>
>
>
> 2009/1/13 Rajeev Thakur <thakur at mcs.anl.gov>
> Don't know why this may happen. Just do a printf before the
> Comm_spawn_multiple to see if the hang occurs even before that,
> i.e., outside of MPI.
>
> Rajeev
>
> From: mpich-discuss-bounces at mcs.anl.gov [mailto:mpich-discuss-bounces at mcs.anl.gov
> ] On Behalf Of Federico Golfrè Andreasi
> Sent: Monday, January 12, 2009 4:19 AM
>
> To: mpich-discuss at mcs.anl.gov
> Subject: Re: [mpich-discuss] array_of_argv in the
> MPI_Comm_spawn_multiple
>
> Here I send you a little test program:
>
> - the manager.cpp file contains the manager part that initializes a
> Petsc Session, prints some informations about the command line
> options and then executes the "worker program" with
> MPI_Comm_spawn_multiple. The firts command line option of the
> master must the executable name of the worker.
> - the worker.cpp file prints informations about the command line
> options and exit.
>
> I use MPICH-2 and Petsc 2.3.3 and the gcc 1.4.2 compiler.
>
>
> To execute the program I type:
>
> mpiexec -n 2 ./manager ./worker -arg1 1 -arg2 2 -arg3 3 -arg4 4 -
> arg5 5 -arg6 6 -arg7 7 -arg8 8 -arg9 9 -arg10 10 -arg11 11 -arg12 12
> -arg13 13 -arg14 14 -arg15 15 -arg16 16 -arg17 17 -arg18 18 -arg19
> 19 -arg20 20 -arg21 21 -arg22 22 -arg23 23 -arg24 24 -arg25 25 -
> arg26 26 -arg27 27 -arg28 28 -arg29 29 -arg30 30 -arg31 31 -arg32 32
> -arg33 33 -arg34 34 -arg35 35 -arg36 36
>
> Stopping at -arg35 35 the program executes.
>
> Thank you very much!
> Federico
>
>
>
>
>
> 2009/1/9 Rajeev Thakur <thakur at mcs.anl.gov>
> Can you send us a small test program that demonstrates the error?
>
> Rajeev
>
> From: mpich-discuss-bounces at mcs.anl.gov [mailto:mpich-discuss-bounces at mcs.anl.gov
> ] On Behalf Of Federico Golfrè Andreasi
> Sent: Thursday, January 08, 2009 3:34 AM
>
> To: mpich-discuss at mcs.anl.gov
> Subject: Re: [mpich-discuss] array_of_argv in the
> MPI_Comm_spawn_multiple
>
> I noticed that problem when the argv has dimension more than about
> 50 elements and 450 characters.
>
> Thank you,
> Federico
>
>
>
> 2009/1/7 Rajeev Thakur <thakur at mcs.anl.gov>
> How big is the argv you are passing?
>
> Rajeev
>
> From: mpich-discuss-bounces at mcs.anl.gov [mailto:mpich-discuss-bounces at mcs.anl.gov
> ] On Behalf Of Federico Golfrè Andreasi
> Sent: Wednesday, January 07, 2009 4:17 AM
> To: mpich-discuss at mcs.anl.gov
> Subject: [mpich-discuss] array_of_argv in the MPI_Comm_spawn_multiple
>
> Hi,
>
>
> I've a problem in using the MPI_Comm_spawn_multiple.
> When I use that function with a large number of arguments in the
> array_of_argv parameter
> the program execution freezes in the point.
>
> There is a maximum length of the argv or a maximum number of
> elements of argv that can be used?
>
> Thank you!
> Federico
>
>
>
More information about the mpich-discuss
mailing list