-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while reading the parameter "funit" from SISSO.in #72
Comments
Try to FixObviously, this bug is triggered by ! funit
feature_units=0.d0 ! default
if(index(funit_line,'(')/=0) then
print *, 'nunit=', nunit
do ll=1,nunit
i=index(funit_line,'(')
j=index(funit_line,':')
kk=index(funit_line,')')
print *, 'i,j,kk=',i,j,kk
if((i+1)>(j-1)) goto 10041
if((j+1)>(kk-1)) goto 10042
if(i>0 .and. j>0) then
read(funit_line(i+1:j-1),*,err=10043) k
read(funit_line(j+1:kk-1),*,err=10044) l
feature_units(ll,k:l)=1.d0
funit_line(:kk)=''
end if
end do
end if
inquire(file='feature_units',exist=fexist) ! detect if the file 'feature_units' exists
if(fexist) then
open(1,file='feature_units',status='old')
do i=1,nsf
read(1,*) feature_units(:,i) ! unit of each feature represented by a vector (row)
end do
close(1)
end if
return
1002 print *, 'Error: Cannot read the parameter "nsample"'; stop
1003 print *, 'Error: Cannot read the parameter "isconvex"'; stop
10031 print *, 'Error: Cannot read the parameter "ops"'; stop
1004 print *, 'Error: Cannot read the parameter "funit"'; stop
10041 print *, '10041 Error: Cannot read the parameter "funit"'; stop
10042 print *, '10042 Error: Cannot read the parameter "funit"'; stop
10043 print *, '10043 Error: Cannot read the parameter "funit"'; stop
10044 print *, '10044 Error: Cannot read the parameter "funit"'; stop recompiler a debug binary called
Rerun the regression example with two different
The debug message above suggests this bug is caused by end of string My solution is to reduce
this solution works well for me and no error occurs anymore. but I am NOT sure if this fix will work for other tests. |
Hi, I have tried with exactly your SISSO.in and train.dat, and it finished without any error. |
Thank you for your reply. This problem DO exist for me. Possible reasons include:
I tried again from scratch (clone, compiler and run), and got exactly the same error message. Here is my process: It wouldn't be better if you could try again. Thank you very much. |
Yes, it's a compiler issue. Using |
@rouyang2017 Unfortunately, |
@dywu101 I compiled and conducted some tests with case('funit')
read(line_short(i+1:),'(a)',err=1001) funit_line
if(index(funit_line(k+1:),'(')>0) nunit=0
k=0
do while (index(funit_line(k+1:),'(')>0) ! calculate the nunit
k=index(funit_line(k+1:),'(')+k
nunit=nunit+1
print *, 'k=',k,'nunit=',nunit ! Add this line
end do |
I am trying to run the regression example in folder
input_templates
, and I get this error message,The version of repository I used is SISSO.3.5, commit bf5d691.
Bug Reproduction
mkdir demo cp input_templates/SISSO.in ./demo cp input_templates/train.dat_regression ./demo/train.dat cd ./demo SISSO
Then you will get the same error message.
Comment
funit
sentence inSISSO.in
will cancel error output, but I want to control units of features. So, it's not a feasible solution.Files
SISSO.in
train.dat_regression
The text was updated successfully, but these errors were encountered: