Describe the bug
Calling roughly:
call fms_init()
call fms_end()
call fms_init()
throws a memory allocation exception:
1: Error termination. Backtrace:
1: At line 82 of file /glade/u/home/mwaxmonsky/source/turbo-mwaxmonsky-temp/submodules/FMS/mpp/include/mpp_domains_misc.inc
1: Fortran runtime error: Attempting to allocate already allocated variable 'nonblock_data'
1:
1: Error termination. Backtrace:
1: #0 0x8e94ed in __mpp_domains_mod_MOD_mpp_domains_init
1: at /glade/u/home/mwaxmonsky/source/turbo-mwaxmonsky-temp/submodules/FMS/mpp/include/mpp_domains_misc.inc:82
1: #1 0x4b2716 in __fms_mod_MOD_fms_init
1: at /glade/u/home/mwaxmonsky/source/turbo-mwaxmonsky-temp/submodules/FMS/fms/fms.F90:345
1: #2 0x40b987 in __mom_coms_infra_MOD_mom_infra_init
1: at /glade/u/home/mwaxmonsky/source/turbo-mwaxmonsky-temp/submodules/MOM6/config_src/infra/FMS2/MOM_coms_infra.F90:514
To Reproduce
Call from pFUnit test:
call MOM_infra_init(this%getMpiCommunicator())
call MOM_infra_end()
call MOM_infra_init(this%getMpiCommunicator())
Expected behavior
Should be able to call *_init/*_end/*_init in MOM/FMS without throwing an exception
System Environment
Describe the system environment, include:
module --force purge
. /glade/u/apps/derecho/23.09/spack/opt/spack/lmod/8.7.24/gcc/7.5.0/c645/lmod/lmod/init/sh
module load cesmdev/1.0 ncarenv/23.09
module load craype gcc/12.2.0 cray-libsci/23.02.1.1 ncarcompilers/1.0.0 cmake cray-mpich/8.1.27 netcdf-mpi/4.9.2 parallel-netcdf/1.12.3 parallelio/2.6.2-debug esmf/8.6.0-debug
Additional context
Shows similar behavior using the intel compiler following the environment from the TURBO build.sh.
Describe the bug
Calling roughly:
throws a memory allocation exception:
To Reproduce
Call from pFUnit test:
Expected behavior
Should be able to call
*_init/*_end/*_initin MOM/FMS without throwing an exceptionSystem Environment
Describe the system environment, include:
module --force purge . /glade/u/apps/derecho/23.09/spack/opt/spack/lmod/8.7.24/gcc/7.5.0/c645/lmod/lmod/init/sh module load cesmdev/1.0 ncarenv/23.09 module load craype gcc/12.2.0 cray-libsci/23.02.1.1 ncarcompilers/1.0.0 cmake cray-mpich/8.1.27 netcdf-mpi/4.9.2 parallel-netcdf/1.12.3 parallelio/2.6.2-debug esmf/8.6.0-debugAdditional context
Shows similar behavior using the intel compiler following the environment from the TURBO
build.sh.