Main menu


thread-safety in shared routines

1 post / 0 new
thread-safety in shared routines


I wrote a new module for sharing subroutines among components.  It resides in ../cesm1_2_2/cases/myCase/SourceMods/src.share.

It has been written with thread-safety in mind, abiding by ruies found at:


The module has been tested for expected computation accuracy using unit testing.  

Running a compiled version given the default pe layout (N_THREADS_LND=4), the model fails due to some coded test criteria in CLM.    

After setting N_THREADS_LND=1, the model runs fine and gives expected results.


First, I was using some of the other modules in the cesm1_2_2/models/csm_share/shr/ as a template for writing a thread-safe module shared among the components.  However, I would like to understand the compatibility of the code structure in some of the modules and purported rules for thread-safety.  


Is there a unit test which can test for thread-safety?  

Thank you

Who's new

  • lwheele@...
  • afroberts@...
  • richard.allard@...
  • tracy@...
  • 498749303@...