Peeyush Jain wrote:
> I know that but this increases my program complexity time. I want to
> change some variable which will be known to everyone as soon as it get
> changed so that the other process can check the value of that variable
> and work according to that. For MPI_Gather I have to wait for every
> process to be completed which is not a sudden action.
>
> Peeyush
>
> On 3/24/06, Prakash Velayutham <prakash.velayutham_at_[hidden]> wrote:
>
>> Peeyush Jain wrote:
>>
>>> hi all,
>>> I want to know the function by which i can broadcast a message from
>>> one processor without even accesed by some other processor. I mean to
>>> say
>>>
>>> some code change v,
>>> if(v == -1)
>>> MPI_Bcast();
>>>
>>> May be this v is changed by only one processor, then how can some
>>> other processor enters into the MPI_Bcast function. Is there any other
>>> function exist to solve this.
>>>
>>> Peeyush
>>>
>> You could do something like MPI_Gather() for the value of v into a local
>> variable and have a logic for that variable so that it shows whether v
>> has been changed at least by one of the processes. In that case, based
>> on the new variable, introduce the Bcast() or not? Just a suggestion.
>> There might be a much better and straight forward way.
>>
>> Prakash
Please bottom post Peeyush.
I would really like to know your application. How are you organizing
your code so that you can branch out based on this Bcast() of v value.
My guess is, your other processes still have to either block to receive
this value (which you can achieve by separate send() / receive()s) or
you poll for the value (I dont know how to do this). Either ways, you
still have to make all the processes co-ordinate to achieve what you say
as "other process can check the value of that variable and work
according to that".
Please clarify your application. I guess you are complicating the code
more than it ought to be or you should be looking at some kind of Vector
machines with some other programming paradigm to get this done. Someone,
please correct me if I am wrong.
Thanks,
Prakash
|