CISER Computing
Systems
Assistance
- Helpdesk services
- Computing guide
- Computing FAQ
- Billing Information
- Workshop downloads
- Workshop schedule & registration
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\mygaussFor example,
u:\userXX\your username\mygauss\lib
u:\userXX\your username\mygauss\myprocs
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 change6) Open u:\userXX\your username\mygauss\lib\user.lcg with text editor(ex.textpad or notepad)
the save_path as u:\userXX\your username\mygauss\save then all output files will be saved in that directory.
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->Properties2) 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