Re: Problem with parallel evaluation of integrals depending on a

• To: mathgroup at smc.vnet.net
• Subject: [mg99937] Re: Problem with parallel evaluation of integrals depending on a
• From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
• Date: Tue, 19 May 2009 06:49:21 -0400 (EDT)
• References: <guqv83\$a4n\$1@smc.vnet.net>

```Hi Alan,

In your example the s in your range specification is a uppercase S
whereas the others are lowercase.

Did you distribute both the definitions of F and G to the
parallelkernels using DistributeDefinitions?

Cheers -- Sjoerd

On May 18, 8:29 am, Alan Barhorst <alan.barho... at ttu.edu> wrote:
> Hello, I am hoping someone can help me.  I am trying to pass something
> like:
>
> G[s_]:=Integrate[F[x],{x,0,S}]
> NIntegrate[G[s],{s,0,1}]
>
> to parallel kernels.  The operation is successful in the base kernel
> but fails in the other kernels due to the interior integral not being
> evaluated.  The error is as follows.
>
> NIntegrate::"inumr" :  "The integrand (   SubsuperscriptBox[ =E2==
88=A7 , 0 ,
> \
>   S ] Sin[ SubscriptBox[ =CF=86\$10572 ,  11 ]\   SubscriptBox[ =
=CF=88\$10572 ,
> 11 ] [x]] \
> =C2=AE=EF=A1=BFx  )    SubscriptBox[\"F\$10572\", \"1\"] [=
S] has evaluated to non-
> numerical \
> values for all sampling points in the region with boundaries {{0, 1}}."
>
> For some reason the upper bound of the interior integral is not
> replaced with the grid points on {0,1} in the parallel evaluation.  I
> have Distributed the global variable definitions to the kernels after
> the function G[s] have been defined.
>
> I have tried several things to break this loose but have been
> unsuccessful.  Any pointers are appreciated.
>
> AB
> ________________________________________________________
> Alan A. Barhorst, PhD, PE               | alan.barho...@ttu=
.edu
> Professor                                =
|http://www.me.ttu.edu/
> Mechanical Engineering          | Phone: 806-742-3563, ext 241
> Texas Tech University
> Lubbock, TX 79409-1021
>
> When leaders disregard the law and human dignity, kooks
> are emboldened; innocence lost.
>
> Human potential cannot be developed or measured from a
> floating moral reference frame.
> ________________________________________________________

```

• Prev by Date: Re: Help with Agent Problem...
• Next by Date: Re: Problem with parallel evaluation of integrals depending
• Previous by thread: Re: Problem with parallel evaluation of integrals depending on a