Skip to content

Commit bb6a29b

Browse files
committed
Enhance the stability of of_ml_gene_data
1 parent 1919027 commit bb6a29b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

source/source_io/module_parameter/read_input_item_ofdft.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,15 @@ Note: Even dimensions may cause slight errors in FFT. It should be ignorable in
382382
item.default_value = "False";
383383
item.unit = "";
384384
item.availability = "Used only for KSDFT with plane wave basis";
385+
item.check_value = [](const Input_Item& item, const Parameter& para) {
386+
if (para.input.of_ml_gene_data
387+
&& (para.input.esolver_type != "ksdft" || para.input.basis_type != "pw" || GlobalV::NPROC != 1))
388+
{
389+
ModuleBase::WARNING_QUIT(
390+
"ReadInput",
391+
"of_ml_gene_data is only available for KSDFT with PW basis on a single core (NPROC = 1)");
392+
}
393+
};
385394
read_sync_bool(input.of_ml_gene_data);
386395
this->add_item(item);
387396
}

0 commit comments

Comments
 (0)