Opened 5 years ago

Closed 4 years ago

#236 closed enhancement (fixed)

force to print text when there is an ipslerr_p error

Reported by: ajornet Owned by: jgipsl
Priority: trivial Milestone: ORCHIDEE 2.0
Component: Driver files Version: trunc
Keywords: Cc:


Sometimes the message is not printed when ipslerr_p (3, ...) is called. It is possible to force to print it using the subroutine FLUSH(unit).
Even though, this is not standard Fortran 90 (only since Fortran 2003). It might cause an error in other compilers. For this reason it is introduced when intel or gnu compilers are used.

Code to add:

#if defined (__INTEL_COMPILER) || defined(__GFORTRAN__)
     CALL FLUSH(orch_ipslout)

In the file src_parallel/ioipsl_para.f90, inside the subroutine ipslerr_p:

   IF (plev == 3) THEN
     WRITE(orch_ipslout,'("Fatal error from ORCHIDEE. STOP in ipslerr_p with code")')
#if defined (__INTEL_COMPILER) || defined(__GFORTRAN__)
     CALL FLUSH(orch_ipslout)

#ifdef CPP_PARA
    CALL MPI_ABORT(plev)
    STOP 'Fatal error from ORCHIDEE'

Change History (5)

comment:1 Changed 5 years ago by ajornet

comment:2 Changed 4 years ago by jgipsl

This seems good but these cpp flags do not seem to be defined any more by the compilers (INTEL_COMPILER, GFORTRAN). I propose to add a key cpp CPP_FLUSH, to be added in the arch-XXXX.fcm in FPP_FLAGS where it is possible.

For example in arch-X64_CURIE.fcm:

%FPP_FLAGS           -P -traditional CPP_FLUSH

And in src_parallel/ioipsl_para.f90:

#ifdef CPP_FLUSH
     CALL FLUSH(orch_ipslout)

comment:3 Changed 4 years ago by jgipsl

  • Milestone changed from orchidee_1_9_6 to ORCHIDEE 2.0
  • Owner changed from somebody to jgipsl
  • Status changed from new to assigned

comment:4 Changed 4 years ago by jgipsl

The initial problem: the text output is not written when model is aborting seems to be related to the call of MPI_ABORT in relation to XIOS.
Note that

  • using IOIPSL instead of XIOS, the print is always done.
  • when an input file is missing, IOIPSL makes an abort and the error message is successfully printed.

The problem seems to be the same as ticket #391 : the model stays hanging at obelix after MPI_ABORT. Committing a call FLUSH, can be a work-around at curie for this problem but when a solution for ticket 391 is found, it should be tested at curie as well.

comment:5 Changed 4 years ago by jgipsl

  • Resolution set to fixed
  • Status changed from assigned to closed

CALL FLUSH has been commited as work-around to force print of text output. This is only done at curie. It is not needed at ada or obelix. Done in the trunk rev [4627].

Note: See TracTickets for help on using tickets.