PROCEDURE install_math_library (
  status)

"  This procedure installs one of two  mlf$librarys depending on
"  the processor model number.  A special math library has been
"  created for the CYBER 2000s.   The list of model
"  numbers of vector processors was taken from
"  PMT$PROCESSOR_MODEL_NUMBER deck.  There is a note in that
"  deck to update this procedure if the list changes.

VAR
  command_file: file = $local//$name($unique)
  high_cycle: integer
  ignore_status: status

  cmml_library: file
  cmml_file: file
  local_status: status
  model_number: string

  name_cmml_file: name = mlf$library
  name_cmml_2000: name = mlf$library_2000
  name_cmml_180: name = mlf$library_180

  rav$installation_defaults: (XREF) rat$installation_defaults
  rav$installation_environment: (XREF) rat$installation_environment
  rav$subproduct_information: (XREF) rat$subproduct_information


VAREND


  install_block: ..
    BLOCK

"  Install for both correction and release.

  model_number = $processor(model_number, 0)
  IF (model_number = '20V1') OR (model_number = '20S1') OR (model_number = '20U1') THEN
    " This is a math library for the CYBER 2000.
    cmml_library = ..
      rav$subproduct_information.actual_installation_path//name_cmml_2000
  ELSE
    " This is the math library for the CYBER 180.
    cmml_library = ..
      rav$subproduct_information.actual_installation_path//name_cmml_180
  IFEND

  IF NOT $file(cmml_library permanent) THEN
    local_status = $status(FALSE, 'PF', pfe$unknown_permanent_file, $string(cmml_library))
    EXIT install_block WHEN NOT local_status.normal
  IFEND

  cmml_file = ..
    rav$subproduct_information.actual_installation_path//name_cmml_file

  $system.put_line l=' Installing '//$string(cmml_file) o=$job_log
  install_file f=cmml_library t=cmml_file status=local_status
  EXIT install_block WHEN NOT local_status.normal

  $system.create_file_permit f=cmml_file g=public am=(read execute) ..
    sm=(read execute)

  BLOCKEND install_block

  EXIT procedure WITH local_status WHEN NOT local_status.normal

PROCEND install_math_library
