Dear @Long.Li,
I have not reviewed the source code you’ve shared. But if you upgrade from OpenFAST from v3.x to v4.x, you’ll need to ensure that your input file formatting is consistent with the upgrade. Input file changes with each release of OpenFAST are documented here: 4.1.2. API changes between versions — OpenFAST v4.1.0 documentation. You can also review the sample OpenFAST input files provided in the OpenFAST r-test (r-test/glue-codes/openfast at main · OpenFAST/r-test · GitHub) for your models of interest, which are upgraded with each OpenFAST release. And if OpenFAST aborts during model initialization because it can’t read an input file properly (such as in your case for TPitManS(1)), you can always enable the Echo option to debug issues associated with input file formatting.
Best regards,