Top Page > Browsing
(FIXED) ERROR, key=geoopt.restart value=logical
Date: 2023/11/01 13:26
Name: kylin   <kylincaster@foxmail.com>

Dear all,

While compiled with OpenMPI v4.1.6 and AMD clang version 16.0.3 (CLANG: AOCC_4.1.0-Build#270 2023_07_10) with the -O3 compilation flag, we encountered an issue with the input_logical function. The error message would be "ERROR, key=geoopt.restart value=logical."

During the testing, We found the sscanf function did not return the correct number of tokens; it returned -1 instead of the expected value. To resolve this, We made a modification by adding a printf function, and this resolved the issue. If you encounter a similar problem, you can consider applying the modifications I made as follows:

Best Regards,
Kylin

=================== File Inputtools.c line: 187 ===================
if (keylen == buflen && strncasecmp(key, key_inbuf, keylen) == 0) {
if (nread != 2) {
// Add a print function here
printf("nread = %d, key = %s, return = %s %s\n", nread, key, key_inbuf, val_inbuf);
goto ERROR;
}
}
=================== End of File Inputtools.c ===================
メンテ
Page: [1]

Re: (FIXED) ERROR, key=geoopt.restart value=logical ( No.1 )
Date: 2023/11/02 20:48
Name: kylin  <kylincaster@foxmail.com>

Dear all,

I have identified the source of this mysterious error in the input_logical function. It appears that the character buffer within these input functions are not initialized as an empty string, leading to the reuse of the buffer in subsequent invocations. To address this issue, we should initialize all the buffers in OpenMX using the following command:

================== Bash ===================
sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' mpao.c
sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' gen_defile.c
sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' expao.c
sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' TRAN_Main_Analysis.c
sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' TRAN_Main_Analysis_NC.c
sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' Inputtools_kSpin.c
sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' Inputtools.c
============================================

Alternatively, you can verify the modifications in the source folder by using the following command:

================== Bash ===================
grep "\[BUFSIZE\]" *.c
============================================
If necessary, you can apply this correction to all files within the directory:

================== Bash ===================
find ./ -type f -exec sed -i 's/\[BUFSIZE\]/\[BUFSIZE\] = ""/g' {} \;
============================================

Best Regards,
Kylin
メンテ
Re: (FIXED) ERROR, key=geoopt.restart value=logical ( No.2 )
Date: 2023/11/09 11:09
Name: T. Ozaki

Hi,

Thank you very much for fixing the problem.
I have followed the way you suggested.

Regards,

TO
メンテ

Page: [1]

Thread Title (must) Move the thread to the top
Your Name (must)
E-Mail (must)
URL
Password (used in modification of the submitted text)
Comment (must)

   Save Cookie