Error G0025 : Undentified symbol

When I run my code, I get this error message:

G0025 : Undefined symbol 'resid' [PROCS.txt, line 80]

Can someone help me resolve it?

1 Answer



0



The problem
The GAUSS error G0025 : Undefined symbol occurs when your program tries to reference a variable or procedure that does not exist. For example, if you had a program like this:

a = 1;
b = 2
d = c;

You would get G0025 : Undefined symbol 'c', because the third line of the program tries to use the value of c, but c has never been set to anything, so it does not exist.

Why does it happen?
Sometimes this problem occurs because of a simple programming error as we see in the example above. However, some people write a few code files that need to be run together. For example, they may have two files, my_setup.gss and another one called my_main.gss. Suppose that my_setup.gss contains this:

eps = 1e-5;
max_iters = 100;

and further suppose that my_main.gss contains:

x = 3;
y = 4;
if x < y;
   x = x + eps;
endif;

If we run the file my_main.gss first, then we will get the error G0025 : Undefined symbol 'eps', because again, the program is trying to use the value of eps, however, eps has not been given any value.
The solution
We can get the code to work by first running the file my_setup.gss which will give the variable eps a value. Then since eps has been defined, we can run my_main.gss without error.

So what you need to do is look through the program files came with the file you are running and see if there is another file that defines resid that needs to be run before you run PROCS.TXT.

aptech

1,773

Your Answer

1 Answer

0

The problem
The GAUSS error G0025 : Undefined symbol occurs when your program tries to reference a variable or procedure that does not exist. For example, if you had a program like this:

a = 1;
b = 2
d = c;

You would get G0025 : Undefined symbol 'c', because the third line of the program tries to use the value of c, but c has never been set to anything, so it does not exist.

Why does it happen?
Sometimes this problem occurs because of a simple programming error as we see in the example above. However, some people write a few code files that need to be run together. For example, they may have two files, my_setup.gss and another one called my_main.gss. Suppose that my_setup.gss contains this:

eps = 1e-5;
max_iters = 100;

and further suppose that my_main.gss contains:

x = 3;
y = 4;
if x < y;
   x = x + eps;
endif;

If we run the file my_main.gss first, then we will get the error G0025 : Undefined symbol 'eps', because again, the program is trying to use the value of eps, however, eps has not been given any value.
The solution
We can get the code to work by first running the file my_setup.gss which will give the variable eps a value. Then since eps has been defined, we can run my_main.gss without error.

So what you need to do is look through the program files came with the file you are running and see if there is another file that defines resid that needs to be run before you run PROCS.TXT.


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.