Hi, I don't know how to solve the problem of "File not found". I have tried to make sure that the file is in the right path with the right name. However this error keeps showing up.
Here are the lines with error:
priorfile = "pri.out";
load path= ^priopath prior[npara,3] = ^priorfile;
Thank you for helping me with this!
7 Answers
0
Try downloading this version and installing it using the GAUSS Application installer and running the included gensysdrive.gss file. It should correctly create all of the paths that that code requires.
0
I'm trying to individualize the code actually. Thank you as well for the information.
0
A couple more things. I formatted the code snippet in your original message. Is that exactly what the code looks like?
priorfile = "pri.out";
load path= ^priopath prior[npara,3] = ^priorfile;
There is a problem in that second line. If that is the code, we can fix it.
Secondly, I would recommend either using the debugger to run the program to the statement that is causing the error and then viewing the variables at that point, or putting a diagnostic print statement there. I seem to remember at least one version of that code did not create the full path structure it needs. The filesa command can be helpful for this. It returns a string array with all files that match a particular file specification, or it returns an empty string if there is no match. You could do something like:
print "about to set load path to " priopath;
found = filesa(priopath);
if found $== "";
print "the directory " priopath " does not exist";
else;
print "the directory " priopath " was found";
endif;
priorfile = "pri.out";
load path= ^priopath;
You could make a more compact statement, but I thought this might be more clear. Let us know if you have questions with this or if anything else comes up.
0
Thank you so much! This problem has been solved. I'm using another version of code, similar to this version but with a few files different. I'll keep debugging.
0
Now I run into a problem which is as below.
proc (5) = dsgesolv(para,mspec)
G0155 : Nested procedure definition
G0008 : Syntax error 'proc (5) = dsgesolv(para,mspec)'
Do you by chance know how to solve it? Thank you!
0
The error G0155 : Nested procedure definition means that GAUSS found a procedure inside of a procedure, like this:
proc (1) = hypotenuse(a, b);
c = a^2 + b+2;
proc (1) = square(a);
retp(a .* a);
endp;
c = sqrt(c);
retp(c);
endp;
Most likely, in your case you do not actually have a procedure defined inside of a procedure. It is more likely that you have an error between procedure definitions that removes that start of one of the procedure definitions, like this:
proc (1) = hypotenuse(a, b);
c = a^2 + b+2;
c = sqrt(c);
retp(c);
//removing the semi-colon after 'endp'
//means the statement does not end until
//the end of the 'proc' statement
endp
proc (1) = square(a);
retp(a .* a);
endp;
Look for an error before the definition of the dgesolv procedure.
0
Many thanks!
Your Answer
7 Answers
Try downloading this version and installing it using the GAUSS Application installer and running the included gensysdrive.gss file. It should correctly create all of the paths that that code requires.
I'm trying to individualize the code actually. Thank you as well for the information.
A couple more things. I formatted the code snippet in your original message. Is that exactly what the code looks like?
priorfile = "pri.out";
load path= ^priopath prior[npara,3] = ^priorfile;
There is a problem in that second line. If that is the code, we can fix it.
Secondly, I would recommend either using the debugger to run the program to the statement that is causing the error and then viewing the variables at that point, or putting a diagnostic print statement there. I seem to remember at least one version of that code did not create the full path structure it needs. The filesa command can be helpful for this. It returns a string array with all files that match a particular file specification, or it returns an empty string if there is no match. You could do something like:
print "about to set load path to " priopath;
found = filesa(priopath);
if found $== "";
print "the directory " priopath " does not exist";
else;
print "the directory " priopath " was found";
endif;
priorfile = "pri.out";
load path= ^priopath;
You could make a more compact statement, but I thought this might be more clear. Let us know if you have questions with this or if anything else comes up.
Thank you so much! This problem has been solved. I'm using another version of code, similar to this version but with a few files different. I'll keep debugging.
Now I run into a problem which is as below.
proc (5) = dsgesolv(para,mspec)
G0155 : Nested procedure definition
G0008 : Syntax error 'proc (5) = dsgesolv(para,mspec)'
Do you by chance know how to solve it? Thank you!
The error G0155 : Nested procedure definition means that GAUSS found a procedure inside of a procedure, like this:
proc (1) = hypotenuse(a, b);
c = a^2 + b+2;
proc (1) = square(a);
retp(a .* a);
endp;
c = sqrt(c);
retp(c);
endp;
Most likely, in your case you do not actually have a procedure defined inside of a procedure. It is more likely that you have an error between procedure definitions that removes that start of one of the procedure definitions, like this:
proc (1) = hypotenuse(a, b);
c = a^2 + b+2;
c = sqrt(c);
retp(c);
//removing the semi-colon after 'endp'
//means the statement does not end until
//the end of the 'proc' statement
endp
proc (1) = square(a);
retp(a .* a);
endp;
Look for an error before the definition of the dgesolv procedure.
Many thanks!