Commit 200ad650 authored by aclsce's avatar aclsce
Browse files

Added handling of the use of oasis coupler (to be used in ocean-atmopshere mode).



git-svn-id: svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/dynamico/svn/codes/icosagcm/trunk@1056 5a24c8df-7893-42df-8d02-8693bdefd653
parent d2feedd4
......@@ -10,6 +10,7 @@ compil_mode="prod"
job=1
full_defined="FALSE"
with_xios_defined="FALSE"
with_oasis_defined="FALSE"
arch_defined="FALSE"
parallel_defined="FALSE"
arch_default_path="arch"
......@@ -64,6 +65,9 @@ fin
"-with_xios")
with_xios_defined="TRUE" ; shift ;;
"-with_oasis")
with_oasis_defined="TRUE" ; shift ;;
"-no_io")
no_io_defined="TRUE" ; shift ;;
......@@ -176,6 +180,12 @@ then
ICOSA_LIB="$ICOSA_LIB $XIOS_LIBDIR $XIOS_LIB"
fi
if [[ "$with_oasis_defined" == "TRUE" ]]
then
ICOSA_LIB="$ICOSA_LIB $OASIS_LIBDIR $OASIS_LIB"
fi
if [[ "$external_ioipsl" == "TRUE" ]]
then
ioipsl_path=".void_dir"
......
......@@ -9,6 +9,7 @@ MODULE mpipara
LOGICAL,SAVE :: using_mpi
LOGICAL,SAVE :: is_mpi_root
LOGICAL,SAVE :: is_mpi_master
CHARACTER(LEN=256),SAVE :: using_oasis
INTEGER,SAVE :: mpi_master
INTEGER,SAVE :: id_mpi ! id for profiling
......@@ -60,6 +61,11 @@ CONTAINS
IF (using_mpi) THEN
using_oasis='n'
CALL getin('using_oasis',using_oasis)
IF (using_oasis == 'n') THEN
required_mode_str='funneled'
CALL getin('mpi_threading_mode',required_mode_str)
......@@ -103,8 +109,10 @@ CONTAINS
IF (mpi_threading_mode==MPI_THREAD_SERIALIZED) PRINT*,'MPI_INIT_THREAD : MPI_THREAD_SERIALIZED used'
IF (mpi_threading_mode==MPI_THREAD_MULTIPLE) PRINT*,'MPI_INIT_THREAD : MPI_THREAD_MULTIPLE used'
ENDIF
#ifdef CPP_USING_XIOS
CALL xios_initialize("icosagcm",return_comm=comm_icosa)
CALL xios_initialize("icosa",return_comm=comm_icosa)
#else
comm_icosa=MPI_COMM_WORLD
#endif
......@@ -142,7 +150,9 @@ CONTAINS
#ifdef CPP_USING_XIOS
CALL xios_finalize
#endif
IF (using_mpi) CALL MPI_FINALIZE(ierr)
IF (using_mpi) THEN
IF (using_oasis == 'n') CALL MPI_FINALIZE(ierr)
ENDIF
END SUBROUTINE finalize_mpipara
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment