[gmx-developers] bug in gmx_node_num and gmx_node_id?

David van der Spoel spoel at xray.bmc.uu.se
Tue Apr 20 09:00:09 CEST 2004


On Tue, 2004-04-20 at 04:38, MailList wrote:
> Hi, All,
> 
> I just notice that in gmx_node_num() of network.c of version 3.2.1:
>     int  gmx_node_num(void)
>     {
>     #ifndef USE_MPI
>       return 1;
>     #else
>       int i;
>       return MPI_Comm_size(MPI_COMM_WORLD, &i);
>       return i;
>     #endif
>     }
> 
> Should the "return" before MPI_Commsize(...) be removed? and same problem
> exists in gmx_node_id().

It's harmless, but weird programming, I admit. The return value of the
function is the same as what's put in variable i by the call.

I'll change it.
> 
> Thanks.
> 
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-developers-request at gromacs.org.
-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assist. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4205          fax: 46 18 511 755
spoel at xray.bmc.uu.se    spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





More information about the gromacs.org_gmx-developers mailing list