E3SM icon indicating copy to clipboard operation
E3SM copied to clipboard

Prevent multiple nodes from accessing the same file in FATES init_coldstart

Open mpaiao opened this issue 8 months ago • 0 comments

This pull request seeks to address NGEET/fates#1391. FATES sub-routine init_coldstart needs to read in text files when the initial forest state comes from forest inventory datasets. When using multiple nodes, this can cause the model to crash because multiple files are accessing the same file at the same time.

This proposed implementation is borrowed from ED2, which uses MPI sub-routines MPI_Send and MPI_Recv to ensure only one node access the file at a time. This restriction is needed only when FATES is initialised with forest inventory files, so the code checks if this is the case.

mpaiao avatar May 02 '25 21:05 mpaiao