全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Gauss专版
3317 1
2012-04-14
skip navigation, site map







CISER Computing

Systems

Assistance

Statistical Software





Q: How do I add a user defined library and *.src file on the computing nodes? A: Follow these instructions:   
Step1: Edit gauss.cfg and user.lcg
Step2: Create an environmental variables, GAUSS70_CFG
Step3: (Optional) Test using "example.src"

By Jiyoun An, CISER Computing Helpdesk Consultant, 10/18/2006
We appreciate that Stephen D. Younger helped us to know this method.

Step1: Edit gauss.cfg and user.lcg
1) Create directories in the followings:
u:\userXX\your username\mygauss
u:\userXX\your username\mygauss\lib
u:\userXX\your username\mygauss\myprocs
For example,
u:\user2\ja256\mygauss
u:\user2\ja256\mygauss\lib
u:\user2\ja256\mygauss\myprocs


Then, copy .src file(that you have downloaded or created) in a path,
u:\userXX\your username\mygauss\myprocs
For example,  let’s say you have created example.src file.  
Then copy the file in u:\user2\ja256\mygauss\myprocs

2) Go to Start->All Programs->GAUSS7.0->GAUSS7.0 Directory

3) Copy all files in ~\GAUSS7.0\lib and paste them in a path, u:\userXX\your username\mygauss\lib

4) Copy gauss.cfg in ~\GAUSS7.0 and paste the file in a path, u:\userXX\your username\mygauss

5) Open u:\userXX\your username\mygauss\gauss.cfg with text editor(ex.textpad or notepad).  
1. src_path line,
type “ ;u:\userXX\your username\mygauss\myprocs “
2. lib_path line,
replace “ $(GAUSSDIR)\lib “ as “ u:\userXX\your username\mygauss\lib”
for example,

NOTE: You can change other lines in gauss.cfg file for your convenience.  For example, if you change
the save_path as u:\userXX\your username\mygauss\save then all output files will be saved in that directory.
6) Open u:\userXX\your username\mygauss\lib\user.lcg with text editor(ex.textpad or notepad)
Then, edit ~\lib\user.lcg to include reference to your new .src file and the procedures in it.
For example, I have example.src file with a roots procedure that generate roots.  Then, I put the
following two lines in user.lcg.
u:\user2\ja256\gauss\myprocs\example.src
   roots:proc


Step2: Create an environmental variable, GAUSS70_CFG

Important Note: GAUSS70_CFG redirects Gauss to your own directories. But because it is an

environmental variable specific to the computing node you are using, you will need to create GAUSS70_CFG

again when you use other computing nodes.

1) Go to Start->My computer->Right click->Properties


2) Left click on Properties->Go to Advanced Tab->Click Environment Variables

3) Click New on the Advanced Tab

4) Type
Variable name: GAUSS70_CFG
Variable value: u:\userXX\username\user defined folder
                         (ex. U:\user2\ja256\mygauss)

5) Click OK

Step3: How to test using example.src
1) Use any text editor to create a file: "example.src" with the following text, and place it in u:\userXX\your username\mygauss\myprocs
proc (2)=roots(a,b,c);
local w, r1, r2;
w=sqrt(b^2-4*a*c);
r1=(-b+w)/(2*a);
r2=(-b-w)/(2*a);
retp(r1,r2);
endp;

2) Type the following two lines in u:\userXX\your username\gauss\lib\user.lcg
u:\userXX\your username\gauss\myprocs\example.src
   roots:proc

3) Open Gauss.
In Command Input-Output window, type
» library user;
» roots(1,2,3);
Then, you will get

      -1.0000000 +        1.4142136i

      -1.0000000 -        1.4142136i




Now, you have successfully added a user defined library and example.src file on a computing node.

Search CISER  









391 Pine Tree Road
Ithaca, NY 14850

Voice: (607) 255-4801
Fax: (607) 255-9353

Send Email to CISER
Copyright © 1997-2012 Cornell Institute for Social and Economic Research
Site Map   


This page was last updated on April 10, 2012




































二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-4-15 10:16:01
mark~会用到~感谢分享~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群