GAUSS runtime module

Hello,

 

I  want to run a program in GRTM. When I am compiling  my main program, what command I should use there to call a number of other files. Here are the codes for my main program file. Do I have to attach the files such as staval_oil_stock.prn, data_new. Txt, when I am sending someone to run mainprogram.g.gss file in GRTM?

----------------------------------------------------------------------------------------------------------------------------------------

new;

totalobs=512;                    n=2;      lags=12;         printall=1;   lagsla=2;

 

 

starfile="c:\\laptop\\Oil_Stock_Shock\\strucgarchm\\stval_oil_stock.prn";

 

load guess0[65,1] =^starfile;   

datafile="c:\\laptop\\Oil_Stock_Shock\\olsvar\\data_new.txt";

 

library maxlik,pgraph;

graphset;

#include maxlik.ext;

 

#include C:\laptop\Oil_Stock_Shock\strucgarchm\prc\global_no_scale.prc;

#include C:\laptop\Oil_Stock_Shock\strucgarchm\prc\indata.prc;

#include C:\laptop\Oil_Stock_Shock\strucgarchm\prc\MGARCHM2_two_variables.prc;

_max_MaxIters=1000;

{e,p,t,x,y} = indata(totalobs,n,lags);

data = y~x;

{guess,l,gradi,cov,retcode} = maxlik(data,0,&nloglike,guess0);

format/m1/rd 20,15;

print guess;

call maxprt(guess,l,gradi,cov,retcode);

end

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

1 Answer



0



When distributing a compiled file for someone else to run with the GAUSS Runtime Module (GRTM):

  1. You will need to give them any data files that the program uses. In the code from the original post, it looks like stval_oil_stock.prn and data_new.txt are data files that will need to be distributed to person running the code with the GRTM.
  2. Any full-paths that are in your code will also be in the code of the compiled file that you give to the person running the GRTM. So if you leave the code as it is, the file stval_oil_stock.prn will have to be located in the directory C:\laptop\Oil_Stock_Shock\strucgarchm. I would recommend temporarily removing all path references, so that the files are all loaded from the current working directory when you compile the file for the GRTM user.
  3. The GAUSS code that you send to be run on the GRTM will be a compiled GAUSS file (.gcg). You compile a file with the GAUSS compile command. For example, you could make a compiled file from the GAUSS example file ols.e with this command:

    compile ols.e ols;
    

    which will create a new file named ols.gcg in your GAUSS examples directory.

  4. Any files that are #included do NOT need to be redistributed. They will be inside the compiled GAUSS file.
  5. GAUSS compiled files are platform specific. A .gcg file compiled on Windows 64-bit will only run with a Windows 64-bit version of the GRTM. A Mac .gcg file will only run with the Mac GRTM, etc.

aptech

1,773

Your Answer

1 Answer

0

When distributing a compiled file for someone else to run with the GAUSS Runtime Module (GRTM):

  1. You will need to give them any data files that the program uses. In the code from the original post, it looks like stval_oil_stock.prn and data_new.txt are data files that will need to be distributed to person running the code with the GRTM.
  2. Any full-paths that are in your code will also be in the code of the compiled file that you give to the person running the GRTM. So if you leave the code as it is, the file stval_oil_stock.prn will have to be located in the directory C:\laptop\Oil_Stock_Shock\strucgarchm. I would recommend temporarily removing all path references, so that the files are all loaded from the current working directory when you compile the file for the GRTM user.
  3. The GAUSS code that you send to be run on the GRTM will be a compiled GAUSS file (.gcg). You compile a file with the GAUSS compile command. For example, you could make a compiled file from the GAUSS example file ols.e with this command:

    compile ols.e ols;
    

    which will create a new file named ols.gcg in your GAUSS examples directory.

  4. Any files that are #included do NOT need to be redistributed. They will be inside the compiled GAUSS file.
  5. GAUSS compiled files are platform specific. A .gcg file compiled on Windows 64-bit will only run with a Windows 64-bit version of the GRTM. A Mac .gcg file will only run with the Mac GRTM, etc.

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.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy