[MITgcm-devel] [MITgcm-cvs] MITgcm/pkg/seaice CVS Commit
Martin Losch
martin.losch at awi.de
Fri Sep 23 03:53:46 EDT 2016
PS: using GLOBAL_SUM_TILE is not very clever, because it involves MPI-exchanges/allreduce, which is not really needed. So I probably should replace that call with somethings that just sums/combines over the threads, something like lines 202-210 in global_sum_tile.F?
Martin
> On 23 Sep 2016, at 09:27, Martin Losch <martin.losch at awi.de> wrote:
>
> Hi Jean-Michel, Chris,
>
> I found a way to change seaice_fgmres.F so that it passes all tests for configurations that are accessible to me (without MPI, with MPI, with mulithreading). I haven’t tried the combination of MPI and multithreading yet.
>
> Could you do me a favor and have a look at the code lines 559-570? There I replaced “ro=abs(rs(i1))” by a global sum and "ro=abs(ro/(nXy*nPy*nSx*nPx))”. All threads compute the same thing (at least in my tests), but I need to reduce the “rs” to one scalar number “ro” that is used as the termination criterion for the loop. Computing the average over all threads and processes in the crude way I have done makes sure that alway have the correct value for ro in all threads. I am a little uncertain if this is OK.
>
> Also, I am not sure why the code has worked before for multiple mpi-processes. Probably because rs(i1) was alway computed correctly and was available (although redundantly for each mpi-process), but with multithreading not all rs(i1,bi,bj) are available to all threads and I cannot just copy, e.g. ro=abs(rs(i1,1,1)). Do I understand this correctly?
>
> Martin
>
>> On 23 Sep 2016, at 09:15, Martin Losch <mlosch at forge.csail.mit.edu> wrote:
>>
>> Update of /u/gcmpack/MITgcm/pkg/seaice
>> In directory forge:/tmp/cvs-serv16065/pkg/seaice
>>
>> Modified Files:
>> seaice_fgmres.F
>> Log Message:
>> make seaice_fgmres.F fit for multithreading; this first attempt
>> appears to be a bit of a hack but it does not affect the results for 1
>> cpu with an without multithreading and with more than one cpu (without
>> multithreading)
>>
>>
>> _______________________________________________
>> MITgcm-cvs mailing list
>> MITgcm-cvs at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-cvs
>
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list