[mpich-discuss] Issue regarding MPI_Comm_spawn_multiple
Pavan Balaji
balaji at mcs.anl.gov
Mon May 6 19:46:11 CDT 2013
It's impossible to tell the problem from your description below. Can
you please send us a small test program that reproduces your problem?
-- Pavan
On 05/06/2013 06:45 AM US Central Time, Mahesh Doijade wrote:
> Hi,
> I am using MPI_Comm_spawn_multiple for dynamic process creation
> and passing different arguments to each process through this function,
> but the code runs perfectly fine for some inputs and throws SEGFAULT for
> some other inputs the code sample is
>
>
> /*Arguments generation starts*/
> char ***procs_argv = procs_argv = (char ***) malloc(sizeof(char **)
> * no_processes_to_launch);
>
> for(i=0; i < no_processes_to_launch; i++)
> {
> procs_argv[i] = ( char **)malloc(sizeof(char *) * 2);
> procs_argv[i][0] = ( char *) malloc(sizeof(char)*4);
> procs_argv[i][1] = ( char *) malloc(sizeof(char)*10);
> sprintf(procs_argv[i][0], "%d", ppstat_ptr[i].no_of_pivots);
> //Total no. of pivot variables
> sprintf(procs_argv[i][1], "%d",
> all_sizes_elems_fep[i+1]);//Total bytes of all sizes data.
> }
>
> /*Arguments generation finish*/
> and process is launched as --
> MPI_Comm_spawn_multiple(no_processes_to_launch, cmds, procs_argv,
> nprocs, infos, 0, MPI_COMM_WORLD, &worker_comm, errcodes);
>
> Error given when debugged through gdb :
>
> in _IO_vfprintf_internal (s=<value optimized out>, format=<value
> optimized out>, ap=<value optimized out>) at vfprintf.c : 1603 ,
> process_string_arg(((struct printf_spec *)NULL));
>
>
>
>
>
> --
>
> Regards,
> -- Mahesh Doijade
>
>
>
>
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the discuss
mailing list