[dune-pdelab] Problems with MPI
Dodwell, Timothy
T.Dodwell at exeter.ac.uk
Wed Jan 13 17:54:19 CET 2016
Dear All,
I am running the latest release of PDELab on a Mac OX 10.10.5. I am implementing a multilevel monte carlo algorithm which is wrapped around a general model (in this case linear elasticity which uses SEQ_CG_AMG_SSOR for the solver.)
All works well and is tested in series. I have now tried to simply parallelise a for loop which computes a number of independent samples (see below). getSample is a function which returns a quantity of interest from my model and nproc is the number of processors.
When I do this, all processors with rank from 0 to (nproc -2) return values of NaN. If I run the code on 1 processor all works ok.
Thanks in advance for your help!
Tim
int numSamples = N[L] / nproc + 1; // Compute number of samples on each processor (rounding up)
double * Ytmp = new double[numSamples];
double * Yroot = NULL;
if (rank == 0){ Yroot = new double[numSamples * nproc]; }
for (int i = 0; i < numSamples; i++){ Ytmp[i] = getSample(L,z); }
MPI_Gather(Ytmp,numSamples,MPI_DOUBLE,Yroot,numSamples,MPI_DOUBLE,0,MPI_COMM_WORLD);
Dr Tim Dodwell
Lecturer in Engineering Mathematics
Rm 221 - Harrison Building
College of Engineering, Mathematics & Physical Sciences
University of Exeter
Exeter
Devon
EX4 4PY
mail: t.dodwell(at)exeter.ac.uk
tel: +44 (0)1392 725899
mob: +44 (0)7745 622870
web: http://emps.exeter.ac.uk/engineering/staff/td336
Papers and Pre-prints: @Research-Gate<https://www.researchgate.net/profile/Timothy_Dodwell>
Citations: @Google-Scholar<https://scholar.google.co.uk/citations?user=lPpjRfUAAAAJ&hl=en>
[http://www.exeter.ac.uk/media/universityofexeter/communicationservices/design/corporate_sig.jpg]
This email and any attachment may contain information that is confidential, privileged, or subject to copyright, and which may be exempt from disclosure under applicable legislation. It is intended for the addressee only. If you received this message in error, please let me know and delete the email and any attachments immediately. The University will not accept responsibility for the accuracy/completeness of this email and its attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20160113/845d1c1b/attachment.htm>
More information about the dune-pdelab
mailing list