Aptech Systems, Inc. Worldwide Headquarters
Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286
Ready to Get Started?
Request Quote & Product Information
Training & Events
Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.
Have a Specific Question?
Q&A: Register and Login
Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.
Join our community to see why our users are considered some of the most active and helpful in the industry!
Where to Buy
Recent Tagsapplications character vectors CML CMLMT Constrained Optimization datasets dates dlibrary dllcall econometrics Editor error error codes error handling errors Excel file i/o floating network GAUSS Engine GAUSS Light graphics GUI hotkeys installation Java API license licensing linux loading data loops matrices matrix manipulation Maxlik MaxLikMT Memory multidimensional array optimization Optmum panel data PQG graphics procs random numbers strings structures threading
Time Series 2.0 MT
Find out more now
Time Series MT 2.1
Find out more now
Find out more now
Undefined symbols: gradfd
I have been trying to run a readily-available code, but it gives me the following error:
Undefined symbols: gradfd C:\gausslt9.0\arbz_msm.opt(98)
gradfd is a procedure from the Optmum GAUSS application module. If you have the Optmum application module installed correctly, this procedure should be inside of a file called gradient.src inside your GAUSSHOME/src directory. (In your case the exact directory would be C:\gausslt9.0\src).
If you don't have Optmum installed, you should get an error complaining that GAUSS cannot find optmum.lcg when it executes the statement:
at the start of the program.
If you do not have Optmum you can contact Aptech to obtain a copy.
I do have the Optmum module installed and I do have the gradient.src file, but strangely enough, it is still not working.
I think there is something wrong with the Optmum installation. To see if GAUSS can find the gradient.src file, try running this file by entering:
from the command prompt. If it is installed correctly, GAUSS will be able to find that file without specifying the path. If that command does not return an error, then enter:
at the command prompt. This will list all of the variables in your GAUSS workspace along with GAUSS procedures. Check to see if gradfd is in the list returned by the show command.
Thank you very much for your help! I followed your suggestions, run the gradient.src file without any error, typed in "show" and gradfd was in the list of the variables. Still, something must be wrong...
The quick workaround is to #include the gradient.src by adding this line towards the top of your program file.
#include is pretty much like telling GAUSS to copy and paste another file into your program at that point.
Towards a Fix
Most likely the problem is in your Optmum library file. Library files in GAUSS are just text files that tell GAUSS what it can find (specific procedures, variables, etc) and where it can find them. If you open your optmum.lcg file, around line 58 or so, you should see:
gradient.src gradre : proc : 118 gradfd : proc : 188 gradcd : proc : 256
You can find this file in GAUSSHOME/lib. I am guessing, however, that you will see something like this instead:
C:\path\that\does\not\exist\gradient.src gradre : proc : 118 gradfd : proc : 188 gradcd : proc : 256
If that is the case, removing the incorrect path should resolve the issue.
I tried your quick turnaround, added
to the code. Then this one appears:
Undefined symbols: _grdh c:\gausslt9.0\src\gradient.ext(23) _grnum c:\gausslt9.0\src\gradient.ext(24) _grsca c:\gausslt9.0\src\gradient.ext(25) _grstp c:\gausslt9.0\src\gradient.ext(26)
I'm a bit confused. Not a regular GAUSS user, accidentally has to use it for my Master Thesis. Obviously the problem is now with this gradient.ext file.
Let me also add that I opened my optmum.lcg file and this is everything I have there:
qnewton.src QNewton : proc : 90 _bfgs : proc : 157 qnewtonset : proc : 428 qnewton.dec _qn_RelGradTol : matrix : 23 _qn_MaxIters : matrix : 24 _qn_GradProc : matrix : 25 _qn_PrintIters : matrix : 26 _qn_ParNames : matrix : 27 _qn_RandRadius : matrix : 28 optmum2.src optmum : proc : 1 optmum.dec _op_ver : matrix : 21 _opalgr : matrix : 22 _opcoef : matrix : 23 _opdfct : matrix : 24 _opditer : matrix : 25 _opparnm : matrix : 26 _opstep : matrix : 27 _opshess : matrix : 28 _opfhess : matrix : 29 _opmbkst : matrix : 30 _opgtol : matrix : 31 _ophsprc : matrix : 32 _opgdprc : matrix : 33 _opgdmd : matrix : 34 _opmiter : matrix : 35 _opitdta : matrix : 36 _oprteps : matrix : 37 _opusrch : matrix : 38 _opdelta : matrix : 39 _opmxtry : matrix : 40 _opstmth : string : 41 _opmdmth : string : 42 _opkey : matrix : 43 _opmtime : matrix : 44 _opgrdh : matrix : 45 _opusrgd : matrix : 46 _opusrhs : matrix : 47
If that is the entire contents of your optmum.lcg file, then this is your problem. It is missing a few files and also has references to QNewton which should be in the regular GAUSS library (i.e. gauss.lcg). I am not sure where you got this, but it is not the standard Optmum library that Aptech distributes.
As I said, I'm a complete rookie. Second day dealing with the programme. What I've shown is what I have. Apparently there's something wrong with it and I'll have to continue working on it.
No offense intended at all, I was just pointing out that you are having the problem because someone gave you a hacked up version of Optmum.
As a matter of fact, I am a student and requested a free version of GAUSS Light (since it was mentioned on the website that students get this version at no cost) but I am still waiting for a reply. Anyways, I'm not going to use this programme regularly, it is just a code that I need to run for my Master Thesis.
Let's assume that I fixed my previous problems. But as it often happens with this kind of problem, it leads to another set of problems while running the code:
c:\gausslt9.0\src\datatran.src(170) : error G0276 : 'delif' : Illegal use of reserved word
c:\gausslt9.0\src\datatran.src(177) : error G0156 : 'x' : Illegal redefinition of procedure
c:\gausslt9.0\src\datatran.src(185) : error G0156 : 'e' : Illegal redefinition of procedure
Any suggestions on troubleshooting?
You should not need to use any of the procedures in datatran.src for what you are doing. Here are the first things that come to mind:
- Illegal redefinition errors can often be solved by using the new command at the top of the program. GAUSS will not allow you to have a procedure and a variable with the same name at the same time. If you run a program with a variable named beta and then a program with a procedure named beta, you will get an 'illegal redefinition' error. new clears out your symbols so that you don't have left over symbols causing problems for a different program.
- Make sure that 'dataloop translation' is off. On GAUSS 9 it should be under the menu Configure->Preferences->Run Options. If 'dataloop translation' is on, then that could cause your program to use some of the code from datatran.src.
"Dataloop Translation" has always been switched off. The only thing that I'm doing is trying to run a readily available code that I downloaded. Then problems appear and I try to fix them one by one, at first it was optmum and gradfd, now it is this one. The problem does not seem to appear in the downloaded script, but in the very functions that are integrated in Gauss (as in datastran in this case) and this is the most frustrating part.
Thank you once again for your patience and suggestions!
And just to mention, "delif" is not used anywhere in the script, how come is it reserved?
And there are no "x" or "e" procedurs defined in my script either.