Linking in a new memory segment

The programs which loads the memory segments are NODAL_FUN & NODAL_FUN2 & NODAL_INIT.

Then the env NODAL_INIT has to be update in the .cshrc file. These files should only be modified by the controls group.

An example on writing a global nodal function in a already created memory segment.

If you plan to do this contact Daffyd or John before you try.

"eablock" is special and cannot be changed in this way.

"zfuns" is the normally used for testings.

a) Login as spsea ( the bash shell is best setup at the moment).

b) Change to the /vol2/u1/spsea/noda dir. This is a local for each computer.

c) Set the env NODAL_INIT to null.

  1. bash export NODAL_INIT=""
  2. tcsh/csh setenv NODAL_INIT

d) Then start the nodal. You will get "NON existent name" for login this is normal.

  1. >C NODAL version 1.1 Mar 24 1995 (CERN SL)
  2. >
  3. >
  4. >NON existent name
  5. >login
  6. > ^

How lets load in the HFUNS

  1. >ldef HFUNS
  2. >lisd
  3. AFCDAT 1032 array integer(1024,1) (16 bits short)
  4. ASADD 168 Define-Call (R-a,V-s)
  5. ..
  6. XWCDF5 1728 Define-Call (R-event,V-nword,V-nxwcd,R-ns,R-profd,R-profs)
  7. defined functions, using 28744 words out of 32736

Then open the XWCDF5 function.

  1. >open XWCDF5
  2. >li 99
  3. 99.10 $s nodlin(99.2)='% Last modification 'date'. DAFYDD'
  4. 99.20 % Last modification 1995-04-24-12:33:50. DAFYDD
  5. 99.30 def-c xwcdf5(r-event,v-nword,v-nxwcd,r-ns,r-profd,r-profs)
  6. 99.40 sdef(slsrv1)/user/spsea/nodal/HFUNS
  7. 99.50 erase 99

The function is saved on the slsrv1 not the local computer(Though this may change to eanorth). The file is then transfered on the wreboot of nodal to the local computer.

  1. >ed 99.3
  2. 99.30 def-c samuel(v-x,r-y,s-s)
  3. >
  4. >erase 10 12 13 14 15 98
  5. >li
  6. 99.10 $s nodlin(99.2)='% Last modification 'date'. DAFYDD'
  7. 99.20 % Last modification 1995-04-24-12:33:50. DAFYDD
  8. 99.30 def-c samuel(v-x,r-y,s-s)
  9. 99.40 sdef(slsrv1)/user/spsea/nodal/HFUNS
  10. 99.50 erase 99

Enter in the new code.

  1. >10.9 end
  2. >10.1 t!x
  3. >10.2 se y=5;t!y
  4. >10.3 t!s
  5. >98.1 Arguments
  6. >98.2 X Input value
  7. >98.3 Y Input or output array or output variable
  8. >98.4 S string
  9. >li
  10. 10.10 t!x
  11. 10.20 se y=5;t!y
  12. 10.30 t!s
  13. 10.90 end
  14. 98.10 Arguments
  15. 98.20 X Input value
  16. 98.30 Y Input or output array or output variable
  17. 98.40 S string
  18. 99.10 $s nodlin(99.2)='% Last modification 'date'. DAFYDD'
  19. 99.20 % Last modification 1995-04-24-14:38:46. DAFYDD
  20. 99.30 def-c samuel(v-x,r-y,s-s)
  21. 99.40 sdef(slsrv1)/user/spsea/nodal/HFUNS
  22. 99.50 erase 99
  23. >do 99

Reason for the erase is you can only do one save pre open.

Then exit from nodal, and do a wreboot of nodal and nodals.

  1. >wreboot -N nodal
  2. wreboot: wait up to 15 secs for su spsea -c "unsetenv NODAL_INIT;./nodal run
  3. /user/spsea/nodal/NODAL_FUNC" /usr/tmp/FUNC.log 2>
  4. wreboot: nodal pid wreboot: nodal started with root root permissions
  5. wreboot: su spsea -c "unsetenv NODAL_INIT;./nodal run /user/spsea/nodal/NODAL_FUNC"
  6. /usr/tmp/FUNC.log 2> started
  7. >wreboot -N nodals
  8. wreboot: process "nodals" killed
  9. wreboot: process "nodals" killed
  10. wreboot: ./nodals -s /user/spsea/nodal/NODAL_INIT started

Now startup nodal again

  1. C NODAL version 1.1 Mar 24 1995 (CERN SL)
  2. >
  3. >NON existent name
  4. login

Because the NODAL_INIT is set to "", all the define function have not being loaded.

  1. >ldef HFUNS
  2. >samuel
  3. argument list error
  4. samuel
  5. ^
  6. >set y=1;$set ss="hello"
  7. >samuel(6,y,ss)
  8. 6
  9. 5
  10. hello

J. Fullerton