.. index::
   single: Error messages
   single: Error

Most frequent error messages found in |molcas|
==============================================

Due to the large number of systems where the |molcas| package is
executed and the large number of options included in each of
the programs it is not possible to compile here all the possible
sources of errors and error messages occurring in the calculations.
The |molcas| codes contain specific error message data basis where
the source of the error and the possible solution is suggested.
Unfortunately it is almost impossible to cover all the possibilities.
Here the user will find a compendium of the more usual errors
showing up in |molcas| and the corresponding error messages.

Many of the error messages the user is going to obtain are specific
for the operative system or architecture being used.
The most serious ones are in most of cases
related with compiler problems, operative system incompatibilities,
etc. Therefore the meaning of this errors must be checked in the proper
manuals or with the computer experts, and if they are characteristic
only of |molcas|, with |molcas| authors. The most common, however,
are simple mistakes related to lack of execution or reading
permission of the shell scripts, |molcas| executable modules, etc.

In the following the most usual errors found in |molcas| are listed.

.. index::
   single: Error; molcas not found

* The shell is unable to find the command :command:`molcas`.
  The message in this case is, for instance: ::

    molcas:  not found

  The solution is to add into the :variable:`PATH` the location of molcas driver script.

  .. index::
     single: Error; MOLCAS undefined

* If the |molcas| environment is not properly installed the
  first message showing up in the default error file is: ::

    ***
    *** Error: Could not find molcas driver shell
    *** Currently MOLCAS=

  Typing a command :command:`molcas`, you can check which molcas
  installation will be used. Check the value of the variable :variable:`MOLCAS`,
  and define it in order to point to the proper location of molcas installation.

  .. index::
     single: Error; ENV undefined

* Environment is not defined

  An attempt to run an executable without molcas driver scripts gives
  an error: ::

   Usage: molcas module_name input

* A call for a program can find problems like the three following ones: ::

    Program NNNN is not defined

  An error means that requested module is missing or the package is not installed.

  .. index::
     single: Error; Input file not found

* When the input file required for a |molcas| program is not
  available, the program will not start at all and no output
  will be printed, except in the default error file where the
  following error message will appear: ::

    Input file specified for run subcommand not found : seward

  .. index::
     single: Error; RUNFILE

* All the codes communicate via file :file:`RUNFILE`, if for a some reason
  the file is missing or corrupted, you will get an error ::

    ***    Record not found in runfile

  The simple solution --- restart seward to generate proper :file:`RUNFILE`.

  .. index::
     single: Error; ONEINT
     single: Error; ORDINT

* All the codes need integral files generated by :program:`SEWARD` in
  files :file:`ONEINT` and :file:`ORDINT`.
  Even the direct codes need the one-electron integrals stored
  in :file:`ONEINT`. The most common problem is then that a program
  fails to read one of this files because :program:`SEWARD` has not
  been executed or because the files are read in the wrong address.
  Some of the error messages found in those cases are listed here.

  In the :program:`SCF` module, the first message will appear when
  the one-electron integral file is missing and the second when
  the two-electron integral file is missing: ::

    Two-electron integral file was not found!
     Try keyword DIRECT in SEWARD.

  .. index::
     single: Error; Insufficient memory

* |molcas| use dynamical allocation of memory for temporary arrays.
  An error message "Insufficient memory" means that requested value
  is too small --- you have to specify :variable:`MOLCAS_MEM` variable and restart your
  calculation.

  .. index::
     single: Error; memory allocation

* if user ask to allocate (via :variable:`MOLCAS_MEM`) an amount of memory,
  which is large than possible on this computer, the following error message
  will be printed. ::

    MA error: MA_init: could not allocate 2097152152 bytes
    The initialization of the memory manager failed ( iRc=  1 ).

  .. index::
     single: Error; input error

* An improper input (e.g. the code expects to read more numbers, than
  user specified in input file) will terminate the code with errorcode 112.

  .. index::
     single: Error; Disk address problems
     single: Error; I/O problems

* Input/Output (I/O) problems are common, normally due to insufficient
  disk space to store the two-electron integral files or some of the
  intermediate files used by the programs. The error message would depend
  on the operative system used. An example for the :program:`SCF` is
  shown below: ::

    *******************************************************************************
    *******************************************************************************
    ***                                                                         ***
    ***                                                                         ***
    ***    Location: AixRd                                                      ***
    ***    File: ORDINT                                                         ***
    ***                                                                         ***
    ***                                                                         ***
    ***    Premature abort while reading buffer from disk:                      ***
    ***    Condition: rc != LenBuf                                              ***
    ***    Actual   :                0!=          262144                        ***
    ***                                                                         ***
    ***                                                                         ***
    *******************************************************************************
    *******************************************************************************

  The error indicates that the file is corrupted, or there is a bug in the
  code.

* Sometimes you might experience the following problem with :program:`GEO`/:program:`HYPER`
  run: ::

    Quaternion tested
    mat. size =     4x    1
     -0.500000000
      0.500000000
     -0.500000000
      0.000000000
    ###############################################################################
    ###############################################################################
    ###                                                                         ###
    ###                                                                         ###
    ###    Location: CheckQuater                                                ###
    ###                                                                         ###
    ###                                                                         ###
    ###                                                                         ###
    ###    Quaternion does not represent a rotation                             ###
    ###                                                                         ###
    ###                                                                         ###
    ###############################################################################
    ###############################################################################

  The error indicates that you need to rearrange the Cartesian coordinates
  (atoms) of one or another fragment.

.. .. _TUT\:sec\:flow_all:

   |molcasversion| Flowchart
   -------------------------

   .. figure:: flow-all.*
      :name: fig:flow_all
      :width: 75%
      :align: center

      Program module dependencies flowchart for |molcas|. Shadow boxes represent optative modules to be installed independently.
