[mvapich-discuss] reduce in place
Roland Schulz
roland at utk.edu
Fri Dec 11 20:13:36 EST 2009
Krishna,
can you reproduce it without MV2_USE_SHMEM_REDUCE?
For me it does not work even with MV2_USE_SHMEM_REDUCE=0.
This is a run-time environment variable?
I tried:
export MV2_USE_SHMEM_REDUCE=0
mpiexec -env MV2_USE_SHMEM_REDUCE 0 -n 2 ./a.out
I'm running both ranks on one node.
Roland
On Fri, Dec 11, 2009 at 3:10 PM, Krishna Chaitanya Kandalla <
kandalla at cse.ohio-state.edu> wrote:
> Roland,
> This could be a bug in our code. Can you please try running your
> application with MV2_USE_SHMEM_REDUCE=0. I just tested your sample code with
> this flag and it passed. We will try to fix this bug soon.
>
> Thanks,
> Krishna
>
> Roland Schulz wrote:
>
>> Hi,
>>
>> the below program crashes in MPI_Reduce. It works fine in OpenMPI or an
>> equivalent version without MPI_IN_PLACE. Is MPI_IN_PLACE not supported with
>> MPI_Reduce?
>> Or do I call it wrong? Or is this a bug in mvapich?
>> It segfaults in 1.0.2 and 1.4 (with ofed 1.1).
>>
>> Thanks Roland
>>
>> ==========
>> #include <mpi.h>
>> #include <stdlib.h>
>>
>> int main(int argc, char** argv)
>> {
>> double nr = 4;
>> double *r = (double*)malloc(nr*sizeof(double));
>> MPI_Comm comm_intra;
>> int rank;
>>
>> MPI_Init(&argc,&argv);
>> comm_intra = MPI_COMM_WORLD;
>> MPI_Comm_rank(comm_intra, &rank);
>>
>> if (rank==0) {
>> MPI_Reduce(MPI_IN_PLACE,r,nr,MPI_DOUBLE,MPI_SUM,0,
>> comm_intra);
>> } else {
>> MPI_Reduce(r,NULL,nr,MPI_DOUBLE,MPI_SUM,0,comm_intra);
>> }
>> free(r);
>> return 0;
>> }
>>
>> --
>> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov <http://cmb.ornl.gov
>> >
>>
>> 865-241-1537, ORNL PO BOX 2008 MS6309
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> mvapich-discuss mailing list
>> mvapich-discuss at cse.ohio-state.edu
>> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
>>
>>
>
--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20091211/5a3ec9f2/attachment.html
More information about the mvapich-discuss
mailing list