Skip to content

Enforce minimum pperiod value in ensemble mttk#1144

Merged
brucefan1983 merged 2 commits intobrucefan1983:masterfrom
MoseyQAQ:mttk_pperiod
Sep 10, 2025
Merged

Enforce minimum pperiod value in ensemble mttk#1144
brucefan1983 merged 2 commits intobrucefan1983:masterfrom
MoseyQAQ:mttk_pperiod

Conversation

@MoseyQAQ
Copy link
Copy Markdown
Contributor

Summary
Fix issue #1117

Modification
a minimum pperiod value is required:

      if (p_period[0][0] < 200) // Fix issue #1117
        PRINT_INPUT_ERROR("pperiod should >= 200 timestep."); 

Others
The corresponding document has also incorporated this requirement.

Comment thread src/integrate/ensemble_mttk.cu Outdated
} else if (strcmp(params[i], "pperiod") == 0) {
if (!is_valid_real(params[i + 1], &p_period[0][0]))
PRINT_INPUT_ERROR("Wrong inputs for pperiod keyword.");
if (p_period[0][0] < 200) // Fix issue #1117
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need this comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it is better to still use {} even if there is only one statement.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@brucefan1983 brucefan1983 merged commit 564fd3d into brucefan1983:master Sep 10, 2025
2 checks passed
@MoseyQAQ MoseyQAQ deleted the mttk_pperiod branch September 10, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants