Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Adrian Knoth (adi_at_[hidden])
Date: 2007-05-14 15:46:23


On Mon, May 14, 2007 at 11:59:18PM +0530, Jayanta Roy wrote:

> if(myrank = 0 || myrank == 1)
> if(myrank = 2 || myrank == 3)

Just to make clear we're not talking about a typo: Do you mean
assignment or comparison?

For comparisons, better put the constant value to the left, so

   if (2 = myrank)

gives you a compiler error, because your intention was

   if (2 == myrank)

Just guessing...

-- 
Cluster and Metacomputing Working Group
Friedrich-Schiller-Universität Jena, Germany
private: http://adi.thur.de