COSIMA / cice5

Clone of The Los Alamos sea ice model (CICE) with ACCESS drivers. See https://github.com/CICE-Consortium/CICE-svn-trunk/tree/cice-5.1.2
4 stars 13 forks source link

abort_ice does not pass an error code to MPI_abort #8

Closed aidanheerdegen closed 6 years ago

aidanheerdegen commented 6 years ago

This is the same issue Martin Dix discovered:

https://accessdev.nci.org.au/trac/ticket/318

The call signature for MPI_Abort is https://www.open-mpi.org/doc/v1.10/man3/MPI_Abort.3.php

MPI_ABORT(COMM, ERRORCODE, IERROR)            
    INTEGER        COMM, ERRORCODE, IERROR
comm
Communicator of tasks to abort.
errorcode
Error code to return to invoking environment.

It is called here: https://github.com/OceansAus/cice5/blob/master/mpi/ice_exit.F90#L61 but the value of ierr is not set in the routine, so it is whatever it was initialised to by the compiler.

They had a similar issue with oasis_abort:

https://portal.enes.org/oasis/faq-forum/oasis3-forum/real-coupled-models/548853210

Apparently they decided oasis_abort should default to a non-zero value, it is an abort call after all.

aidanheerdegen commented 6 years ago

Any objections to this being merged? @nicjhan @aekiss @marshallward

marshallward commented 6 years ago

looks OK to me.

marshallward commented 6 years ago

BTW how was this even able to build with two arguments? Isn't MPI_Abort a three-argument function?

aidanheerdegen commented 6 years ago

Yes it is and I don't know

aidanheerdegen commented 6 years ago

As you can imagine @marshallward, this was rather confusing to payu. I have a related issue over on the oasis repo

https://github.com/OceansAus/oasis3-mct/issues/2

russfiedler commented 6 years ago

It compiles because it includes mpif.h rather than using the mpi module.


From: Aidan Heerdegen notifications@github.com Sent: Friday, 2 March 2018 2:26 PM To: OceansAus/cice5 Cc: Subscribed Subject: Re: [OceansAus/cice5] abort_ice does not pass an error code to MPI_abort (#8)

As you can imagine @marshallwardhttps://github.com/marshallward, this was rather confusing to payu. I have a related issue over on the oasis repo

OceansAus/oasis3-mct#2https://github.com/OceansAus/oasis3-mct/issues/2

- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/OceansAus/cice5/issues/8#issuecomment-369809132, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMHgB-mVxIkqQlVeHAXHZsmPtKaaGnDcks5taLv_gaJpZM4SZUBH.

nichannah commented 6 years ago

Merged.