.:idlwrapper:home

From ADPAA
Revision as of 20:23, 5 December 2018 by Wilson-l (talk | contribs)
Jump to navigation Jump to search

IDL Virtual Machine Wrapper

This procedure can be used to make *.sav files from SODA IDL code so that they can be run using the IDL virtual machine without an IDL license. These files can be found in ${ADPAA_DIR}/src/linkage_soda. This directory will contain the following files (some of which will need to be created), where script_name is the name of the program (and generally matches the directory name): script_name (a bash script that can be used to run the IDL code, whether in licensed IDL or the IDL virtual machine), script_name_compile.idl, script_name_recompile.idl, create_script_name_sav_file, create_script_name_sav_file.idl, and any *.pro files that are used in the execution of the program, including the start script that is generally named start_script_name.pro and any modules specifically needed for the execution of this program.

IDL Wrapper Code

To produce a wrap around code it is necessary to identify which program is being modified to produce the new program. For simplicity and the sake of this example, assume the program being modified is old_program and the program being produced is titled new_program.

  • Create directory for new_program.
        ex. mkdir /usr/local/ADPAA/Level_2/new_program
  • Copy all needed files from old_program into the new_program directory. Files of particular interest are:
 old_program
 old_program_compile.idl
 old_program_recompile.idl 
 start_old_program.
  • The old_program file must be modified.
  1. Make sure the name of the copied file is changed to new_program.
  2. Edit new_program by changing all instances of old_program to new_program.
  3. Modify the new_program comment section and meta-data appropriately.
  4. Make sure the code calls new_program_compile.idl
  • Create new_program_compile.idl
  1. Copy old_program_compile.idl to new_program directory and rename it.
    * ex. cp /usr/local/ADPAA/src/Level2/old_program/old_program_compile.idl/usr/local/ADPAA/src/Level2/new_program/new_program_compile.idl
  2. Edit new_program_compile.idl using the same directions followed previously in step 2 of modifying old_program.
  3. Edit new_program_compile.idl comments and header information appropriately.
  4. Make sure the code calls new_program_recompile.idl and START_NEW_PROGRAM.
  • Modify new_program_recompile.idl
  1. Copy old_program_recompile.idl to new_program directory and rename it.
    * ex. cp /usr/local/ADPAA/src/Level2/old_program/old_program_recompile.idl/usr/local/ADPAA/src/Level2/new_program/new_program_recompile.idl//
  2. Modify code by changing instances where old_program exists with new_program.
  3. This specific subroutine is responsible for compiling all IDL code used by the new_program.
  4. This subroutine consists primarily of .rnew lines and one .run line. Remove each of them and look in the new_program directory. For every *.pro file, type a .rnew line and list the files alphabetically. Also make sure a .run start_new_program line is present at the end of the program. This will be the next program to be edited.
  • Repeat above procedure regarding the deleting of all instances where old_program appears and change it to new_program. Make sure all files called by START_NEW_PROGRAM are modified appropriately.
  • Test and debug new_program.