## bpd, July 2016 #This is a path for Mdsplus (using the tdi interpreter) to call the interposOS library # # ** be careful, mdsplus uses ';' in paths and the rest of the world tends to use ':' # inline shell variable example: A=asd bash -c 'echo $A' # #Olivier wrote a glue routine for a C call to the fortran- The fortran was then converted into a shareable library together with the glue routine (See Olivier for how to use this routine from IDL) libinterposgfortran_idl.so #(uses entry point c_wrapper_to_interpos) # To check entries (on linux) type # /home/sauter/interpos_develop/interpos_libs/gfortran_idl/libinterposgfortran_idl.so nm libinterposgfortran_idl.so | grep -i interpos # To test the routine, you need to inform tdi to see the functions export MDS_PATH="$MDS_PATH;YourPath" #eg: export MDS_PATH="$MDS_PATH;/home/duval/fun" # You also need to ensure libinterposgfortran_idl.so is in the library ldconfig -v | grep -e interpos #if it is not in the path you can perform this (sh shell here) export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:YourLibraryPath #eg: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/sauter/interpos_develop/interpos_libs/gfortran_idl # simple test (if you have mdsplus packages installed) tdic _xin=dble([0.1,0.2,0.3,0.5,0.7,1.0]);_yin=dble([1.3,1,0.6,0.3,0.2,0.05]); _yout=interpos1(_xin,_yin) # in my simple example, if you want to specify the tension, you have to give an output grid _xout=[0.1,0.2,0.22,0.3,0.34,0.6,0.5,0.66,0.7]; _yout=interpos1(_xin,_yin,0.001d0,_xout) #complete example on a relatively happy Linux machine and an sh-shell (bash is good) . /usr/local/mdsplus/setup.sh LD_LIBRARY_PATH=/home/sauter/interpos_develop/interpos_libs/gfortran_idl MDS_PATH="$MDS_PATH;/home/duval/interTDI/" tdic