http://wwwrsphysse.anu.edu.au/~bdb112/h-1nf/mdsplus/linux_mdsplus_prl.txt Usage instructions for Linux MDSPlus - e.g. from pr32. All examples in bash shell. Simple example: ================ export LD_LIBRARY_PATH=/usr/local/mdsplus/lib ## shouldn't be needed, substitute appropriate MDSPLUS directory idl ;; from here on, the commands are going to idl, not the shell mypath = '' ; uncomment the next line to put your own idl directories in ;mypath = '/users/prl/xxx112/idl' idl_local = getenv('PRL_MDS')+':'+getenv('IDL_LOCAL') ; local IDL routines e.g. gendata, qpmds !path=strjoin([mypath,idl_local,'/usr/local/mdsplus/idl',!path],':') ;test code - mdsvalue tests the TDI parser - doesn't need any databases print,mdsvalue('[1:3]') ;;;;;;;;;;; 1 2 3 ;; test that we can retrieve h1data - doesn't need any locally written software mdsconnect,'h1data::' mdsopen,'h1data',47767 help,mdsvalue('.operations:i_ring') ;;;;;;;;;;; FLOAT = Array[65001] ;; test with locally written software on an NFS share (also on a SMB ;; share //h1data/usrlocalprl (windows: net use M: \\\\h1data\\usrlocalprl ) ;; nfs: /usr/local/prl next line is typical /etc/fstab entry) h1data.anu.edu.au:/usr/local/prl /usr/local/prl nfs rw,hard,intr 0 0 ;; back to IDL - need /usr/local/prl/idl_local ahead of others (but your dirs should be first ;; This is included above in the similar line !path=strjoin([mypath,'/usr/local/prl/idl_local',!path],':') device,decomp=0,retain=2 & tek_color qpmds,'.operations:i_ring' ; a local routine - needs to be in path ================= h1data is the main h1 data repository (and server). To access data from prl32 (or any linux installation) you can use the "thick" client (efficient, fast) or the "thin" client "mdsconnect" (slower, more compatible, simpler/smaller installation). Thick client accessing data on h1data setenv,"h1data_path=h1data::" mdsopen,'h1data',56821 [currently this (setenv) will not work in windows - needs to be stored in the registry] Thin client accessing data on h1data mdsconnect,'h1data' mdsopen,'h1data',56821 [mdsdisconnect to go back to local data] ;Client accessing a distributed server (only for windows and linux not prlas2) ;Usually two different hosts. This should be the fastest of all. setenv,"h1data_path=h1data::/home/prl/h1data_sorted/0570/;prl32::/home/prl/h1data_sorted/0571/" Note: If you are reading this, it may be that it is because the "default" mdsplus installation is not working. You should check if there has already been a failed installation attempt - e.g. look at MDS_PATH. This environment variable itself is not a problem, but the IDL_PATH variable may also have some "old" mdsplus links in it which could interfere with a new installation. e.g. in tcsh do setenv|grep PATH ------------------------------------------------ MDS+ on linux Mon, 26 Nov 2001 12:47:39 +1100 Fenton Glass All, The following are the procedures I used to get MDS+ working on my linux box (bash) and phoebe (tcsh) For both shells: 1. Your idlinit.pro file should have something along the lines of: ;; BUT: beware of expand_path in your own directory if you have ;; multiple versions of a routine - IDL now won't work down the tree in any ;; particular order defpath = expand_path('+/usr/local/rsi/idl')+':' epath = expand_path('+$HOME/idl')+':' mdspath = '/usr/local/mdsplus/idl'+':' !path = defpath + epath + mdspath For bash: 1. Add to your .bashrc the following: # Source mdsplus definitions if [ -f /usr/local/mdsplus/setup.sh ]; then . /usr/local/mdsplus/setup.sh fi export LD_LIBRARY_PATH=/usr/local/mdsplus/lib # Set up some tree directories # default is /usr/local/mdsplus/trees h1data_path=/home/prl/bdb112/h1data attributes_path=/home/prl/bdb112/h1data fluctuations_path=/home/prl/bdb112/h1data spectroscopy_path=$HOME/data/spectroscopy electr_dens_path=/home/prl/bdb112/h1data export h1data_path attributes_path fluctuations_path spectroscopy_path electr_dens_path 2. You should note that the line 'spectroscopy_path=$HOME/data/spectroscopy' is set for a directory with my own local copy of data for that tree and the others are set for a default directory. For tcsh: 1. Add to your .cshrc the following: if ( -f /usr/local/mdsplus/setup.csh) source /usr/local/mdsplus/setup.csh 2. Add to your .login the following: # Set up some tree directories # default is /usr/local/mdsplus/trees setenv h1data_path /home/prl/bdb112/h1data setenv attributes_path /home/prl/bdb112/h1data setenv fluctuations_path /home/prl/bdb112/h1data setenv spectroscopy_path $HOME/data/spectroscopy setenv electr_dens_path /home/prl/bdb112/h1data setenv LD_LIBRARY_PATH /usr/local/mdsplus/lib 3. You should note that the line 'spectroscopy_path=$HOME/data/spectroscopy' is set for a directory with my own local copy of data for that tree and the others are set for a default directory. I think that is all. Let me know if it doesn't work. You should then be able to run stuff like 'traverser' from the command line and mdsplus routines in IDL. If you want your own local copy of some of the data (which you can feel free to corrupt safe in the knowledge that it's not the 'real thing') then you should ftp it from prlas2 to your machine. ---------------------Boyd's addition - Starting MDSPlus under IDL in tcsh ------- ;;;;;;; just paste this in to an xterm on prl32 ;;;;;;;;;;;;;;; ;;;;;;; the only change to your .login and .cshrc is to make sure you ;;;;;;; have bin/plasma.defs included Thick client example ==================== mypath = '' ; uncomment the next line to put your own idl directories in ;mypath = '/users/prldata2/grp_prl/xxx112/idl' idl_local = getenv('PRL_MDS')+':'+getenv('VAX_IDL_LOCAL') !path=strjoin([mypath,idl_local,'/usr/local/mdsplus/idl',!path],':') setenv,'h1data_path=prlas2::' ; this could be done before entering IDL setenv,'spectroscopy_path=prlas2::' ; this could be done before entering IDL mdsopen,'h1data',48458 print,mdsvalue('.log.machine:gas1_flow') ;;; ----------to get ne if john's analysis fails------- help,quick_ne(sh=47768) ;;; test boyd's MDS compatibility stuff shot, 47000 help,mdsplus_data('.operations:i_fault') help,gendata('.operations:i_fault')