(lines in between '=====*' to be executed) The tdi wrapper uses the shared library and the c_wrapper routine first created for the idl interface. (Note that for the c_wrapper it was decided to use long integer and double for real, thus in TDI one should also force these for inputs/outputs) The shared library is obtained for example from: ======================================================================= cd ../interpos_libs make interposgfortran_cwrapper ======================================================================= which creates the file ./gfortran_cwrapper/libinterposgfortran_cwrapper.so (note the file in gfortran_libs does not contain the c_wrapper routine) Further help for the inputs can be ontained at: http://spc.epfl.ch/interpos Series of test cases are also found in ../idl/test_idl_interpos_all_cases.pro which could be "translated" into a tdi fun test case relatively as well (to be done) At this stage we start from the interface provided by B. Duval, which consists of: c_wrapper_to_interpos.fun (the tdi function to call the c_wrapper for all cases) interpos.fun (the tdi function to be called by the users. At this stage working for a few cases, to be extended) The ReadME.bpd file is the original file to explain how to test this on the lac machines at SPC-EPFL but should be translatable everywhere. The main generic steps are provided here: To see the .fun add the local directory for example: ======================================================================= export MDS_PATH="$MDS_PATH;." with .csh: setenv MDS_PATH $MDS_PATH';.' ======================================================================= To add the shared library: ======================================================================= export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../interpos_libs/gfortran_cwrapper with .csh: setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH':../interpos_libs/gfortran_cwrapper' ======================================================================= (you could check interpos is included with: ldconfig -v | grep -e interpos) (or: nm ../interpos_libs/gfortran_cwrapper/libinterposgfortran_cwrapper.so | grep -e 'c_wra\|interp') Now test with tdi: ======================================================================= 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=interpos(_xin,_yin) _xout=[0.1,0.2,0.22,0.3,0.34,0.6,0.5,0.66,0.7]; _yout=interpos(_xin,_yin,0.001d0,_xout) =======================================================================