Autodocs for `Grid Engine SGEOBJ Library'


Next: , Up: (dir)


1 cull


1.1 list


1.1.1 lWriteElemXML

NAME
          lWriteElemXML() -- Write a element to monitoring level CULL_LAYER

SYNOPSIS
          void lWriteElemXML(const lListElem *ep)

FUNCTION
          Write a element to monitoring level CULL_LAYER a info message

INPUTS
          const lListElem *ep - element


1.1.2 lWriteElemXMLTo

NAME
          lWriteElemXMLTo() -- Write a element to file stream

SYNOPSIS
          void lWriteElemXMLTo(const lListElem *ep, FILE *fp)

FUNCTION
          Write a element to file stream in XML format

INPUTS
             const lListElem *ep  - element
             FILE *fp             - file stream
             int ignore_cull_name - ignore the specified cull name if != -1
          
          NOTE:
            MT-NOTE: is thread save, works only on the objects which are passed in


1.1.3 lWriteListXMLTo

NAME
          lWriteListXMLTo() -- Write a list to a file stream

SYNOPSIS
          void lWriteListXMLTo(const lList *lp, FILE *fp)

FUNCTION
          Write a list to a file stream in XML format

INPUTS
             const lList *lp   - list
             int nesting_level - current nesting level
             FILE *fp          - file stream
          
          NOTE:
            MT-NOTE: is thread save, works only on the objects which are passed in


2 cull_parse_util


2.1 cull_parse_jid_hold_list

NAME
          cull_parse_jid_hold_list() -- parse a jid list

SYNOPSIS
          int cull_parse_jid_hold_list(lList **lpp, const char *str)

FUNCTION
          parse a jid list of the fomat jid[,jid,...]

INPUTS
          lList **lpp - ST_Type result list
          const char *str   - input string to be parsed

RESULT
          int -

NOTES
          MT-NOTE: cull_parse_jid_hold_list() is MT safe


2.2 cull_parse_path_list

NAME
          cull_parse_path_list() -- parse a path list

SYNOPSIS
          int cull_parse_path_list(lList **lpp, char *path_str)

FUNCTION
          Parse a path list of the format: [[host]:]path[,[[host]:]path...]

INPUTS
          lList **lpp    - parsed list PN_Type
          char *path_str - input string

RESULT
          int - error code
             0 = okay
             1 = error

NOTES
          MT-NOTE: cull_parse_path_list() is MT safe


2.3 fprint_cull_list

NAME
          fprint_cull_list() --  Prints str and field

SYNOPSIS
          int fprint_cull_list(FILE *fp, char *str, lList *lp, int fi)

FUNCTION
          Prints str and field 'fi' (must be string) of
          every element of lList lp to file fp separated
          by blanks. If fp is NULL, "NONE" will be printed.

INPUTS
          FILE *fp  - a file
          char *str - a string name of list
          lList *lp - a list
          int fi    - an element from the list to be printed

RESULT
          int - 0 on success, -1 otherwise

NOTES
          MT-NOTE: fprint_cull_list() is MT safe


2.4 fprint_name_value_list

NAME
          fprint_name_value_list() -- Print name=value list of any type.

SYNOPSIS
          static int fprint_name_value_list(FILE *fp, char *name, lList
          *thresholds, int print_slots, int nm_name, int nm_strval, int
          nm_doubleval)

FUNCTION
          A list with name (String) and value (Double) CULL fields is printed
          to 'fp' in a name=value,name=value,... fashion. If print_slots is 0
          an entry with name "slots" is skipped. The 'name' is printed prior
          the actual list to 'fp'. In 'nm_name'/'nm_strval' the CULL names must
          be passed. Optionally a string representation of the value is printed
          if non-NULL and if 'nm_strval' is not -1.

INPUTS
          FILE *fp          - The file pointer
          char *name        - The name printed before the list
          lList *thresholds - The list
          int print_slots   - Flag indicating whether "slots" is skipped or not.
          int nm_name       - The CULL nm for the name (String).
          int nm_strval     - The CULL nm for the value (Double).
          int nm_doubleval  - If existing in the list the CULL nm for a string
                              representation of the value (String) or -1 otherwise.

RESULT
          int - 0 on success
                -1 on fprintf() errors

NOTES
          MT-NOTE: fprint_name_value_list() is MT safe


2.5 fprint_resource_utilizations

NAME
          fprint_resource_utilizations() -- Print a name=value list of type RUE_Type

SYNOPSIS
          int fprint_resource_utilizations(FILE *fp, char *name, lList *thresholds,
          int print_slots)

FUNCTION
          A RUE_Type list is printed to 'fp' in a name=value,name=value,...
          fashion. If print_slots is 0 an entry with name "slots" is skipped.
          The 'name' is printed prior the actual list to 'fp'.

INPUTS
          FILE *fp          - The file pointer
          char *name        - The name printed before the list
          lList *thresholds - The RUE_Type list.
          int print_slots   - Flag indicating whether "slots" is skipped or not.

RESULT
          int - 0 on success
                -1 on fprintf() errors

NOTES
          MT-NOTE: fprint_resource_utilizations() is MT safe


2.6 fprint_thresholds

NAME
          fprint_thresholds() -- Print a name=value list of type CE_Type

SYNOPSIS
          int fprint_thresholds(FILE *fp, char *name, lList *thresholds, int
          print_slots)

FUNCTION
          A CE_Type list is printed to 'fp' in a name=value,name=value,...
          fashion. If print_slots is 0 an entry with name "slots" is skipped.
          The 'name' is printed prior the actual list to 'fp'.

INPUTS
          FILE *fp          - The file pointer
          char *name        - The name printed before the list
          lList *thresholds - The CE_Type list.
          int print_slots   - Flag indicating whether "slots" is skipped or not.

RESULT
          int - 0 on success
                -1 on fprintf() errors

NOTES
          MT-NOTE: fprint_thresholds() is MT safe


2.7 sge_parse_hold_list

NAME
          sge_parse_hold_list() -- parse -h switch of qsub and qalter

SYNOPSIS
          int sge_parse_hold_list(char *hold_str, u_long32 prog_number)

FUNCTION
          Parse the hold flags of -h switches which can be used with
          qaub and qalter

INPUTS
          char *hold_str       - string tobe parsed
          u_long32 prog_number - program number

RESULT
          int - hold state
             -1 in case of error

NOTES
          MT-NOTE: sge_parse_hold_list() is MT safe


3 gdi


3.1 sge


3.1.1 PERM_Type

NAME
          PERM_Type -- CULL Permission element

SYNOPSIS
          PERM_Type
          +--- PERM_manager: 0 or 1 (1 means user has the right)
          +--- PERM_operator: 0 or 1 (1 means user has the right)
          +--- PERM_req_host: Name of destination host
          +--- PERM_req_username: Username on destination host
          +--- PERM_sge_username: Username on master host

FUNCTION
          This list is used for an SGE_GDI_PERMCHECK gdi request. The
          sge_gdi() function is called with SGE_DUMMY_LIST. The qmaster
          will fill the list with the permisson of the user who is calling.
          If a PERM_Type list is given to the sge_gdi() function the
          master is looking for the PERM_req_host value. The
          PERM_req_username and PERM_sge_username values are filled up with
          the correct user mapping names.
          
          sge_gdi_get_mapping_name() is using the SGE_GDI_PERMCHECK gdi
          request.

EXAMPLE
          permList = lCreateList("permissions", PERM_Type);
          ep = lCreateElem(PERM_Type);
          lAppendElem(permList,ep);
          lSetString(ep, PERM_req_host, requestedHost);
          
          alp = sge_gdi(SGE_DUMMY_LIST, SGE_GDI_PERMCHECK,  &permList,
                        NULL, NULL);
          
          if (permList != NULL) {
             ep = permList->first;
             if (ep != NULL) {
                mapName = lGetString(ep, PERM_req_username );
             }
          }

SEE ALSO


4 japi


4.1 –JJAT_Type

NAME
          JJAT_Type - JAPI array task

ELEMENTS
          SGE_ULONG(JJAT_task_id)
             array task id
          
          SGE_ULONG(JJAT_stat)
             stat information provided by japi_wait()
          
          SGE_LIST(JJAT_rusage)
             resource usage information provided by japi_wait()
          
          SGE_STRING(JJAT_failed_text)
             printable error text describing reason of job error

FUNCTION
          CULL element holding per job information about JAPI session


4.2 –JJ_Type

NAME
          JJ_Type - JAPI job

ELEMENTS
          SGE_ULONG(JJ_jobid)
             JAPI jobid
          
          SGE_ULONG(JJ_type)
             Job type - analoguous to JB_type
          
          SGE_LIST(JJ_finished_tasks, JJAT_Type)
             list of finished job tasks
          
          SGE_LIST(JJ_not_yet_finished_ids, RN_Type)
             id's of not yet finished tasks
          
          SGE_LIST(JJ_started_task_ids, RN_Type)
             id's of started tasks

FUNCTION
          CULL element holding per job information about JAPI session


4.3 –NSV_Type

NAME
          NSV_Type - Named string vector

ELEMENTS
          SGE_STRING(NSV_name)
             name of the string vector
          
          SGE_LIST(NSV_strings)
             strings of this string vector

FUNCTION
          CULL element implementing DRMAA vector job template attributes


5 lib


5.1 sgeobj


5.1.1 debit_consumable

NAME
          rc_debit_consumable() -- Debit/Undebit consumables from resource container

SYNOPSIS
          int
          rc_debit_consumable(lListElem *jep, lListElem *ep, lList *centry_list,
                              int slots, int config_nm, int actual_nm,
                              const char *obj_name)

FUNCTION
          Updates all consumable actual values of a resource container
          for 'slots' slots of the given job. Positive slots numbers
          cause debiting, negative ones cause undebiting.

INPUTS
          lListElem *jep       - The job (JB_Type) defining which resources and how
                                 much of them need to be (un)debited
          
          lListElem *ep        - The resource container (global/host/queue)
                                 that owns the resources (EH_Type).
          
          lList *centry_list   - The global complex list that is needed to interpret
                                 the jobs' resource requests.
          
          int slots            - The number of slots for which we are debiting.
                                 Positive slots numbers cause debiting, negative
                                 ones cause undebiting.
          
          int config_nm        - The CULL field of the 'ep' object that contains a
                                 CE_Type list of configured complex values.
          
          int actual_nm        - The CULL field of the 'ep' object that contains a
                                 CE_Type list of actual complex values.
          
          const char *obj_name - The name of the object we are debiting from. This
                                 is only used for monitoring/diagnosis purposes.
          
          bool *just_check     - If != NULL do not do the actual debiting, but just
                                 check if debiting would exceed resources.
                                 Only makes sense for debiting (slots > 0).

RESULT
          Returns -1 in case of an error. Otherwise the number of (un)debitations
          that actually took place is returned. If 0 is returned that means the
          consumable resources of the 'ep' object has not changed.


6 libs


6.1 sge_obj


6.1.1 ar_get_event_from_string

NAME
          ar_get_event_from_string() -- converts a string to a event id

SYNOPSIS
          ar_state_event_t ar_get_event_from_string(const char *string)

FUNCTION
          Converts a human readable event string to the corresponding
          event if.

INPUTS
          const char *string - string

RESULT
          ar_state_event_t - the event id

NOTES
          MT-NOTE: ar_get_event_from_string() is not MT safe


6.2 sgeobj


6.2.1 ar_get_string_from_event

NAME
          ar_get_string_from_event() -- converts a state event to a string

SYNOPSIS
          const char * ar_get_string_from_event(ar_state_event_t event)

FUNCTION
          Converts a state event id to a human readable string.

INPUTS
          ar_state_event_t event - state event id

RESULT
          const char * - string

NOTES
          MT-NOTE: ar_get_string_from_event() is not MT safe


6.2.2 ar_state2dstring

NAME
          ar_state2dstring() -- writes the AR state as letter combination

SYNOPSIS
          void ar_state2dstring(ar_state_t state, dstring *state_as_string)

FUNCTION
          This function writes the given state of an advance reservation as a
          letter into the given dstring. The letter will be appended.

INPUTS
          ar_state_t state         - ar state
          dstring *state_as_string - dstring

RESULT
          void

NOTES
          MT-NOTE: ar_get_string_from_event() is MT safe


7 parse


7.1 sge_parse_jobtasks

NAME
          sge_parse_jobtasks() -- parse array task ranges

SYNOPSIS
          int sge_parse_jobtasks(lList **ipp, lListElem **idp, const char
          *str_jobtask, lList **alpp, bool include_names, lList *arrayDefList)

FUNCTION
           parses a job ids with or without task ranges following this pattern:
            Digit = '0' | '1' | ... | '9' .
            JobId = Digit { Digit } .
            TaskIdRange = TaskId [ '-' TaskId [  ':' Digit ] ] .
            JobTasks = JobId [ '.' TaskIdRange ] .
          
          in case of a job name, the task range has to be specified extra. This
          will be colleced in an extra list and handed in as the arrayDefList

INPUTS
          lList **ipp             - ID_Type List, target list
          lListElem **idp         - New ID_Type-Elem parsed from str_jobtask
          const char *str_jobtask - job id with task range or job name
          lList **alpp            - answer list
          bool include_names      - true: job names are allowed
          lList *arrayDefList     - in case of job names, a list of array taskes

RESULT
          int - -1 no valid JobTask-Identifier
                0 everything went fine
          

NOTES
          MT-NOTE: sge_parse_jobtasks() is MT safe


8 sge_advance_reservation


8.1 ar_list_locate

NAME
          ar_list_locate() -- locate an advance reservation by id

SYNOPSIS
          lListElem* ar_list_locate(lList *ar_list, u_long32 ar_id)

FUNCTION
          This function returns an AR object with the selected id from the
          given list.

INPUTS
          lList *ar_list - list to be searched in
          u_long32 ar_id - id of interest

RESULT
          lListElem* - if found the reference to the AR object, else NULL

NOTES
          MT-NOTE: ar_list_locate() is MT safe


8.2 ar_validate

NAME
          ar_validate() -- validate an advance reservation

SYNOPSIS
          bool ar_validate(lListElem *ar, lList **alpp, bool in_master)

FUNCTION
          Ensures a new AR has valid start and end times

INPUTS
          lListElem *ar   - the AR to check
          lList **alpp    - answer list pointer
          bool in_master  - are we in qmaster?
          bool is_spool   - do we validate for spooling?

RESULT
          bool - true if OK, else false

NOTES
          MT-NOTE: ar_validate() is MT safe


8.3 sge_ar_has_errors

NAME
          sge_ar_has_errors() -- Has AR errors?

SYNOPSIS
          bool sge_ar_has_errors(lListElem *ar)

FUNCTION
          Check if one of the reserved queues is in state where jobs can not be
          running

INPUTS
          lListElem *ar - advance reservation object (AR_Type)

RESULT
          bool - true if has errors
                 false if has no errors

NOTES
          MT-NOTE: sge_ar_has_errors() is MT safe


9 sge_answer


9.1 answer_list_has_status

NAME
          answer_list_has_status() -- status contains in list

SYNOPSIS
          bool answer_list_has_status(lList **answer_list, u_long32 status)

FUNCTION
          The function returns true if the "answer_list" contains at least
          one answer element with the given status

INPUTS
          lList **answer_list - AN_Type list
          u_long32 status     - expected status

RESULT
          bool - true or false

NOTES
          MT-NOTE: answer_list_has_status() is MT safe


9.2 answer_list_remove_quality

NAME
          answer_list_remove_quality() -- Remove elements from list

SYNOPSIS
          void answer_list_remove_quality(lList *alp, answer_quality_t quality)

FUNCTION
          The function removes all answer list elements with the given quality from
          the list.

INPUTS
          lList *answer_list       - AN_Type list
          answer_quality_t quality - quality value

RESULT
          void -

NOTES
          MT-NOTE: answer_list_remove_quality() is MT safe


10 sge_binding


10.1 binding_print_to_string

NAME
          binding_print_to_string() -- Prints the content of a binding list to a string

SYNOPSIS
          bool binding_print_to_string(const lListElem *this_elem, dstring *string)

FUNCTION
          Prints the binding type and binding strategy of a binding list element
          into a string.

INPUTS
          const lListElem* this_elem - Binding list element

OUTPUTS
          const dstring *string      - Output string which must be initialized.

RESULT
          bool - true in all cases

NOTES
          MT-NOTE: is_starting_point() is MT safe


11 sge_calendar


11.1 calendar_get_current_state_and_end

NAME
          calendar_get_current_state_and_end() -- generates the TODO orders

SYNOPSIS
          u_long32 calendar_get_current_state_and_end(const lListElem *cep, time_t
          *then, time_t *now)

FUNCTION
          It calles the routins to compute the current state and next change. The current
          state is than changed into todo orders.

INPUTS
          const lListElem *cep - (in) calendar (CAL_Type)
          time_t *then         - (out) next state change
          time_t *now          - (in) now

RESULT
          u_long32 - what to do? what is the current state

NOTES
          MT-NOTE: calendar_get_current_state_and_end() is MT safe


11.2 calendar_open_in_time_frame

NAME
          calendar_open_in_time_frame() -- check if calender is open in given time
          frame

SYNOPSIS
          bool calendar_open_in_time_frame(const lListElem *cep, u_long32
          start_time, u_long32 duration)

FUNCTION
          Returns the state (only open or closed) of a calendar in a given time
          frame

INPUTS
          const lListElem *cep - calendar object (CAL_Type)
          u_long32 start_time  - time frame start
          u_long32 duration    - time frame duration

RESULT
          bool - true if open
                 false if closed

NOTES
          MT-NOTE: calendar_open_in_time_frame() is MT safe


11.3 calender_state_changes

NAME
          calender_state_changes() -- calendar states and calendar state list

SYNOPSIS
          u_long32 calender_state_changes(const lListElem *cep, lList
          **state_changes_list, time_t *when)

FUNCTION
           Computes the current state and generates a calendar state list. Right now it
           only does it for the current state and the next state. But it could be extended
           to handle more states.
          
          Based on the shortcomings of the methods it is using, it has to check, wether they
          reported a state change and if not, call the methods again with a new time stamp. It
          is starting with now and goes into the future, based on the reported state changes.

INPUTS
          const lListElem *cep       - (in) calendar (CAL_Type)
          lList **state_changes_list - (out) a pointer to a list pointer (CQU_Type)
          time_t *when               - (out) when will the next change be, or 0
          time_t *now                - (in) should be NULL, or the current time
                                       (only for the test programm)

RESULT
          u_long32 - new state (QI_DO_NOTHING, QI_DO_DISABLE, QI_DO_SUSPEND)

NOTES
          MT-NOTE: calender_state_changes() is MT safe


11.4 compute_limit

NAME
          compute_limit() -- compute the next state change

SYNOPSIS
          static time_t compute_limit(bool today, bool active, const lList
          *year_time, const lList *week_time, const lList *day_time, const
          lListElem *now, bool *is_end_of_day_reached)

FUNCTION
           This function computes the next state change based on the three booleans:
           today, active, and is_full_day.
          
           There are some special calendar states, which result in special code to
           handle thus states. They are all special to the week calendar.
          
           - A week calendar can specify a range beyond the week borders. For example
             Wed-Mon. This will be broken down to two structures:
              - Wed-Sat (day 3 till 6)
              - Sun-Mon. (day 0 till 1)
             Since it is one range, the actual break down will look as follows:
              - Wed-Mon (day 3 till 8)
              - Sun-Mon (day 0 till 1)
             The first range, which is too big, allows us to recognize the whole range,
             thus we are not issuing a state change at 0 a.m. on Sunday but 0 a.m on
             Tuesday.
          
          - An other special case is a calendar, which disables a queue for a whole week.
            There is special code to recognize that.

INPUTS
          bool today                  - does the state change happen today?
          bool active                 - is a calendar entry active?
          const lList *year_time      - year_time structure or NULL, if week_time is set
          const lList *week_time      - week_time strucutre or NULL, if year_time is set
          const lList *day_time       - day_time changes, if the exist
          const lListElem *now        - a now cull representation
          bool *is_end_of_day_reached - (out) is the end of day reached?

RESULT
          static time_t - time of the next change or end of the day

NOTES
          MT-NOTE: compute_limit() is MT safe


11.5 extend_wday_range

NAME
          extend_wday_range() -- extend ranges over the week border....

SYNOPSIS
          static void extend_wday_range(lList *week_day)

FUNCTION
          extend the range over the one week border. The week ends on Sunday, but the
           range can go till Monday or longer. But the beginning till the end will never
           contain more than 7 days (a week).  This is needed!!

INPUTS
          lList *week_day - calendar list for a week

NOTES
          MT-NOTE: extend_wday_range() is MT safe


11.6 is_week_entry_active

NAME
          is_week_entry_active() -- computes the current queue state and the next change

SYNOPSIS
          static u_long32 is_week_entry_active(lListElem *tm, lListElem
          *week_entry, time_t *limit, int rec_count)

FUNCTION
          Computes the current queue state based on its calendar setting. It also figures
          out how long this state lasts and when the next change will be. The function
          for the next change has a short comming, that it will generate an state end, when
          the current day changes.
          Therefore this function calles itself recursivly, if such an event happens. It can
          only happen, when the callendar contains a state changes during a day. In Theory, it
          should not call itself more than 1 time. With the extra call, it should have found a
          new state change on the next day, or the day, when the next change comes.
          

INPUTS
          lListElem *tm         - TM_Type - represeting now (time)
          lListElem *week_entry - CA_Type - calendar entries for the week setup
          time_t    *limit      - next state changea (0, if there is no further state change)
          int       rec_count   - current recoursion level

RESULT
          static u_long32 - the current state

NOTES
          MT-NOTE: is_week_entry_active() is MT safe


11.7 is_year_entry_active

NAME
          is_year_entry_active() -- computes the current queue state and the next change

SYNOPSIS
          static u_long32 is_year_entry_active(lListElem *tm, lListElem
          *week_entry, time_t *limit)

FUNCTION
          Computes the current queue state based on its calendar setting. It also figures
          out how long this state lasts and when the next change will be. The function
          for the next change has a short comming, that it will generate an state end, when
          the current day changes.
          Therefore this function calles itself recursivly, if such an event happens. It can
          only happen, when the callendar contains a state changes during a day. In Theory, it
          should not call itself more than 1 time. With the extra call, it should have found a
          new state change on the next day, or the day, when the next change comes.
          
          This function has problem, when two calendar entries overlap themselfs and one has
          day changes, the otherone has not. It will report those day changes, even though there
          are none. It makse a mistake in figuring out, which calendar setting is the more important
          one.
          

INPUTS
          lListElem *tm         - TM_Type - represeting now (time)
          lListElem *week_entry - CA_Type - calendar entries for the week setup
          time_t *limit         - next state changea (0, if there is no further state change)

RESULT
          static u_long32 - the current state

NOTES
          MT-NOTE: is_week_entry_active() is MT safe


11.8 join_wday_range

NAME
          join_wday_range() -- join overlapping ranges

SYNOPSIS
          static void join_wday_range(lList *week_day)

FUNCTION
          A user can define overlapping ranges in the week calendar. This function
          will join them into one definition.

INPUTS
          lList *week_day - week calendar def. list

NOTES
          MT-NOTE: join_wday_range() is MT safe


12 sge_centry


12.1 load_formula_is_centry_referenced

NAME
          load_formula_is_centry_referenced() -- search load formula for centry reference

SYNOPSIS
          bool load_formula_is_centry_referenced(const char *load_formula, const
          lListElem *centry)

FUNCTION
          This function searches for a centry reference in the defined algebraic
          expression

INPUTS
          const char *load_formula - load formula expression
          const lListElem *centry  - centry to search for

RESULT
          bool - true if referenced
                 false if not referenced

NOTES
          MT-NOTE: load_formula_is_centry_referenced() is MT safe


12.2 map_consumable2str

NAME
          map_consumable2str() -- map to consumable string

SYNOPSIS
          const char * map_consumable2str(u_long32 op)

FUNCTION
          maps int representation of CONSUMABLE to string

INPUTS
          u_long32 op - CONSUMABLE_*

RESULT
          const char * - string representation of consumable definition

NOTES
          MT-NOTE: map_consumable2str() is not safe


12.3 validate_load_formula

NAME
          validate_load_formula()

SYNOPSIS
          bool validate_load_formula(lListElem *schedd_conf, lList
          **answer_list, lList *centry_list, const char *name)

FUNCTION
          The function validates a load formula string.

INPUTS
          const char *load_formula - string that should be a valid load formula
          lList **answer_list      - error messages
          lList *centry_list       - list of defined complex values
          const char*              - name (used for error messages)

RESULT
              bool - true if valid
                     false if unvalid
          
          MT-NOTE: is MT-safe, works only on the passed in data


13 sge_conf


13.1 clean_conf

NAME
          clean_conf() -- frees the whole master configuration

SYNOPSIS
          static void clean_conf(void)

NOTES
          MT-NOTE: clean_conf() is not MT safe, caller needs LOCK_MASTER_CONF as write lock


13.2 conf_update_thread_profiling

NAME
          conf_update_thread_profiling() -- enable/disable profiling for thread

SYNOPSIS
          void conf_update_thread_profiling(const char *thread_name)

FUNCTION
          Enables or disables profiling for thread(s) according to the actual
          global config, qmaster_params.
          
          If no thread name (NULL pointer) is given, profiling information of all
          threads is updated.
          If a name is given, all threads with that name are updated.

INPUTS
          const char *thread_name - thread name, NULL for all threads

NOTES
          MT-NOTE: conf_update_thread_profiling() is MT safe


13.3 merge_configuration

NAME
          merge_configuration() -- merge global and local configuration

SYNOPSIS
          int merge_configuration(lListElem *global, lListElem *local, lList **lpp)

FUNCTION
          Merge global and local configuration and set lpp list and
          set conf struct from lpp

INPUTS
          lListElem *global - global configuration
          lListElem *local  - local configuration
          lList **lpp       - target configuration

RESULT
          int - 0 success
               -2 no global configuration

NOTES
          MT-NOTE: merge_configuration() is MT safe


13.4 setConfFromCull

NAME
          setConfFromCull() -- set the master configuration from cull

SYNOPSIS
          static void setConfFromCull(lList *lpCfg)

FUNCTION
          set the master configuration from cull

INPUTS
          lList *lpCfg         - configuration list

NOTES
          MT-NOTE: setConfFromCull() is not MT safe, caller needs LOCK_MASTER_CONF as write lock


13.5 sge_show_conf

NAME
          sge_show_conf() -- in debug mode prints out the master configuration

SYNOPSIS
          void sge_show_conf()

NOTES
          MT-NOTE: sge_show_conf() is MT safe


14 sge_cqueue


14.1 cqueue_find_used_href

NAME
          cqueue_find_used_href() -- Finds used host references

SYNOPSIS
          bool
          cqueue_find_used_href(lListElem *this_elem,
                                lList **answer_list,
                                lList **href_list)

FUNCTION
          This function returns all host references in "href_list"
          for which attribute specific overwritings exist in the cqueue
          "this_elem".

INPUTS
          lListElem *this_elem - CQ_Type
          lList **answer_list  - AN_Type
          lList **href_list    - HR_Type

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: cqueue_find_used_href() is MT safe


14.2 cqueue_get_name_from_qinstance

NAME
          cqueue_get_name_from_qinstance() -- returns the cluster queue part of a queue

SYNOPSIS
          char* cqueue_get_name_from_qinstance(const char *queue_instance)

FUNCTION
          Returns a character pointer to a newly malloced string containing the cluster
          queue part of a queue instance name.
          
          The memory needs to be free'd by the caller

INPUTS
          const char *queue_instance - queue instance or cluster queue

RESULT
          char* - cluster queue name

NOTES
          MT-NOTE: cqueue_get_name_from_qinstance() is MT safe


14.3 cqueue_purge_host

NAME
          cqueue_purge_host() -- purge attributes from queue

SYNOPSIS
          bool cqueue_purge_host(lListElem *this_elem, lList **answer_list, lList
          *attr_list, const char *hgroup_or_hostname)

FUNCTION
          ???

INPUTS
          lListElem *this_elem           - cqueue list element
          lList **answer_list            - answer list
          lList *attr_list               - list with attributes to search for
                                           hgroup_or_hostname
                                           wildcards allowed
          const char *hgroup_or_hostname -  host group or hostname which should be purged

RESULT
          bool -
             true     - hostname found and purged
             false    - attribute or hostname not found

NOTES
          MT-NOTE: cqueue_purge_host() is not MT safe


15 sge_cqueue_verify


15.1 cqueue_verify_job_slots

NAME
          cqueue_verify_job_slots() -- verify the queue slots attribute

SYNOPSIS
          bool
          cqueue_verify_job_slots(lListElem *cqueue, lList **answer_list,
                                  lListElem *attr_elem)

FUNCTION
          Verifies if the slots attribute of a queue is in the expected range
          (0 .. MAX_SEQNUM). MAX_SEQNUM is 9999999.

INPUTS
          lListElem *cqueue    - The queue to verify.
          lList **answer_list  - answer list to report errors
          lListElem *attr_elem - the attribute to verify

RESULT
          bool - true on success, false on error

NOTES
          MT-NOTE: cqueue_verify_job_slots() is MT safe


15.2 cqueue_verify_memory_value

NAME
          cqueue_verify_memory_value() -- verify a queue memory attribute like h_vmem

SYNOPSIS
          bool
          cqueue_verify_memory_value(lListElem *cqueue, lList **answer_list,
                                  lListElem *attr_elem)

FUNCTION
          Verifies if a memory attribute of a queue is in the expected range
          (0 .. INFINITY) NONE is no allowed value.

INPUTS
          lListElem *cqueue    - The queue to verify.
          lList **answer_list  - answer list to report errors
          lListElem *attr_elem - the attribute to verify

RESULT
          bool - true on success, false on error

NOTES
          MT-NOTE: cqueue_verify_memory_value() is MT safe


15.3 cqueue_verify_time_value

NAME
          cqueue_verify_time_value() -- verify a queue time attribute like h_cpu

SYNOPSIS
          bool
          cqueue_verify_time_value(lListElem *cqueue, lList **answer_list,
                                  lListElem *attr_elem)

FUNCTION
          Verifies if a time attribute of a queue is in the expected range
          (0:0:0 .. INFINITY) NONE is no allowed value.

INPUTS
          lListElem *cqueue    - The queue to verify.
          lList **answer_list  - answer list to report errors
          lListElem *attr_elem - the attribute to verify

RESULT
          bool - true on success, false on error

NOTES
          MT-NOTE: cqueue_verify_time_value() is MT safe


16 sge_event


16.1 event_client_verify

NAME
          event_client_verify() -- verify an event client object

SYNOPSIS
          bool
          event_client_verify(const lListElem *event_client, lList **answer_list)

FUNCTION
          Verifies, if an incoming event client object (new event client registration
          through a GDI_ADD operation or event client modification through GDI_MOD
          operation is correct.
          
          We do the following verifications:
             - EV_id correct:
                - add request usually may only request dynamic event client id,
                  if a special id is requested, we must be on local host and be
                  admin user or root.
             - EV_name (valid string, limited length)
             - EV_d_time (valid delivery interval)
             - EV_flush_delay (valid flush delay)
             - EV_subscribed (valid subscription list)
             - EV_busy_handling (valid busy handling)
             - EV_session (valid string, limited length)
          
          No verification will be done
             - EV_host (is always overwritten by qmaster code)
             - EV_commproc (comes from commlib)
             - EV_commid (comes from commlib)
             - EV_uid (is always overwritten  by qmaster code)
             - EV_last_heard_from (only used by qmaster)
             - EV_last_send_time (only used by qmaster)
             - EV_next_send_time (only used by qmaster)
             - EV_sub_array (only used by qmaster)
             - EV_changed (?)
             - EV_next_number (?)
             - EV_state (?)

INPUTS
          const lListElem *event_client - ???
          lList **answer_list           - ???
          bool add                      - is this an add request (or mod)?

RESULT
          bool -

NOTES
          MT-NOTE: event_client_verify() is MT safe


17 sge_ja_task


17.1 ja_task_is_tightly_integrated

NAME
          ja_task_is_tightly_integrated() -- is this a tightly integrated job?

SYNOPSIS
          bool ja_task_is_tightly_integrated(const lListElem *ja_task)

FUNCTION
          Figures out, if a running ja task belongs to a tightly integrated
          parallel job.

INPUTS
          const lListElem *ja_task - the ja task to test

RESULT
          bool - true if it is a tightly integrated parallel job, else false

NOTES
          MT-NOTE: ja_task_is_tightly_integrated() is MT safe, the caller must
                   hold a read lock on the SGE_TYPE_PE list.


17.2 ja_task_verify

NAME
          ja_task_verify() -- verify a ja_task object

SYNOPSIS
          bool
          ja_task_verify(const lListElem *ja_task, lList **answer_list)

FUNCTION
          Verify correctness of a ja_task object.

INPUTS
          const lListElem *ja_task - the ja_task to verify
          lList **answer_list      - answer list to pass back error messages

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: ja_task_verify() is MT safe

SEE ALSO


17.3 ja_task_verify_execd_job

NAME
          ja_task_verify_execd_job() -- verify a ja_task object for execd

SYNOPSIS
          bool
          ja_task_verify_execd_job(const lListElem *ja_task, lList **answer_list)

FUNCTION
          Verify a ja_task object that has been sent to execd.

INPUTS
          const lListElem *ja_task - the ja_task object to verify
          lList **answer_list      - answer list to pass back error messages

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: ja_task_verify_execd_job() is MT safe

SEE ALSO


17.4 ja_task_verify_granted_destin_identifier

NAME
          ja_task_verify_granted_destin_identifier() -- verify a granted destination identifier

SYNOPSIS
          bool
          ja_task_verify_granted_destin_identifier(const lListElem *ep,
                                                   lList **answer_list)

FUNCTION
          Verify a single element of a granted destination identifier list
          (a granted queue with a certain number of slots).

INPUTS
          const lListElem *ep - the element to verify
          lList **answer_list - answer list to pass back error messages

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: ja_task_verify_granted_destin_identifier() is MT safe

SEE ALSO


17.5 ja_task_verify_granted_destin_identifier_list

NAME
          ja_task_verify_granted_destin_identifier_list() -- verify granted destination identifier list

SYNOPSIS
          bool
          ja_task_verify_granted_destin_identifier_list(const lList *gdil,
                                                        lList **answer_list)

FUNCTION
          Verify correctness of a granted destination identifier list being part
          of a scheduled ja_task.

INPUTS
          const lList *gdil   - the list to verify
          lList **answer_list - answer list to pass back error messages

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: ja_task_verify_granted_destin_identifier_list() is MT safe

SEE ALSO


18 sge_job


18.1 job_count_rescheduled_ja_tasks

NAME
          job_count_rescheduled_ja_tasks() -- count rescheduled tasks

SYNOPSIS
          static int job_count_rescheduled_ja_tasks(lListElem *job, bool count_all)

FUNCTION
          Returns number of rescheduled tasks in JB_ja_tasks of a job. The
          'count_all' flag can be used to cause a quick exit if merely the
          existence of rescheduled tasks is of interest.

INPUTS
          lListElem *job - the job (JB_Type)
          bool count_all - quick exit flag

RESULT
          static int - number of tasks resp. 0/1

NOTES
          MT-NOTE: job_count_rescheduled_ja_tasks() is MT safe


18.2 job_get_wallclock_limit

NAME
          job_get_wallclock_limit() -- Computes jobs wallclock limit

SYNOPSIS
          bool job_get_wallclock_limit(u_long32 *limit, const lListElem *jep)

FUNCTION
          Compute the jobs wallclock limit depending on requested h_rt, s_rt.
          If no limit was requested the maximal ulong32 value is returned

INPUTS
          u_long32 *limit      - store for the value
          const lListElem *jep - jobs ep

RESULT
          bool - true on success
                 false if no value was requested

NOTES
          MT-NOTE: job_get_wallclock_limit() is not MT safe


18.3 job_verify

NAME
          job_verify() -- verify a job object

SYNOPSIS
          bool
          job_verify(const lListElem *job, lList **answer_list)

FUNCTION
          Verifies structure and contents of a job object.
          As a job object may look quite different depending on its state,
          additional functions are provided, calling this function doing
          general tests and doing additional verification themselves.

INPUTS
          const lListElem *job - the job object to verify
          lList **answer_list  - answer list to pass back error messages
          bool do_cull_verify  - do cull verification against the JB_Type descriptor.

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: job_verify() is MT safe

BUGS
          The function is far from being complete.
          Currently, only the CULL structure is verified, not the contents.

SEE ALSO


18.4 job_verify_submitted_job

NAME
          job_verify_submitted_job() -- verify a just submitted job

SYNOPSIS
          bool
          job_verify_submitted_job(const lListElem *job, lList **answer_list)

FUNCTION
          Verifies a just submitted job object.
          Does generic tests by calling job_verify, like verifying the cull
          structure, and makes sure a number of job attributes are set
          correctly.

INPUTS
          const lListElem *job - the job to verify
          lList **answer_list  - answer list to pass back error messages

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: job_verify_submitted_job() is MT safe

BUGS
          The function is far from being complete.
          Currently, only the CULL structure is verified, not the contents.

SEE ALSO


18.5 sge_unparse_acl_dstring

NAME
          sge_unparse_acl_dstring() -- creates a string from the access lists and user

SYNOPSIS
          bool sge_unparse_acl_dstring(dstring *category_str, const char *owner,
          const char *group, const lList *acl_list, const char *option)

FUNCTION
          ???

INPUTS
          dstring *category_str - target string
          const char *owner     - job owner
          const char *group     - group owner
          const lList *acl_list - a list of all access lists
          const char *option    - string option to put in infront of the generated string

RESULT
          bool - true, if everything was fine

NOTES
          MT-NOTE: sge_unparse_acl_dstring() is MT safe


18.6 sge_unparse_pe_dstring

NAME
          sge_unparse_pe_dstring() -- creates a string from a pe request

SYNOPSIS
          bool sge_unparse_pe_dstring(dstring *category_str, const lListElem
          *job_elem, int pe_pos, int range_pos, const char *option)

FUNCTION
          ???

INPUTS
          dstring *category_str     - target string
          const lListElem *job_elem - a job structure
          int pe_pos                - position of the pe name attribute in the job
          int range_pos             - position of the pe range request attribute in the job
          const char *option        - string option to put in infront of the generated string

RESULT
          bool - true, if everything was fine

NOTES
          MT-NOTE: sge_unparse_pe_dstring() is MT safe


18.7 sge_unparse_queue_list_dstring

NAME
          sge_unparse_queue_list_dstring() -- creates a string from a queue name list

SYNOPSIS
          bool sge_unparse_queue_list_dstring(dstring *category_str, const
          lListElem *job_elem, int nm, const char *option)

FUNCTION
          ???

INPUTS
          dstring *category_str     - target string
          const lListElem *job_elem - a job structure
          int nm                    - position in of the queue list attribute in the job
          const char *option        - string option to put in infront of the generated string

RESULT
          bool - true, if everything was fine

NOTES
          MT-NOTE: sge_unparse_queue_list_dstring() is MT safe


18.8 sge_unparse_resource_list_dstring

NAME
          sge_unparse_resource_list_dstring() -- creates a string from resource requests

SYNOPSIS
          bool sge_unparse_resource_list_dstring(dstring *category_str, lListElem
          *job_elem, int nm, const char *option)

FUNCTION
          ???

INPUTS
          dstring *category_str - target string
          lListElem *job_elem   - a job structure
          int nm                - position of the resource list attribute in the job
          const char *option    - string option to put in infront of the generated string

RESULT
          bool - true, if everything was fine

NOTES
          MT-NOTE: sge_unparse_resource_list_dstring() is MT safe


18.9 sge_unparse_string_option_dstring

NAME
          sge_unparse_string_option_dstring() -- copies a string into a dstring

SYNOPSIS
          bool sge_unparse_string_option_dstring(dstring *category_str, const
          lListElem *job_elem, int nm, char *option)

FUNCTION
          Copies a string into a dstring. Used for category string building

INPUTS
          dstring *category_str     - target string
          const lListElem *job_elem - a job structure
          int nm                    - position of the string attribute in the job
          char *option              - string option to put in in front of the generated string

RESULT
          bool - always true

NOTES
          MT-NOTE: sge_unparse_string_option_dstring() is MT safe

SEE ALSO


18.10 sge_unparse_ulong_option_dstring

NAME
          sge_unparse_ulong_option_dstring() -- copies a string into a dstring

SYNOPSIS
          bool sge_unparse_ulong_option_dstring(dstring *category_str, const
          lListElem *job_elem, int nm, char *option)

FUNCTION
          Copies a string into a dstring. Used for category string building

INPUTS
          dstring *category_str     - target string
          const lListElem *job_elem - a job structure
          int nm                    - position of the string attribute in the job
          char *option              - string option to put in front of the generated string

RESULT
          bool - always true

EXAMPLE
          ???

NOTES
          MT-NOTE: sge_unparse_ulong_option_dstring() is MT safe

SEE ALSO


19 sge_jsv


19.1 jsv_stop

NAME
          jsv_stop() -- Stop a JSV instance which was previously started

SYNOPSIS
          bool jsv_stop(lListElem *jsv, lList **answer_list, bool try_soft_quit)

FUNCTION
          Stop a running JSV instance which was previously started. If the
          variable 'try_soft_quit' is set to 'true' then this function tries
          to communicate with the process. It will then send a "QUIT" string
          to pipe end which is connected with the stdin of the JSV process.
          If the script does then not terminate within JSV_QUIT_TIMEOUT
          seconds then it will be terminated hard via kill signal.

INPUTS
          lListElem *jsv      - JSV_Type element
          lList **answer_list - AN_Type element
          bool try_soft_quit  - "true" if the JSV should terminate itself

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: jsv_stop() is MT safe

SEE ALSO


20 sge_object


20.1 obj_mt_init

NAME
          obj_mt_init() -- creats the pthread key

SYNOPSIS
          void obj_mt_init(void)

FUNCTION
          Creates the pthread key. Needs to be called when the daemon, clients
          starts up

NOTES
          MT-NOTE: obj_mt_init() is not MT safe
          

SEE ALSO


20.2 obj_state_destroy

NAME
          obj_state_destroy() -- frees the thread local memory

SYNOPSIS
          static void obj_state_destroy(void* st)

INPUTS
          void* st - thread local memory

NOTES
          MT-NOTE: obj_state_destroy() is MT safe

SEE ALSO


20.3 obj_state_global_init

NAME
          obj_state_global_init() --  Inits the thread local memory global

SYNOPSIS
          static void obj_state_global_init(obj_state_t *state)

FUNCTION
          Inits the thread local memory, by coping the static information and
          setting the list pointers to NULL

INPUTS
          obj_state_t *state - the thread local memory

NOTES
          MT-NOTE: obj_state_global_init() is MT safe

SEE ALSO


20.4 obj_state_init

NAME
          obj_state_init() --  Inits the thread local memory none global

SYNOPSIS
          static void obj_state_init(obj_state_t *state)

FUNCTION
          Inits the thread local memory, by coping the static information and
          setting the list pointers to NULL

INPUTS
          obj_state_t *state - the thread local memory

NOTES
          MT-NOTE: obj_state_init() is MT safe

SEE ALSO


20.5 object_get_name

NAME
          object_get_name() -- get the object name by object descriptor

SYNOPSIS
          const char *
          object_get_name(const lDescr *descr)

FUNCTION
          Returns the object name for a given descriptor.
          If the descriptor doesn't match a descriptor in object_base,
          return "unknown".

INPUTS
          const lDescr *descr - descriptor.

RESULT
          const char * - the object name

EXAMPLE
          object_get_name(JOB_Type) returns "JOB"

NOTES
          MT-NOTE: object_get_name() is MT safe


20.6 object_list_verify_cull

NAME
          object_list_verify_cull() -- verify cull list structure

SYNOPSIS
          bool
          object_list_verify_cull(const lList *lp, const lDescr *descr)

FUNCTION
          Verifies that a cull list, including all its objects and sublists,
          is a valid object of a defined type.
          
          There are cases, where the type of a list cannot be verified, when the
          type of a sublist is set to CULL_ANY_SUBTYPE in the cull list definition.
          In this case, the list descriptor is not checked, but still all list
          objects and there sublists are verified.

INPUTS
          const lList *lp     - list to verify
          const lDescr *descr - expected descriptor (or NULL, see above)

RESULT
          bool - true, if the object is OK, else false

NOTES
          MT-NOTE: object_list_verify_cull() is MT safe

SEE ALSO


20.7 object_type_get_global_object_description

NAME
          object_type_get_global_object_description() -- grands access to the global
                                                         master lists

SYNOPSIS
          object_description* object_type_get_global_object_description(void)

RESULT
          object_description* - the global object description / master lists

NOTES
          MT-NOTE: object_type_get_global_object_description() is MT safe

SEE ALSO


20.8 object_type_get_object_description

NAME
          object_type_get_object_description() -- gets the master list table

SYNOPSIS
          object_description* object_type_get_object_description()

FUNCTION
          ???

RESULT
          object_description* - the table with all master lists and its information

NOTES
          MT-NOTE: object_type_get_object_description() is MT safe

SEE ALSO


20.9 object_unpack_elem_verify

NAME
          object_unpack_elem_verify() -- unpack and verify an object

SYNOPSIS
          bool
          object_unpack_elem_verify(lList **answer_list, sge_pack_buffer *pb,
                                    lListElem **epp, const lDescr *descr)

FUNCTION
          Unpacks the given packbuffer.
          If unpacking was successfull, verifies the object
          against the given descriptor.

INPUTS
          lList **answer_list - answer list to report errors
          sge_pack_buffer *pb - the packbuffer containing the object
          lListElem **epp     - element pointer to pass back the unpacked object
          const lDescr *descr - the expected object type

RESULT
          bool - true on success, else false

NOTES
          MT-NOTE: object_unpack_elem_verify() is MT safe

SEE ALSO


20.10 object_verify_cull

NAME
          object_verify_cull() -- verify cull object structure

SYNOPSIS
          bool
          object_verify_cull(const lListElem *ep, const lDescr *descr)

FUNCTION
          Verifies that a cull object, including all its sublists and subobjects,
          is a valid object of a defined type.
          
          The type (descr) argument may be zero in two cases:
             - the descriptor has already been checked. This is the case when called
               from object_list_verify_cull().
             - we don't know the type of a subobject (if it is defined as
               CULL_ANY_SUBTYPE in the cull object definition

INPUTS
          const lListElem *ep - the object to verify
          const lDescr *descr - expected object type, or NULL (see above)

RESULT
          bool - true on success, else false

NOTES
          MT-NOTE: object_verify_cull() is MT safe

SEE ALSO


20.11 object_verify_expression_syntax

NAME
          object_verify_expression_syntax() -- verify string attribute expression syntax

SYNOPSIS
          bool
          object_verify_expression_syntax(const lListElem *ep, lList **answer_list)

FUNCTION
          Verifies that a string is expression in correct format.

INPUTS
          const lListElem *ep - the object to verify
          lList **answer_list - answer list to pass back error messages

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: object_verify_expression_syntax() is MT safe


20.12 object_verify_name

NAME
          object_verify_name() - verifies object name

SYNOPSIS
          int object_verify_name(const lListElem *object, lList **alpp, int name, object_descr)

FUNCTION
          These checks are done for the attribute JB_object_name of 'object':
          #1 reject object name if it starts with a digit
          A detailed problem description is added to the answer list.

INPUTS
          const lListElem *object  - JB_Type elemente
          lList **alpp             - the answer list
          int   name               - object name
          char *object_descr       - used for the text in the answer list

RESULT
             int - returns != 0 if there is a problem with the object name
          
          MT-NOTE: sge_resolve_host() is MT safe


20.13 object_verify_pe_range

NAME
          object_verify_pe_range() -- Verify validness of a jobs PE range request

SYNOPSIS
          int object_verify_pe_range(lList **alpp, const char *pe_name,
          lList *pe_range)

FUNCTION
          Verifies a jobs PE range is valid. Currently the following is done
          - make PE range list normalized and ascending
          - ensure PE range min/max not 0
          - in case multiple PEs match the PE request in GEEE ensure
            the urgency slots setting is non-ambiguous

INPUTS
          lList **alpp        - Returns answer list with error context.
          const char *pe_name - PE request
          lList *pe_range     - PE range to be verified
          const char *object_descr - object description for user messages

RESULT
          static int - STATUS_OK on success


20.14 object_verify_string_not_null

NAME
          object_verify_string_not_null() -- verify string attribute not null

SYNOPSIS
          bool
          object_verify_string_not_null(const lListElem *ep, lList **answer_list,
                                        int nm)

FUNCTION
          Verifies that a string attribute of a certain object is not NULL.

INPUTS
          const lListElem *ep - the object to verify
          lList **answer_list - answer list to pass back error messages
          int nm              - the attribute to verify

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: object_verify_string_not_null() is MT safe

SEE ALSO


20.15 object_verify_ulong_not_null

NAME
          object_verify_ulong_not_null() -- verify ulong attribute not null

SYNOPSIS
          bool
          object_verify_ulong_not_null(const lListElem *ep, lList **answer_list,
                                       int nm)

FUNCTION
          Verify that a certain ulong attribute in an object is not 0

INPUTS
          const lListElem *ep - object to verify
          lList **answer_list - answer list to pass back error messages
          int nm              - the attribute to verify

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: object_verify_ulong_not_null() is MT safe

SEE ALSO


20.16 object_verify_ulong_null

NAME
          object_verify_ulong_null() -- verify ulong attribute null

SYNOPSIS
          bool
          object_verify_ulong_null(const lListElem *ep, lList **answer_list,
                                       int nm)

FUNCTION
          Verify that a certain ulong attribute in an object is 0

INPUTS
          const lListElem *ep - object to verify
          lList **answer_list - answer list to pass back error messages
          int nm              - the attribute to verify

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: object_verify_ulong_null() is MT safe

SEE ALSO

NAME
          object_verify_double_null() -- verify double attribute null

SYNOPSIS
          bool
          object_verify_ulong_null(const lListElem *ep, lList **answer_list,
                                       int nm)

FUNCTION
          Verify that a certain double attribute in an object is 0

INPUTS
          const lListElem *ep - object to verify
          lList **answer_list - answer list to pass back error messages
          int nm              - the attribute to verify

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: object_verify_double_null() is MT safe

SEE ALSO


21 sge_objectcompress_ressources

NAME
          compress_ressources() --  remove multiple requests for one resource

SYNOPSIS
          int compress_ressources(lList **alpp, lList *rl, const char *object_descr )

FUNCTION
          remove multiple requests for one resource
          this can't be done fully in clients without having complex definitions
          -l arch=linux -l a=sun4

INPUTS
          lList **alpp        - Returns answer list with error context.
          lList *rl           - object description for user messages
          const char *object_descr - object description

RESULT
          static int - 0 on success


22 sge_order


22.1 sge_create_cull_order_pos

NAME
          sge_create_cull_order_pos() -- generates a cull order position struct

SYNOPSIS
          void sge_create_cull_order_pos(order_pos_t **cull_order_pos, lListElem
          *jep, lListElem *jatp, lListElem *joker, lListElem *joker_task)

FUNCTION
          generates a cull order position struct

INPUTS
          order_pos_t **cull_order_pos - struct to init. if not NULL, the old struct will be freed
          lListElem *jep               - job structure
          lListElem *jatp              - ja task structure
          lListElem *joker             - job order structure
          lListElem *joker_task        - ja task order structure

NOTES
          MT-NOTE: sge_create_cull_order_pos() is MT safe


22.2 sge_free_cull_order_pos

NAME
          sge_free_cull_order_pos() -- frees a cull order struct

SYNOPSIS
          void sge_free_cull_order_pos(order_pos_t **cull_order_pos)

FUNCTION
          frees a cull order struct

INPUTS
          order_pos_t **cull_order_pos - a douple pointer to the struct. Will be
                                         set to NULL

NOTES
          MT-NOTE: sge_free_cull_order_pos() is MT safe


23 sge_path_alias


23.1 path_alias_verify

NAME
          path_alias_verify() -- verify path alias list

SYNOPSIS
          bool
          path_alias_verify(const lList *path_aliases, lList **answer_list)

FUNCTION
          Verify a path alias list as it is sent with job or pe task start orders
          to sge_execd.

INPUTS
          const lList *path_aliases - path alias list
          lList **answer_list       - answer list to pass back error messages

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: path_alias_verify() is MT safe

SEE ALSO


23.2 path_list_verify

NAME
          path_list_verify() -- verify a path list

SYNOPSIS
          bool
          path_list_verify(const lList *path_list, lList **answer_list,
                           const char *name)

FUNCTION
          Verify a path list, e.g. the path specification in JB_stdout_path_list,
          coming from a qsub -o <path_list>.

INPUTS
          const lList *path_list - the path list to verify
          lList **answer_list    - answer list to pass back error messages
          const char *name       - name of the checked attribute for error output

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: path_list_verify() is MT safe


23.3 path_verify

NAME
          path_verify() -- verify a path string

SYNOPSIS
          bool
          path_verify(const char *path, lList **answer_list, const char *name,
                      bool absolute)

FUNCTION
          Verifies if a path string has valid contents.

INPUTS
          const char *path    - the string to verify
          lList **answer_list - answer list to pass back error messages
          const char *name    - name of the path to check, e.g. "prolog"
                                for error output
          bool absolute       - does it have to be an absolute path?

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: path_verify() is MT safe


24 sge_pe


24.1 pe_do_accounting_summary

NAME
          pe_do_accounting_summary() -- do accounting summary?

SYNOPSIS
          bool
          pe_do_accounting_summary(const lListElem *pe)

FUNCTION
          Returns whether for tightly integrated jobs
          - a single accounting record shall be created (true), or
          - an individual accounting record shall be created for every task,
            and an accounting record for the master task (job script).

INPUTS
          const lListElem *pe - the parallel environment

RESULT
          bool - true (do summary), or false (many records)

NOTES
          MT-NOTE: pe_do_accounting_summary() is MT safe


25 sge_pe_task


25.1 pe_task_verify_request

NAME
          pe_task_verify_request() -- verify a pe task request object

SYNOPSIS
          bool
          pe_task_verify_request(const lListElem *petr, lList **answer_list)

FUNCTION
          Verifies structure and contents of a pe task request.
          A pe task request is sent to sge_execd by qrsh -inherit.

INPUTS
          const lListElem *petr - the object to verify
          lList **answer_list   - answer list to pass back error messages

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: pe_task_verify_request() is MT safe

BUGS
          The function is far from being complete.
          Currently, only the CULL structure is verified, not the contents.

SEE ALSO


26 sge_proc


26.1 clean_procList

NAME
          clean_procList() -- cleans the procList from already finished jobs

SYNOPSIS
          void clean_procList()

FUNCTION
          Remove all elements from procList which has not been marked as running.
          Mark all remaining elements as not running.


26.2 free_procList

NAME
          free_procList() -- frees the formerly created procList

SYNOPSIS
          void free_procList()

FUNCTION
          Frees the formerly created procList


26.3 gen_procList

NAME
          gen_procList() -- creates the proc table

SYNOPSIS
          void gen_procList()

FUNCTION
          Creates the hashed list procList


26.4 get_pr

NAME
          get_pr() -- Look for a certain process entry in the proc table

SYNOPSIS
          lListElem* get_pr(int pid)

FUNCTION
          Looks for the element with the specified pid and return it.
          Otherwise return NULL

INPUTS
          int pid - The process ID of the process we're looking for.

RESULT
          lListElem* - PRO_Type object or NULL


27 sge_qinstance


27.1 qinstance_list_verify_execd_job

NAME
          qinstance_list_verify_execd_job() -- verify a queue instance list

SYNOPSIS
          bool
          qinstance_list_verify_execd_job(const lList *queue_list, lList **answer_list)

FUNCTION
          Verify correctness of a queue instance list, that has been sent by qmaster
          to execd as part of a job start order.

INPUTS
          const lList *queue_list - the queue instance list
          lList **answer_list     - answer list to pass back error messages

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: qinstance_list_verify_execd_job() is MT safe

SEE ALSO


27.2 qinstance_set_error

NAME
          qinstance_set_error() -- set/unset qinstance into state

SYNOPSIS
          void qinstance_set_error(lListElem *qinstance, u_long32 type, const char
          *message, bool set_error)

FUNCTION
          Sets or Unsets a qinstance into error state and adds or removes the given
          error message

INPUTS
          lListElem *qinstance - qinstance object (QU_Type)
          u_long32 type        - new state
          const char *message  - error message to set
          bool set_error       - set or unset

NOTES
          MT-NOTE: qinstance_set_error() is MT safe


27.3 qinstance_verify

NAME
          qinstance_verify() -- verify a queue instance in execd

SYNOPSIS
          bool
          qinstance_verify(const lListElem *qep, lList **answer_list)

FUNCTION
          Verify a single queue instance, that has been sent by qmaster to execd
          as part of a job start order.

INPUTS
          const lListElem *qep - the queue instance to verify
          lList **answer_list  - answer list to pass back error messages

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: qinstance_verify() is MT safe


27.4 qinstance_verify_full_name

NAME
          qinstance_verify_full_name() -- verify a queue instance full name

SYNOPSIS
          bool
          qinstance_verify_full_name(lList **answer_list, const char *full_name)

FUNCTION
          Verifies, if a queue instance full name is correct (form cqueue@host).

INPUTS
          lList **answer_list   - answer list to pass back error messages
          const char *full_name - the queue instance name to verify

RESULT
          bool - true: everything ok, else false

NOTES
          MT-NOTE: qinstance_verify_full_name() is MT safe


28 sge_qref


28.1 cull_parse_destination_identifier_list

NAME
          cull_parse_destination_identifier_list() -- parse a queue reference list

SYNOPSIS
          int
          cull_parse_destination_identifier_list(lList **lpp, char *dest_str)

FUNCTION
          Parse 'dest_str' and create a QR_type list.

INPUTS
          lList **lpp    - QR_Type list
          char *dest_str - input string

RESULT
          int - error state

NOTES
          MT-NOTE: cull_parse_destination_identifier_list() is MT safe


28.2 qref_cq_rejected

NAME
          qref_cq_rejected() --  Check, if -q qref_list rejects (cluster) queue

SYNOPSIS
          bool qref_cq_rejected(const char *qref_pattern, const char *cqname, const
          char *hostname, const lList *hgroup_list)

FUNCTION
          Check if patter in -q qref_list rejects cluster queue and hostname,
          if passed. If NULL is passed as hostname, cluster queue verfication
          is performed only.

INPUTS
          const char *qref_pattern - a wildcard pattern as defined for -q qref_list
          const char *cqname       - cluster queue name
          const char *hostname     - execution hostname (may be NULL)
          const lList *hgroup_list - host group list

RESULT
          bool - true if rejected

NOTES
          MT-NOTE: qref_cq_rejected() is MT safe


28.3 qref_list_cq_rejected

NAME
          qref_list_cq_rejected() -- Check, if -q qref_list rejects (cluster) queue

SYNOPSIS
          bool qref_list_cq_rejected(const lList *qref_list, const char *cqname,
                             const char *hostname, const lList *hgroup_list)

FUNCTION
          Check if -q qref_list rejects cluster queue and hostname, if passed.
          If NULL is passed as hostname, cluster queue verfication is performed
          only.

INPUTS
          const lList *qref_list - QR_Type list as usef for -q qref_list
          const char *cqname     - cluster queue name
          const char *hostname     - exeuction hostname
          const lList *hgroup_list - host group list

RESULT
          bool - true if rejected

NOTES
          MT-NOTE: qref_list_cq_rejected() is MT safe


28.4 qref_list_host_rejected

NAME
          qref_list_host_rejected() -- Check if -q ??@href rejects host

SYNOPSIS
          bool qref_list_host_rejected(const char *href, const char
          *hostname, const lList *hgroup_list)

FUNCTION
          Checks if a -q ??@href rejects host. The href may be either
          wc_hostgroup or wc_host.

INPUTS
          const char *href         - Host reference from -q ??@href
          const char *hostname     - the host in question
          const lList *hgroup_list - hostgroup list (HGRP_Type)

RESULT
          bool - True if rejected.

NOTES
          MT-NOTE: qref_list_host_rejected() is MT safe


29 sge_resource_quota


29.1 rqs_append_filter_to_dstring

NAME
          rqs_append_filter_to_dstringRQRF_object_append_to_dstring() -- RQRF Element to string

SYNOPSIS
          bool rqs_append_filter_to_dstring(lListElem *filter, dstring *buffer,
          lList **alp)

FUNCTION
          Converts a RQRF element to string for spooling

INPUTS
          lListElem *filter - Element to be converted
          dstring *buffer   - buffer for the element string
          lList **alp       - answer_list

RESULT
          bool - true on success
                 false on error

NOTES
          MT-NOTE: rqs_append_filter_to_dstring() is MT safe


29.2 rqs_debit_consumable

NAME
          rqs_debit_consumable() -- debit slots in all relevant rule sets

SYNOPSIS
          int rqs_debit_consumable(lListElem *rqs, lListElem *job, lListElem
          *granted, lListElem *pe, lList *centry_list, int slots)

FUNCTION
          iterater over all rules in the given rule set and debit the number of slots
          in the relevant rule

INPUTS
          lListElem *rqs     - resource quota set (RQS_Type)
          lListElem *job     - job request (JB_Type)
          lListElem *granted - granted destination identifier (JG_Type)
          lListElem *pe      - granted pe (PE_Type)
          lList *centry_list - consumable resouces list (CE_Type)
          int slots          - slot amount

RESULT
          int - amount of modified rule

NOTES
          MT-NOTE: rqs_debit_consumable() is not MT safe


29.3 rqs_debit_rule_usage

NAME
          rqs_debit_rule_usage() -- debit usage in a resource quota rule

SYNOPSIS
          int rqs_debit_rule_usage(lListElem *job, lListElem *rule, dstring
          *rue_name, int slots, lList *centry_list, const char *obj_name)

FUNCTION
          Debit an amount of slots in all limits of one resource quota rule

INPUTS
          lListElem *job       - job request (JG_Type)
          lListElem *rule      - resource quota rule (RQR_Type)
          dstring *rue_name    - rue name that counts
          int slots            - amount of slots to debit
          lList *centry_list   - consumable resource list (CE_Type)
          const char *obj_name - name of the limit

RESULT
          int - amount of debited limits

NOTES
          MT-NOTE: rqs_debit_rule_usage() is MT safe


29.4 rqs_filter_match

NAME
          rqs_filter_match() -- compares value with configured filter

SYNOPSIS
          bool rqs_filter_match(lListElem *filter, int filter_type, const
          char *value, lList *master_userset_list, lList *master_hgroup_list)

FUNCTION
          This function compares for the given filter if the value does match
          the configured one. Wildcards are allowed for the filter as well as for
          the value.

INPUTS
          lListElem *filter          - filter element (RQRF_Type)
          int filter_type            - filter type
          const char *value          - value to match
          lList *master_userset_list - master userset list (US_Type)
          lList *master_hgroup_list  - master hostgroup list (HG_Type)

RESULT
          bool - true if the value does match
                 false if the value does not match

NOTES
          MT-NOTE: rqs_filter_match() is MT safe


29.5 rqs_get_matching_rule

NAME
          rqs_get_matching_rule() -- found relevant rule for job request

SYNOPSIS
          lListElem* rqs_get_matching_rule(lListElem *rqs, const char *user,
          const char *project, const char* pe, const char *host, const char *queue,
          lList *userset_list, lList* hgroup_list, dstring *rule_name)

FUNCTION
          This function searches in a resource quota set the relevant rule.

INPUTS
          lListElem *rqs     - rule set (RQS_Type)
          const char *user    - user name
          const char *project - project name
          const char* pe      - pe name
          const char *host    - host name
          const char *queue   - queue name
          lList *userset_list - master user set list (US_Type)
          lList* hgroup_list  - master host group list (HG_Type);
          dstring *rule_name  - out: name or matching rule

RESULT
          lListElem* - pointer to matching rule

NOTES
          MT-NOTE: rqs_get_matching_rule() is MT safe


29.6 rqs_get_rue_string

NAME
          rqs_get_rue_string() -- creates a rue name

SYNOPSIS
          bool rqs_get_rue_string(dstring *name, lListElem *rule, const char
          *user, const char *project, const char *host, const char *queue, const
          char* pe)

FUNCTION
          Creates the rue name used for debiting a specific job request. The name
          consists of the five touples devided by a /. The order is user, project,
          pe, queue, host.
          Filters that count for a sum
          of hosts are saved as a empty string because they don't need to be matched.
          
          For example the rule
            limit users `*` queues `all.q,my.q` to slots=10
          may result in the rue name
            user1///all.q//

INPUTS
          dstring *name       - out: rue_name
          lListElem *rule     - resource quota rule (RQR_Type)
          const char *user    - user name
          const char *project - project name
          const char *host    - host name
          const char *queue   - queue name
          const char* pe      - pe name

RESULT
          bool - always true

NOTES
          MT-NOTE: rqs_get_rue_string() is MT safe


29.7 rqs_is_matching_rule

NAME
          rqs_is_matching_rule() -- matches a rule with the filter touples

SYNOPSIS
          bool rqs_is_matching_rule(lListElem *rule, const char *user, const char
          *project, const char *pe, const char *host, const char *queue, lList
          *master_userset_list, lList *master_hgroup_list)

FUNCTION
          The function verifies for every filter touple if the request matches
          the configured resource quota rule. If only one touple does not match
          the whole rule will not match

INPUTS
          lListElem *rule            - resource quota rule (RQR_Type)
          const char *user           - user name
          const char *project        - project name
          const char *pe             - pe name
          const char *host           - host name
          const char *queue          - queue name
          lList *master_userset_list - master user set list (US_Type)
          lList *master_hgroup_list  - master hostgroup list (HG_Type)

RESULT
          bool - true if the rule does match
                 false if the rule does not match

NOTES
          MT-NOTE: rqs_is_matching_rule() is MT safe


29.8 rqs_list_locate

NAME
          rqs_list_locate() -- locate a specific resource quota set by name

SYNOPSIS
          lListElem* rqs_list_locate(lList *lp, const char *name)

FUNCTION
          This function searches the rule set list for a specific resource quota
          set. The search criteria is the name of the resource quota set.

INPUTS
          lList *lp        - rule set list to be searched in
          const char *name - rule set name of interest

RESULT
          lListElem* - if found the reference to the resource quota set, else NULL

NOTES
          MT-NOTE: rqs_list_locate() is MT safe


29.9 rqs_list_verify_attributes

NAME
          rqs_list_verify_attributes() -- verifies the attributes of a rqs list

SYNOPSIS
          bool rqs_list_verify_attributes(lList *rqs_list, lList
          **answer_list, bool in_master)

FUNCTION
          This function iterates over a rqs list and checks for every rqs the attributes

INPUTS
          lList *rqs_list    - List that should be verified
          lList **answer_list - answer list
          bool in_master      - flag if called by qmaster or qconf

RESULT
          bool - true on success
                 false on error

NOTES
          MT-NOTE: rqs_list_verify_attributes() is MT safe

SEE ALSO


29.10 rqs_match_host_scope

NAME
          rqs_match_host_scope() -- Match name with host scope

SYNOPSIS
          static bool rqs_match_host_scope(lList *scope, const char *name, lList
          *master_hgroup_list)

FUNCTION
          The function matches the passed name with the host scope. Name
          may not only be a hostname, but also host group name or a wildcard
          expression. For performance reasons qref_list_host_rejected() is
          used for matching, if we got no pattern and no hostgroup.

INPUTS
          lList *scope              - A scope list (ST_Type)
          const char *name          - hostname/hostgroup name/wildcard expression
          lList *master_hgroup_list - the host group list (HGRP_Type)

RESULT
          bool - Returns true if 'name' matches

NOTES
          MT-NOTE: rqs_match_host_scope() is MT safe


29.11 rqs_match_user_host_scope

NAME
          rqs_match_user_host_scope() -- match user or host scope

SYNOPSIS
          static bool rqs_match_user_host_scope(lList *scope, int filter_type,
          const char *value, lList *master_userset_list, lList *master_hgroup_list)

FUNCTION
          This function verifies a user or host scope. The function allows for every
          scope entry and for the value a wildcard definition. Hostgroups and Usergroups
          are resolved and matched against the value
          

INPUTS
          lList *scope               - Scope to match (ST_Type)
          int filter_type            - filter type (FILTER_USERS or FILTER_HOSTS)
          const char *value          - value to match
          lList *master_userset_list - master userset list (US_Type)
          lList *master_hgroup_list  - master hostgroup list (HG_Type)

RESULT
          static bool - true, if value was found in scope
                        false, if value was not found in scope

NOTES
          MT-NOTE: rqs_match_user_host_scope() is MT safe

SEE ALSO


29.12 rqs_parse_filter_from_string

NAME
          rqs_parse_filter_from_string() -- parse a RQRF Object from string

SYNOPSIS
          bool rqs_parse_filter_from_string(lListElem **filter, const char* buffer,
          lList **alp)

FUNCTION
          Converts a spooled RQRF Object to a CULL Element

INPUTS
          lListElem **filter - resulting RQRF object
          const char* buffer - string to be converted
          lList **alp        - answer_list

RESULT
          bool - true on success
                 false on error

NOTES
          MT-NOTE: rqs_parse_filter_from_string() is MT safe


29.13 rqs_replace_request_verify

NAME
          rqs_replace_request_verify() -- verify a rqs replace request

SYNOPSIS
          bool rqs_replace_request_verify(lList **answer_list, const lList
          *request)

FUNCTION
          Verify a rqs replace request (e.g. coming from a qconf -mrqs).
          We make sure, that no duplicate names appear in the request.

INPUTS
          lList **answer_list  - answer list to report errors
          const lList *request - the request to check

RESULT
          bool - true, if it is ok, false on error

NOTES
          MT-NOTE: rqs_replace_request_verify() is MT safe


29.14 rqs_rule_locate

NAME
          rqs_rule_locate() -- locate a specific rule by name

SYNOPSIS
          lListElem* rqs_rule_locate(lList *lp, const char *name)

FUNCTION
          This function searches a rule list for a specific rule. The search criteria
          is the name or the index of the rule.
          The index is used if the name was successfully converted to an integer by
          the atoi() function. If atoi() was not able to convert the name the rule is
          searched by a sting compare.

INPUTS
          lList *lp        - list to be searched in
          const char *name - rule name of interest

RESULT
          lListElem* - reference to found rule
                       NULL if rule was not found

NOTES
          MT-NOTE: rqs_rule_locate() is MT safe


29.15 rqs_set_defaults

NAME
          rqs_set_defaults() -- set default values to given rqs

SYNOPSIS
          lListElem* rqs_set_defaults(lListElem* rqs)

FUNCTION
          This function sets the default values to a resource quota set.
          The default rule set is:
          {
            name = <must be already set>
            enabled = true
            limit to slots=0
          }

INPUTS
          lListElem* rqs - Already created object to be modified.

RESULT
          lListElem* - modified Object

NOTES
          MT-NOTE: rqs_set_defaults() is MT safe


29.16 rqs_verify_attributes

NAME
          rqs_verify_attributes() -- verify the attributes of a rqs Object

SYNOPSIS
          bool rqs_verify_attributes(lListElem *rqs, lList
          **answer_list, bool in_master)

FUNCTION
          This function verifies the attributes of a given rqs object. A valid rqs
          object has a name and at least one rule set. After verification it sets the
          double limit value.
          Addition checks are done if in_master is true.

INPUTS
          lListElem *rqs     - Object that should be verified
          lList **answer_list - answer list in case of errors
          bool in_master      - flag if called by qmaster or by qconf

RESULT
          bool - true on success
                 false on error

NOTES
          MT-NOTE: rqs_verify_attributes() is MT safe


29.17 rqs_verify_filter

NAME
          rqs_verify_filter() -- verify a filter in rqs rule

SYNOPSIS
          static bool
          rqs_verify_filter(const lListElem *rule, lList **answer_list,
                            int nm, const char *message)

FUNCTION
          Checks validity of a filter rule.
          The object names referenced in the scope and xscope parts of the rule
          are verified.

INPUTS
          const lListElem *rule - the rule to check
          lList **answer_list  - to pass back error messages
          int nm               - nm of the filter to check, e.g. RQR_filter_users
          const char *message  - error message to add to anwer_list in case of error

RESULT
          static bool - true if everything is OK, else false

NOTES
          MT-NOTE: rqs_verify_filter() is MT safe

SEE ALSO


29.18 rqs_xattr_pre_gdi

NAME
          rqs_xattr_pre_gdi() -- qconf xattr list preformat

SYNOPSIS
          bool rqs_xattr_pre_gdi(lList *this_list, lList **answer_list)

FUNCTION
          This function preformates the given list created by xattr. The xattr switch
          allows to address single rules by using the special rule set name "rule_set_name/rule_name".
          The rule name can be the name for named rules or the index of the rule.
          This function splits such a name into the single rule set name and set the correct
          rule name.

INPUTS
          lList *this_list    - list to be modified
          lList **answer_list - answer list

RESULT
          bool - true on success
                 false on error

NOTES
          MT-NOTE: rqs_xattr_pre_gdi() is MT safe


29.19 sge_centry_referenced_in_rqs

NAME
          sge_centry_referenced_in_rqs() -- search for a centry reference in
                                             a resource quota set

SYNOPSIS
          bool sge_centry_referenced_in_rqs(const lListElem *rqs, const lListElem
          *centry)

FUNCTION
          This function search a centry reference in a resource quota set

INPUTS
          const lListElem *rqs   - resource quota set
          const lListElem *centry - complex entry

RESULT
          bool - true if found
                 false if not found

NOTES
          MT-NOTE: sge_centry_referenced_in_rqs() is MT safe


30 sge_resource_utilization


30.1 serf_control

NAME
          serf_get_active() -- Retrieve whether SERF is active or not

SYNOPSIS
          bool serf_get_active(void);

FUNCTION
          Returns whether SERF is active or not

RETURN
             bool - true = on
                    false = off
          
          MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(read)

NOTES
          Actually belongs to sge_serf.c but this would cause a link dependency
          libsgeobj -> libschedd !!


31 sge_schedd_conf


31.1 calc_pos

NAME
          calc_pos() --

SYNOPSIS
          static void calc_pos(void)

FUNCTION
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)


31.2 clear_pos

NAME
          clear_pos() -- resets the position information

SYNOPSIS
          static void clear_pos(void)

FUNCTION
              is needed, when a new configuration is set
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)


31.3 get_algorithm

NAME
          get_algorithm() -- ???

SYNOPSIS
          const char* get_algorithm(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const char* -
          
          MT-NOTE: is not MT-safe, the caller needs the LOCK_SCHED_CONF(read)


31.4 get_default_duration_str

NAME
          get_default_duration_str() -- Return default_duration string

SYNOPSIS
          const char* get_default_duration_str(void)

FUNCTION
          Returns default duration string from scheduler configuration.

RESULT
             const char* -
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.5 get_halflife_decay_list_str

NAME
          get_halflife_decay_list_str() -- ???

SYNOPSIS
          const char* get_halflife_decay_list_str(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
              const char* -
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.6 get_job_load_adjustments

NAME
          get_job_load_adjustments() -- ???

SYNOPSIS
          const lList* get_job_load_adjustments(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const lList* -
          
          MT-NOTE:  is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.7 get_load_adjustment_decay_time_str

NAME
          get_load_adjustment_decay_time_str() -- ???

SYNOPSIS
          const char * get_load_adjustment_decay_time_str()

FUNCTION
          ???

RESULT
             const char * -
          
          MT-NOTE:  is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.8 get_load_formula

NAME
          get_load_formula() -- ???

SYNOPSIS
          const char* get_load_formula(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
          const char* -
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.9 get_schedule_interval_str

NAME
          get_schedule_interval_str() -- ???

SYNOPSIS
          const char* get_schedule_interval_str(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const char* -
          
          MT-NOTE: is not MT-safe, the caller needs to hold the LOCK_SCHED_CONF(read)


31.10 get_usage_weight_list

NAME
          get_usage_weight_list() -- ???

SYNOPSIS
          const lList* get_usage_weight_list(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const lList* -
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.11 is_config_set

NAME
          is_config_set() -- checks, if a configuration exists

SYNOPSIS
          bool is_config_set(void)

RESULT
             bool - true, if a configuration exists
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.12 reprioritize_interval_str

NAME
          reprioritize_interval_str() -- ???

SYNOPSIS
          const char* reprioritize_interval_str(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const char* -
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)


31.13 sc_state_init

NAME
          sc_state_init() -- resets the thread local structure

SYNOPSIS
          static void sc_state_init(sc_state_t* state)

FUNCTION
          resets the thread local structure, which collects information during
          a scheduling run.

INPUTS
          sc_state_t* state - the thread local structure

NOTES
          MT-NOTE: sc_state_init() is MT safe

SEE ALSO


31.14 schedd_conf_set_config

NAME
          schedd_conf_set_config() -- overwrites the existing configuration

SYNOPSIS
          bool schedd_conf_set_config(lList **config, lList **answer_list)

FUNCTION
          - validates the new configuration
          - precalculates some values and caches them
          - stores the position of each attribute in the structure
          - and sets the new configuration, if the validation worked
          
          If the new configuration is a NULL pointer, the current configuration
          if deleted.

INPUTS
          lList **config      - new configuration (SC_Type)
          lList **answer_list - error messages

RESULT
             bool - true, if it worked
          
          MT-NOTE: is MT-safe, uses LOCK_SCHED_CONF(write)
          
          
          SG TODO: use a internal eval config function and not the external one.


31.15 sconf_best_pe_alg

NAME
          sconf_best_pe_alg() -- returns the alg to use for pe-range jobs

SYNOPSIS
          schedd_pe_algorithm sconf_best_pe_alg()

FUNCTION
          It checks for the alg. to use. If the user did not set a custom one, it
          will evaluate the weights and return the most sucessful one.

RESULT
          schedd_pe_algorithm - pe-range alg.

NOTES
          MT-NOTE: sconf_best_pe_alg() is MT safe

SEE ALSO


31.16 sconf_create_default

NAME
          sconf_create_default() -- returns a default configuration

SYNOPSIS
          lListElem* sconf_create_default()

FUNCTION
          Creates a default configuration, but does not change the current
          active configuration. A set config has to be used to make the
          current configuration the active one.

RESULT
              lListElem* - default configuration (SC_Type)
          
          MT-NOTE: is MT-safe, does not use global variables


31.17 sconf_disable_schedd_job_info

NAME
          sconf_disable_schedd_job_info() -- ???

SYNOPSIS
          void sconf_disable_schedd_job_info()

FUNCTION
          ???

RESULT
             void -
          
          MT-NOTE: is thread save, uses local storage


31.18 sconf_enable_schedd_job_info

NAME
          sconf_enable_schedd_job_info() -- ???

SYNOPSIS
          void sconf_enable_schedd_job_info()

FUNCTION
          ???

RESULT
             void -
          
          MT-NOTE: is thread save, uses local storage


31.19 sconf_eval_set_job_category_filtering

NAME
          sconf_eval_set_job_category_filtering() -- enable jc filtering or not.

SYNOPSIS
          static bool sconf_eval_set_job_category_filtering(lList *param_list,
          lList **answer_list, const char* param)

FUNCTION
          A parsing function for the prama settings in the scheduler configuration.
          It is looking for JC_FILTER to be set to true, or false and updates the
          settings accordingly.

INPUTS
          lList *param_list   - the param list
          lList **answer_list - the answer list, in case of an error
          const char* param   - the param string

RESULT
          static bool - true, if everything went fine
          
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)


31.20 sconf_eval_set_monitoring

NAME
          sconf_eval_set_monitoring() -- Control SERF on/off via MONITOR param

SYNOPSIS
          static bool sconf_eval_set_monitoring(lList *param_list, lList
          **answer_list, const char* param)

FUNCTION
          The MONITOR param allows schedule entry recording facility module
          be switched on/off.

INPUTS
          lList *param_list   - ???
          lList **answer_list - ???
          const char* param   - ???

RESULT
          static bool - parsing error

NOTES
          MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)


31.21 sconf_eval_set_pe_range_alg

NAME
          sconf_eval_set_pe_range_alg() -- parses the sched. param

SYNOPSIS
          static bool sconf_eval_set_pe_range_alg(lList *param_list, lList
          **answer_list, const char* param)

RESULT
          static bool - true, if successful

NOTES
          MT-NOTE: sconf_eval_set_pe_range_alg() is not MT safe, caller needs LOCK_SCHED_CONF(write)


31.22 sconf_eval_set_profiling

NAME
          sconf_eval_set_profiling() -- ???

SYNOPSIS
          static bool sconf_eval_set_profiling(lList *param_list, lList
          **answer_list, const char* param)

FUNCTION
          ???

INPUTS
          lList *param_list   - ???
          lList **answer_list - ???
          const char* param   - ???

RESULT
             static bool -
          
          MT-NOTE:
             not thread safe, needs LOCK_SCHED_CONF(write)


31.23 sconf_get_compensation_factor

NAME
          sconf_get_compensation_factor() -- ???

SYNOPSIS
          double sconf_get_compensation_factor(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.24 sconf_get_config

NAME
          sconf_get_config() -- returns a config object.

SYNOPSIS
          const lListElem* sconf_get_config(void)

RESULT
          const lListElem* - a copy of the current config object

NOTE
          DO NOT USE this method. ONLY when there is NO OTHER way. All config
          settings can be accessed via access function.
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.25 sconf_get_config_list

NAME
          sconf_get_config_list() -- returns a pointer to the list, which contains
                                     the configuration

SYNOPSIS
          lList* sconf_get_config_list(void)

RESULT
             lList* - a copy of the config list
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)

NOTE
          DO NOT USE this method. ONLY when there is NO OTHER way. All config
          settings can be accessed via access function. The config can be set
          via sconf_set_config(...)

IMPORTANT
          If you modify the configuration by directly accessing, you have to call
          sconf_validate_config_ afterwards to ensure, that the caches reflect
          your changes.


31.26 sconf_get_flush_finish_sec

NAME
          sconf_get_flush_finish_sec() -- ???

SYNOPSIS
          int sconf_get_flush_finish_sec(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             int -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.27 sconf_get_flush_submit_sec

NAME
          sconf_get_flush_submit_sec() -- ???

SYNOPSIS
          int sconf_get_flush_submit_sec(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             int -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.28 sconf_get_halflife_decay_list

NAME
          sconf_get_halflife_decay_list() -- ???

SYNOPSIS
          const lList* sconf_get_halflife_decay_list(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const lList* -
          
          MT-NOTE:   is MT save, uses LOCK_SCHED_CONF(read)


31.29 sconf_get_halftime

NAME
          sconf_get_halftime() -- ???

SYNOPSIS
          u_long32 sconf_get_halftime(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.30 sconf_get_job_load_adjustments

NAME
          sconf_get_job_load_adjustments() -- ???

SYNOPSIS
          const lList* sconf_get_job_load_adjustments(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const lList* - returns a copy, needs to be freed
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.31 sconf_get_load_adjustment_decay_time

NAME
          sconf_get_load_adjustment_decay_time() -- ???

SYNOPSIS
          u_long32 sconf_get_load_adjustment_decay_time()

FUNCTION
          ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.32 sconf_get_load_formula

NAME
          sconf_get_load_formula() -- ???

SYNOPSIS
          const char* sconf_get_load_formula(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const char* - this is a copy of the load formula, the caller has to free it
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.33 sconf_get_max_functional_jobs_to_schedule

NAME
          sconf_get_max_functional_jobs_to_schedule() -- ???

SYNOPSIS
          u_long32 sconf_get_max_functional_jobs_to_schedule(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.34 sconf_get_max_pending_tasks_per_job

NAME
          sconf_get_max_pending_tasks_per_job() -- ???

SYNOPSIS
          u_long32 sconf_get_max_pending_tasks_per_job(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE:   is MT save, uses LOCK_SCHED_CONF(read)


31.35 sconf_get_max_reservations

NAME
          sconf_get_max_reservations() -- Max reservation tuning parameter

SYNOPSIS
          int sconf_get_max_reservations(void)

FUNCTION
          Tuning parameter.
          Returns maximum number of reservations that should be done by
          scheduler. If 0 is returned this no single job shall get a reservation
          and assignments are to be made for 'now' only.

RESULT
             int - Max. number of reservations
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.36 sconf_get_maxujobs

NAME
          sconf_get_maxujobs() -- ???

SYNOPSIS
          u_long32 sconf_get_maxujobs(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.37 sconf_get_queue_sort_method

NAME
          sconf_get_queue_sort_method() -- ???

SYNOPSIS
          u_long32 sconf_get_queue_sort_method(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.38 sconf_get_report_pjob_tickets

NAME
          sconf_get_report_pjob_tickets() -- ???

SYNOPSIS
          bool sconf_get_report_pjob_tickets(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             bool -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.39 sconf_get_reprioritize_interval

NAME
          sconf_get_reprioritize_interval() -- ???

SYNOPSIS
          u_long32 sconf_get_reprioritize_interval(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.40 sconf_get_schedd_job_info

NAME
          sconf_get_schedd_job_info() -- ???

SYNOPSIS
          u_long32 sconf_get_schedd_job_info(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read) and local storage


31.41 sconf_get_schedd_job_info_range

NAME
          sconf_get_schedd_job_info_range() -- ???

SYNOPSIS
          const lList* sconf_get_schedd_job_info_range(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             const lList* -  returns a copy, needs to be freed
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.42 sconf_get_schedule_interval

NAME
          sconf_get_schedule_interval() -- ???

SYNOPSIS
          u_long32 sconf_get_schedule_interval(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.43 sconf_get_share_functional_shares

NAME
          sconf_get_share_functional_shares() -- ???

SYNOPSIS
          bool sconf_get_share_functional_shares(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
          bool -


31.44 sconf_get_share_override_tickets

NAME
          sconf_get_share_override_tickets() -- ???

SYNOPSIS
          bool sconf_get_share_override_tickets(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             bool -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.45 sconf_get_usage_weight_list

NAME
          sconf_get_usage_weight_list() -- ???

SYNOPSIS
          const lList* sconf_get_usage_weight_list(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             lList* - returns a copy, needs to be freed
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.46 sconf_get_weight_deadline

NAME
          sconf_get_weight_deadline() -- ???

SYNOPSIS
          double sconf_get_weight_deadline(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.47 sconf_get_weight_department

NAME
          sconf_get_weight_department() -- ???

SYNOPSIS
          double sconf_get_weight_department(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.48 sconf_get_weight_job

NAME
          sconf_get_weight_job() -- ???

SYNOPSIS
          double sconf_get_weight_job(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.49 sconf_get_weight_priority

NAME
          sconf_get_weight_priority() -- ???

SYNOPSIS
          double sconf_get_weight_priority(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.50 sconf_get_weight_project

NAME
          sconf_get_weight_project() -- ???

SYNOPSIS
          double sconf_get_weight_project(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.51 sconf_get_weight_ticket

NAME
          sconf_get_weight_ticket() -- ???

SYNOPSIS
          double sconf_get_weight_ticket(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.52 sconf_get_weight_tickets_functional

NAME
          sconf_get_weight_tickets_functional() -- ???

SYNOPSIS
          u_long32 sconf_get_weight_tickets_functional(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.53 sconf_get_weight_tickets_override

NAME
          sconf_get_weight_tickets_override() -- ???

SYNOPSIS
          void sconf_get_weight_tickets_override(u_long32 active)

FUNCTION
          ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.54 sconf_get_weight_tickets_share

NAME
          sconf_get_weight_tickets_share() -- ???

SYNOPSIS
          u_long32 sconf_get_weight_tickets_share(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             u_long32 -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.55 sconf_get_weight_urgency

NAME
          sconf_get_weight_urgency() -- ???

SYNOPSIS
          double sconf_get_weight_urgency(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.56 sconf_get_weight_user

NAME
          sconf_get_weight_user() -- ???

SYNOPSIS
          double sconf_get_weight_user(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.57 sconf_get_weight_waiting_time

NAME
          sconf_get_weight_waiting_time() -- ???

SYNOPSIS
          double sconf_get_weight_waiting_time(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             double -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.58 sconf_is

NAME
          sconf_is() -- checks, if a configuration exists

SYNOPSIS
          bool sconf_is(void)

RESULT
             bool - true, if a configuration exists
          
          
          MT-NOTE:   is MT save, uses LOCK_SCHED_CONF(read)


31.59 sconf_is_centry_referenced

NAME
          sconf_is_centry_referenced() -- ???

SYNOPSIS
          bool sconf_is_centry_referenced(const lListElem *this_elem, const
          lListElem *centry)

FUNCTION
          ???

INPUTS
          const lListElem *centry    - ???

RESULT
             bool -
          
          MT-NOTE:   is MT save, uses LOCK_SCHED_CONF(read)


31.60 sconf_is_id_in_schedd_job_info_range

NAME
          sconf_is_id_in_schedd_job_info_range() -- ???

SYNOPSIS
          const lList* sconf_is_id_in_schedd_job_info_range(void)

FUNCTION
          ???

INPUTS
          void - ???

RESULT
             bool -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)


31.61 sconf_is_job_category_filtering

NAME
          sconf_is_job_category_filtering() -- true, if the job_category_filtering is on

SYNOPSIS
          bool sconf_is_job_category_filtering(void)

FUNCTION
          returns the status of the job category filtering

RESULT
          bool - true, the job category filtering is on

NOTES
          MT-NOTE: is MT save, uses LOCK_SCHED_CONF(read)


31.62 sconf_is_new_config

NAME
          sconf_is_new_config() --

SYNOPSIS
          bool sconf_is_new_config()

RESULT
             bool -
          
          MT-NOTE:  is MT safe, uses LOCK_SCHED_CONF(read)


31.63 sconf_is_valid_load_formula

NAME
          sconf_is_valid_load_formula() -- ???

SYNOPSIS
          bool sconf_is_valid_load_formula_(lList **answer_list, lList
          *centry_list)

INPUTS
          lList **answer_list - ???
          lList *centry_list  - ???

RESULT
             bool -
          
          MT-NOTE:  is MT safe, uses LOCK_SCHED_CONF(read)


31.64 sconf_print_config

NAME
          sconf_print_config() -- prints the current configuration to the INFO stream

SYNOPSIS
             void sconf_print_config()
          
          MT-NOTE:  is MT safe, uses LOCK_SCHED_CONF(read/write)


31.65 sconf_reset_new_config

NAME
          sconf_reset_new_config() --

SYNOPSIS
          bool sconf_reset_new_config()

FUNCTION
          MT-NOTE:  is MT safe, uses LOCK_SCHED_CONF(write)


31.66 sconf_set_weight_tickets_override

NAME
          sconf_set_weight_tickets_override() -- ???

SYNOPSIS
          void sconf_set_weight_tickets_override(u_long32 active)

FUNCTION
          ???

INPUTS
          u_long32 active - ???

RESULT
             void -
          
          MT-NOTE: is thread save, uses LOCK_SCHED_CONF(write)


31.67 sconf_update_pe_alg

NAME
          sconf_update_pe_alg() -- updates the weights for the different algorithms

SYNOPSIS
          void sconf_update_pe_alg(int runs, int current, int max)

FUNCTION
          updates the weights for the different algorithms. Since the alg. with
          the bigest number is taken, the numbers are negative. It uses the running
          averages to ensure, that the numbers are not getting to big and that the
          scheduler can reakt to changes.
          

INPUTS
          int runs    - number of runs it would have taken with the bin search alg.
          int current - number of runs it took
          int max     - max runs

NOTES
          MT-NOTE: sconf_update_pe_alg() is MT safe

SEE ALSO


31.68 sconf_validate_config

NAME
          sconf_validate_config() -- validate a given configuration

SYNOPSIS
          bool sconf_validate_config(lList **answer_list, lList *config)

INPUTS
          lList **answer_list - error messages
          lList *config       - config to validate

RESULT
              bool - true, if the config is valid
          
           MT-NOTE:  is MT safe, uses LOCK_SCHED_CONF(write)
          
          SG TODO: needs cleanup!!


31.69 sconf_validate_config_

NAME
          sconf_validate_config_() -- validates the current config

SYNOPSIS
          bool sconf_validate_config_(lList **answer_list)

FUNCTION
          validates the current config and updates the caches.

INPUTS
          lList **answer_list - error messages

RESULT
             bool - false for invalid scheduler configuration
          
          MT-NOTE:  is MT safe, uses LOCK_SCHED_CONF(read/write)


32 sge_search_unspecified_node

NAME
          sge_search_unspecified_node() -- search for a node which is not specified

SYNOPSIS
          static lListElem *sge_search_unspecified_node(lListElem *ep)
          

FUNCTION
          The function walks through the sharetree looking for the first node which
          has no name.  A node with no name means that it was created as a result of
          a dangling or circular child reference.

INPUTS
          ep - root of the tree

RESULT
          the first node which has no name or NULL if all nodes have names


33 sge_ulong


33.1 ulong_parse_date_time_from_string

NAME
          ulong_parse_date_time_from_string() -- Parse string into date/time ulong

SYNOPSIS
          bool ulong_parse_date_time_from_string(u_long32 *this_ulong, lList
          **answer_list, const char *string)

FUNCTION
          ???

INPUTS
          u_long32 *this_ulong - ???
          lList **answer_list  - ???
          const char *string   - ???

RESULT
          bool -

NOTES
          MT-NOTE: ulong_parse_date_time_from_string() is MT safe


34 sge_usage


34.1 usage_list_sum

NAME
          usage_list_sum() -- sum up usage of two lists

SYNOPSIS
          void
          usage_list_sum(lList *usage_list, const lList *add_usage_list)

FUNCTION
          Add the usage reported in add_usage_list to usage_list.
          Summing up of usage will only be done for certain attributes:
             - cpu
             - io
             - iow
             - mem
             - vmem
             - maxvmem
             - all ru_* attributes (see man getrusage.2)

INPUTS
          lList *usage_list           - the usage list to contain all usage
          const lList *add_usage_list - usage to add to usage_list

NOTES
          MT-NOTE: usage_list_sum() is MT safe


35 sge_userset


35.1 userset_is_ar_user

NAME
          userset_is_ar_user() -- may user request advance reservations

SYNOPSIS
          bool userset_is_ar_user(lList *lp, const char *username)

FUNCTION
          ???

INPUTS
          lList *lp            - US_Type
          const char *username - user name

RESULT
          bool - true if user has permission
                 false if user has no permission

NOTES
          MT-NOTE: userset_is_ar_user() is MT safe


35.2 userset_list_validate_access

NAME
          userset_list_validate_access() -- all user sets names in list must exist

SYNOPSIS
          int userset_list_validate_access(lList *acl_list, int nm, lList **alpp)

FUNCTION
          All the user set names in the acl_list must be defined in the qmaster
          user set lists. The user set is diferentiated from user names by @ sign

INPUTS
          lList *acl_list - the acl list to check
          int nm          - field name
          lList **alpp    - answer list pointer

RESULT
          int - STATUS_OK if no error,  STATUS_EUNKNOWN otherwise

NOTES
          MT-NOTE: userset_list_validate_access() is not MT safe


36 sge_utility


36.1 verify_host_name

NAME
          verify_host_name() -- verify a hostname

SYNOPSIS
          bool
          verify_host_name(lList **answer_list, const char *host_name)

FUNCTION
          Verifies if a hostname is correct (regarding maximum length etc.).

INPUTS
          lList **answer_list   - answer list to pass back error messages
          const char *host_name - the hostname to verify

RESULT
          bool - true on success,
                 false on error with error message in answer_list

NOTES
          MT-NOTE: verify_host_name() is MT safe


36.2 verify_str_key

NAME
          verify_str_key() -- Generic function for verifying object names

SYNOPSIS
          an_status_t verify_str_key(lList **alpp, const char *str, size_t
          str_length, const char *name, int table)

FUNCTION
          Verifies object names. The following verification tables are
          used
          
             QSUB_TABLE    job account strings
                (see qsub(1) -A for characters not allowed)
             QSUB_TABLE    job name
                (see qsub(1) -N for characters not allowed)
             KEY_TABLE     parallel environment names
                (see sge_pe(5))
             KEY_TABLE     calendar names
                (see calendar_conf(5))
             KEY_TABLE     cluster queue names
                (see queue_conf(5))
             KEY_TABLE     project names
                (see project(5))
             KEY_TABLE     userset names
                (see access_list(5))
             KEY_TABLE     department names
                (see access_list(5))
             KEY_TABLE     checkpoint interface name
                (see checkpoint(5))
             KEY_TABLE     user name
                (see user(5))
             KEY_TABLE     hostgroup names
                (see hostgroup(5))
             WC_TABLE      wc_pe_names (see sge_types(5))
          
             KEY_TABLE     event client name (internal purposes only)
             KEY_TABLE     JAPI session key (internal purposes only)
          
                Note, there is test_sge_utility

INPUTS
          lList **alpp      - answer list
          const char *str   - string to be verified
          size_t str_length - length of the string to be verified
          const char *name  - verbal description of the object
          unsigned table    - verification table to be used

RESULT
          an_status_t - STATUS_OK upon success

NOTES
          MT-NOTE: verify_str_key() is MT safe

SEE ALSO


37 sge_var


37.1 var_list_parse_from_string

NAME
          var_list_parse_from_string() -- parse vars from string list

SYNOPSIS
          int var_list_parse_from_string(lList **lpp,
                                         const char *variable_str,
                                         int check_environment)

FUNCTION
          Parse a list of variables ("lpp") from a comma separated
          string list ("variable_str"). The boolean "check_environment"
          defined wether the current value of a variable is taken from
          the environment of the calling process.

INPUTS
          lList **lpp              - VA_Type list
          const char *variable_str - source string
          int check_environment    - boolean

RESULT
          int - error state
              0 - OK
             >0 - Error

NOTES
          MT-NOTE: var_list_parse_from_string() is MT safe


37.2 var_list_verify

NAME
          var_list_verify() -- verify contents of a variable list

SYNOPSIS
          bool
          var_list_verify(const lList *lp, lList **answer_list)

FUNCTION
          Verifies the contents of a variable list.
          Variable names may not be NULL or empty strings.

INPUTS
          const lList *lp     - the list to verify
          lList **answer_list - answer list to pass back error messages

RESULT
          bool - true on success,
                 false in case of errors, error message in answer_list

NOTES
          MT-NOTE: var_list_verify() is MT safe


38 sgeobj


38.1 QETI


38.1.1 –QETI_Type

NAME
          QETI_Type - Queue End Time Iterator building blocks

ELEMENTS
          SGE_DOUBLE(QETI_total)
             Keeps information about total amount of the resource instance.
             It would be nice if that in information were also contained in
             the RUE_Type element referenced via the resource utilization
             entry QETI_resource_instance. Unfortunately this is not the
             case so we keep it here separately.
          
          SGE_REF(QETI_resource_instance)
             Reference to a resource utilization entry (RUE_Type element) that keeps
             all information about resource utilization of a particular resource
             instance.
          
          SGE_REF(QETI_queue_end_next)
             Reference to the next entry in the resource utilization diagram
             (RDE_Type elemnt). All next pointers related to all resource instances
             represent the state of a sge_qeti_t iterator.

FUNCTION
          Qeti != Yeti


38.2 RDE


38.2.1 –RDE_Type

NAME
          RDE_Type - Resource Diagram Entry

ELEMENTS
          SGE_ULONG(RDE_time)
             Time of resource diagram entry
          
          SGE_DOUBLE(RDE_amount)
             Amount since that time

FUNCTION
          A list of resource diaram entries represents a diagram showing
          resource progression over time. E.g. the following resource
          diagram
          
                    N ^
                      |             +-------+
                      |   +-----+   |  J3   |
                      |   |     +---+-------+--+
                      |   | J1  |      J2      |
                      +---+-----+--------------+-----> t
                      0   4     10  14      22 25
          
          is respresented by the the following table
          
                      t | N
                     ---+---
                      0 | 0
                      4 | 3
                     10 | 2
                     14 | 4
                     22 | 2
                     25 | 2


38.3 RUE


38.3.1 –RUE_Type

NAME
          RUE_Type - Resource Utilization Entry

ELEMENTS
          SGE_STRING(RUE_name)
             Name of the resource the entry is about
          
          SGE_DOUBLE(RUE_utilized_now)
             Currently used amount
          
          SGE_LIST(RUE_utilized)
             A resource diagram indicating future utilization
          
          SGE_DOUBLE(RUE_utilized_now_nonexclusive)
             Currently used amount of implicitly used exclusive resources
          
          SGE_LIST(RUE_utilized_nonexclusive)
             A resource diagram indicating future utilization of implicitly used
             exclusive resources
          

FUNCTION
          A resource utilization entry contains all information
          about utilization of a particular resouce at any time.
          
          The resources managed with resource utilization entries are
          parallel environment slot resource, global resources, host
          resources and resources.
          
          For a not looking ahead information about the amount
          utilized now (RUE_utilized_now) is sufficient:
          
                A(0) = C - U(0)
          
          For resource reservation schedulers also information about future
          utilization over time is required (RUE_utilized):
          
                A(t) = C - U(t)
          
          For advance reservation additional information is needed for each
          single reservation to reflect reserved resource amount over time
          (RUE_reservations). Based on this the resource amount available for
          a job can be determined depending on the advance reservation:
          
                A1(t) = C - U(t) - (         R2(t) + ... + RN(t) )
                A2(t) = C - U(t) - ( R1(t)         + ... + RN(t) )
          
                  :   :                  :
          
                AN(t) = C - U(t) - ( R1(t) + R2(t) + ...         )
          
          and for jobs that do not use an advance reservation the smallest
          resource amount is available:
          
                A(t)  = C - U(t) - ( R1(t) + R2(t) + ... + RN(t) )


38.4 answer


38.4.1 –AN_Type

NAME
          AN_Type - CULL answer element

ELEMENTS
          SGE_ULONG(AN_status)
             status of an answer (e.g STATUS_NOCOMMD)
          
          SGE_STRING(AN_text)
             printable error text
          
          SGE_ULONG(AN_quality)
             answer quality (e.g ANSWER_QUALITY_ERROR)

FUNCTION
          CULL element holding information for an answer of a request.


38.4.2 -AnswerList

NAME
          AnswerList - Object used to return errors/warning/info

FUNCTION
          Answer elements and lists are used to exchange information
          about the level of success of an operation between caller
          and callee. Especially in GDI answers, elements and lists are
          used to transfer error information from server components
          to clients.
          
          Example:
          
             void caller(void) {
                lList *answer_list = NULL;
          
                callee(&answer_list);
                if (answer_list_has_error(&answer_list)) {
                   try_to_handle_error();
                   lFreeList(&answer_list);
                }
             }
          
             void callee(lList **answer_list) {
                char *s = malloc(256);
          
                if (s == NULL) {
                   answer_list_add(answer_list, "no memory",
                                   STATUS_ERROR, ANSWER_QUALITY_ERROR);
                   return;
                }
             }

SEE ALSO

NOTES
          MT-NOTE: the answer list module is MT safe


38.4.3 answer_exit_if_not_recoverable

NAME
          answer_exit_if_not_recoverable() -- Exit on certain errors

SYNOPSIS
          void answer_exit_if_not_recoverable(const lListElem *answer)

FUNCTION
          This function checks if "answer" is an unrecoverable error.
          (answer_is_recoverable() is used to check this.) The error
          text will then be printed to stderr and the calling
          process will be terminated with exit code 1.

INPUTS
          const lListElem *answer - AN_Type element

NOTES
          This function may never return.

NOTES
          This function may never return.


38.4.4 answer_get_quality_text

NAME
          answer_get_quality_text() -- Get quality text

SYNOPSIS
          const char* answer_get_quality_text(const lListElem *answer)

FUNCTION
          Returns a string representation for the quality of the "answer"

INPUTS
          const lListElem *answer - AN_Type list

RESULT
          const char* - String

NOTES
          MT-NOTE: answer_get_quality_text() is MT safe


38.4.5 answer_get_status

NAME
          answer_get_status() -- Return the error status.

SYNOPSIS
          u_long32 answer_get_status(const lListElem *answer)

FUNCTION
          Return the error status of "answer".

INPUTS
          const lListElem *answer - AN_Type element

RESULT
          u_long32 - error status

NOTES
          MT-NOTE: answer_get_status() is MT safe


38.4.6 answer_has_quality

NAME
          answer_has_quality() -- Check for certain answer quality

SYNOPSIS
          bool answer_has_quality(const lListElem *answer,
                                 answer_quality_t quality)

FUNCTION
          Return true (1) if "answer" has the given "quality"

INPUTS
          const lListElem *answer  - AN_Type element
          answer_quality_t quality - Quality id

RESULT
          bool - true or false

NOTES
          MT-NOTE: answer_has_quality() is MT safe


38.4.7 answer_is_recoverable

NAME
          answer_is_recoverable() -- Check for recoverable error

SYNOPSIS
          int answer_is_recoverable(const lListElem *answer)

FUNCTION
          This function returns true (1) if "answer" is an error which the
          calling function application may recover from.
          The following errors are handled as nonrecoverable:
          
             STATUS_NOQMASTER
             STATUS_NOCOMMD
             STATUS_ENOKEY

INPUTS
          const lListElem *answer - AN_Type element

RESULT
          int - true or false

NOTES
          MT-NOTE: answer_is_recoverable() is MT safe


38.4.8 answer_list_add

NAME
          answer_list_add() -- Add an answer to an answer list

SYNOPSIS
          int answer_list_add(lList **answer_list,
                              const char *text,
                              u_long32 status,
                              answer_quality_t quality)

FUNCTION
          This function creates a new answer element (using "quality",
          "status" and "text"). The new element will be appended to
          "answer_list"
          
          If "answer_list" is NULL, no action is performed.
          
          If the list pointed to by "answer_list" is NULL, a new list will be
          created.

INPUTS
          lList **answer_list      - AN_Type list
          const char *text         - answer text
          u_long32 status          - answer status
          answer_quality_t quality - answer quality

RESULT
          int - error state
             true  - OK
             false - error occured

SEE ALSO

NOTES
          MT-NOTE: answer_list_add() is MT safe


38.4.9 answer_list_add_sprintf

NAME
          answer_list_add_sprintf() -- Format add an answer to an answer list

SYNOPSIS
          bool answer_list_add_sprintf(lList **answer_list, u_long32 status,
                                       answer_quality_t quality, const char *fmt,
                                       ...)

FUNCTION
          This function creates a new answer element having the properties
          "status", "quality", and a message text created from fmt and the
          following variable argument list.
          
          The new element will be appended to "answer_list".
          
          If "answer_list" is NULL, no action is performed.
          
          If the list pointed to by "answer_list" is NULL, a new list will be
          created.

INPUTS
          lList **answer_list      - AN_Type list
          u_long32 status          - answer status
          answer_quality_t quality - answer quality
          const char *fmt          - format string to create message (printf)
          ...                      - arguments used for formatting message

RESULT
          bool - true on success, else false

SEE ALSO

NOTES
          MT-NOTE: answer_list_add_sprintf() is MT safe


38.4.10 answer_list_append_list

NAME
          answer_list_append_list() -- Append two lists

SYNOPSIS
          void answer_list_append_list(lList **answer_list, lList **new_list)

FUNCTION
          Append "new_list" after "answer_list". *new_list will be NULL afterwards

INPUTS
          lList **answer_list - AN_Type list
          lList **new_list    - AN_Type list

RESULT
          void - None


38.4.11 answer_list_handle_request_answer_list

NAME
          answer_list_handle_request_answer_list() -- handle res. of request

SYNOPSIS
          int answer_list_handle_request_answer_list(lList **answer_list,
                                                     FILE *stream)

FUNCTION
          Processes the answer list that results from a GDI request
          (sge_gdi or sge_gdi_multi).
          Outputs any errors and warnings and returns the first error
          or warning status code.
          The answer list is freed.

INPUTS
          lList **answer_list - answer list to process
          FILE *stream        - output stream

RESULT
          int - first error or warning status code or STATUS_OK

NOTES
          MT-NOTE: answer_list_handle_request_answer_list() is MT safe


38.4.12 answer_list_has_error

NAME
          answer_list_has_error() -- Is an "error " in the list

SYNOPSIS
          bool answer_list_has_error(lList **answer_list)

FUNCTION
          The function returns true (1) if the "answer_list" containes
          at least one error answer element

INPUTS
          lList **answer_list - AN_Type list

RESULT
          bool - true or false

NOTES
          MT-NOTE: answer_list_has_error() is MT safe


38.4.13 answer_list_has_quality

NAME
          answer_list_has_quality() -- Contains list

SYNOPSIS
          int answer_list_has_quality(lList **answer_list,
                                      answer_quality_t quality)

FUNCTION
          The function returns true (1) if the "answer_list" contains
          at least one answer element with the given "quality".

INPUTS
          lList **answer_list      - AN_Type list
          answer_quality_t quality - quality value

RESULT
          bool - true or false

NOTES
          MT-NOTE: answer_list_has_quality() is MT safe


38.4.14 answer_list_log

NAME
          answer_list_log() -- output and free answer_list

SYNOPSIS
          bool
          answer_list_log(lList **answer_list, bool is_free_list, bool show_info)

FUNCTION
          Prints all messages contained in "answer_list".
          The ERROR, WARNING and INFO macros will be used for output.
          
          If the "answer_list" contains at least one error then this
          function will return true.
          
          If there is no error contained in 'answer_list' then this function
          will return with a value of false.
          
          "*answer_list" will only be freed and set to NULL, if is_free_list is
          true.

INPUTS
          lList **answer_list     - AN_Type list
          bool is_free_list       - if true, frees the answer list
          bool show_info          - log also info messages

NOTES
          MT-NOTE: answer_list_print_err_warn() is MT safe


38.4.15 answer_list_on_error_print_or_exit

NAME
          answer_list_on_error_print_or_exit() -- Print and/or exit

SYNOPSIS
          void answer_list_on_error_print_or_exit(lList **answer_list,
                                                  FILE *stream)

FUNCTION
          The error texts of all answer elements within "answer_list" are
          printed to "stream". If an unrecoverable error is detected
          the calling process will be terminated.

INPUTS
          lList **answer_list - AN_Type list
          FILE *stream        - output stream

NOTES
          MT-NOTE: answer_list_on_error_print_or_exit() is MT safe


38.4.16 answer_list_output

NAME
          answer_list_output() -- output and free answer_list

SYNOPSIS
          bool
          answer_list_output(lList **answer_list)

FUNCTION
          Prints all messages contained in "answer_list".
          The ERROR, WARNING and INFO macros will be used for output.
          
          If the "answer_list" contains at least one error then this
          function will return true.
          
          If there is no error contained in 'answer_list' then this function
          will return with a value of false.
          
          "*answer_list" will be freed and set to NULL.

INPUTS
          lList **answer_list     - AN_Type list

NOTES
          MT-NOTE: answer_list_output() is MT safe


38.4.17 answer_list_print_err_warn

NAME
          answer_list_print_err_warn() -- Print and/or exit

SYNOPSIS
          int answer_list_print_err_warn(lList **answer_list,
                                         const char *err_prefix,
                                         const char *warn_prefix)

FUNCTION
          Prints all messages contained in "answer_list". All error
          messages will be printed to stderr with an an initial "err_prefix".
          All warning and info messages will be printed to stdout with
          the prefix "warn_prefix".
          
          If the "answer_list" contains at least one error then this
          function will return with a positive return value. This value
          is the errror status of the first error message.
          
          If there is no error contained in 'answer_list' than this function
          will return with a value of 0.
          
          "*answer_list" will be freed.

INPUTS
          lList **answer_list     - AN_Type list
          const char *err_prefix  - e.g. "qsub: "
          const char *warn_prefix - e.g. MSG_WARNING

NOTES
          MT-NOTE: answer_list_print_err_warn() is MT safe


38.4.18 answer_list_replace

NAME
          answer_list_replace() -- replace an answer list

SYNOPSIS
          void answer_list_replace(lList **answer_list, lList **new_list)

FUNCTION
          free *answer_list and replace it by *new_list.

INPUTS
          lList **answer_list - AN_Type
          lList **new_list    - AN_Type

RESULT
          void - none

NOTES
          MT-NOTE: answer_list_replace() is MT safe


38.4.19 answer_list_to_dstring

NAME
          answer_list_to_dstring() -- Copy answer to dstring without newline

SYNOPSIS
          void answer_list_to_dstring(const lList *alp, dstring *diag)

FUNCTION
          Copy answer list text into dstring with each element separated by a
          newline character.

INPUTS
          const lList *alp        - AN_Type list
          dstring *diag           - destination dstring

RESULT
          void -

NOTES
          MT-NOTE: answer_list_to_dstring() is MT safe


38.4.20 answer_log

NAME
          answer_log() -- output answer

SYNOPSIS
          bool
          answer_log(lListElem *answer)

FUNCTION
          Prints the message contained in "answer".
          The CRITICAL, ERROR, WARNING and INFO macros will be used for output.

INPUTS
          lListElem *answer       - AN_Type element

RESULT
          bool - true if answer is an error, false otherwise and if answer == NULL

NOTES
          MT-NOTE: answer_log() is MT safe


38.4.21 answer_print_text

NAME
          answer_print_text() -- Prints error text

SYNOPSIS
          void answer_print_text(const lListElem *answer,
                                 FILE *stream
                                 const char *prefix,
                                 const char *suffix)

FUNCTION
          Prints "prefix", the error text of "answer" and "suffix"
          to "stream".

INPUTS
          const lListElem *answer - AN_Type element
          FILE *stream            - Output stream
          const char *prefix      - Introductional message
          const char *prefix      - Final message

NOTES
          MT-NOTE: answer_print_text() is MT safe


38.4.22 answer_to_dstring

NAME
          answer_to_dstring() -- Copy answer to dstring without newline

SYNOPSIS
          void answer_to_dstring(const lListElem *answer, dstring *diag)

FUNCTION
          Copy answer text into dstring without newline character.

INPUTS
          const lListElem *answer - AN_Type element

OUTPUT
          dstring *diag           - destination dstring

RESULT
          void -

NOTES
          MT-NOTE: answer_to_dstring() is MT safe


38.5 attr


38.5.1 attr_create

NAME
          attr_create() -- Returns a new attribute element

SYNOPSIS
          static lListElem *
          attr_create(lList **answer_list, const char *href, void *value,
                      const lDescr *descriptor, int href_nm, int value_nm)

FUNCTION
          If an error occures "answer_list" will be filled with an error
          message. "href" is the hostname or hgroupname of the new element.
          "value" is a pointer to the new value for that attribute. "descriptor"
          is the CULL descriptor wich will be used to create the new element.
          "href_nm" is the CULL name of the field where the "href" name will
          be stored and "value_nm" defines the value of the field which
          will be filled with the "value".

INPUTS
          lList **answer_list      - AN_Type list
          const char *href         - host oder hgroupname
          void *value              - pointer to the attributes value
          const lDescr *descriptor - CULL descriptor
          int href_nm              - CULL field name host or hgroupname
          int value_nm             - CULL field name for the value

RESULT
          lListElem * - new CULL element or NULL in case on an error

NOTES
          There are typesafe versions of this function. Have a look into
          the headerfile and look for TEMPLATE_ATTR_PROTO. These macro
          creates the typesafe versions. E.g.
          
             str_attr_create()
             ulng_attr_create()
             bool_attr_create()
             ...
             strlist_attr_create()
          
          MT-NOTE: attr_create() is MT safe


38.5.2 attr_list_add

NAME
          attr_list_add() -- Add a new attribute entry to a list

SYNOPSIS
          static bool
          attr_list_add(lList **this_list, lList **answer_list, lListElem **attr,
                        int flags, lList **ambiguous_href_list,
                        const lDescr *descriptor, int href_nm, int value_nm)

FUNCTION
          "this_list" and "attr" must have the same "descriptor". "href_nm"
          defines one cull field within "attr" which containes a hostname
          or hgroup-name. "value_nm" containes the value of that concerned
          attribute.
          "answer_list" will be filled in case of an error.
          "flags" can be used to influence the behaviour of this function
          in case of duplicates or other ambiguities within the resulting
          list.
          "ambiguous_href_list" might be used as output parameter for this
          function. Find more detailes in the description of the flags
          parameter below.

INPUTS
          lList **this_list           - attribute list
          lList **answer_list         - AN_Type list
          lListElem **attr            - attribute pointer
          int flags                   - behaviour bitmask
          
             HOSTATTR_OVERWRITE - If there is already an element in "this_list"
                which has the same hostname or hgroup, then the value of this
                element will be overwritten if this flag is set.
                If this flag is not given and the function should add a
                duplicate, then this will be counted as function error.
          
             HOSTATTR_ALLOW_AMBIGUITY - If the resulting "this_list" would
                result in an ambigous configuration for a ceratin host then
                this is allowed if the flag is given. Otherwise it will
                be rejected. In that case "ambiguous_href_list" will be
                filled with the conflicting hostnames.
          
          lList **ambiguous_href_list - HR_Type list
          const lDescr *descriptor    - CULL descriptor
          int href_nm                 - CULL field name
          int value_nm                - CULL value name

RESULT
          static bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: attr_list_add() is not MT safe


38.5.3 attr_list_add_set_del

NAME
          attr_list_add_set_del() -- add/replace/delete an attribute entry

SYNOPSIS
          static bool
          attr_list_add_set_del(lList **this_list, lList **answer_list,
                                const char *hostname, void *value,
                                bool remove, const lDescr *descriptor,
                                int href_nm, int value_nm)

FUNCTION
          This function can be used to remove an entry from "this_list"
          or it can add a new entry or replace an existing one. Find a
          more detailed description in sgeobj/attr/attr_create()

INPUTS
          lList **this_list        - cull list of type "descriptor"
          lList **answer_list      - AN_Type list
          const char *hostname     - hostname or hgroup name
          void *value              - pointer to value
          bool remove              - true -> remove the element
          const lDescr *descriptor - CULL descriptor
          int href_nm              - CULL field name
          int value_nm             - CULL value name

RESULT
          static bool - error status
             true  - success
             false - error

NOTES
          MT-NOTE: attr_list_add_set_del() is MT safe

SEE ALSO


38.6 binding


38.6.1 –BN_Type

NAME
          BN_Type -- CULL binding element

DG TODO
          SGE_ULONG(RN_min)
             minimum or start value of an id range (e.g. 1)
          
          SGE_ULONG(RN_max)
             maximum or end value of an id range (e.g. 9)
          
          SGE_ULONG(RN_step)
             stepsize (e.g. 2)

FUNCTION
          CULL element holding values which define a id range
          (e.g. 1-9:2 => 1, 3, 5, 7, 9).
          Lists of this CULL element are hold within a CULL job element
          (JB_Type) to hold job array task ids.
          Several functions may be used to access/modify/delete range
          elements and range lists. You may find them in the 'SEE ALSO'
          section. It is highly advised to use these access functions
          because they assure and require a defined structure of
          elements and lists.
          

SEE ALSO


38.7 centry


38.7.1 centry_create

NAME
          centry_create() -- Create a preinitialized centry element

SYNOPSIS
          lListElem *
          centry_create(lList **answer_list, const char *name)

FUNCTION
          Create a preinitialized centry element with the given "name".

INPUTS
          lList **answer_list  - AN_Type
          const char *name     - full name

RESULT
          lListElem * - CE_Type element


38.7.2 centry_elem_validate

NAME
          centry_elem_validate() -- validates a element and checks for duplicates

SYNOPSIS
          int centry_elem_validate(lListElem *centry,
                                       lList *centry_list,
                                       lList *answer_list)

FUNCTION
          Checks whether the configuration within the new centry is okay or not.
          A centry is valid when it satisfies the following rules:
              name    : has to be unique
              Short cu  : has to be unique
              Type       : every type from the list (string, host, cstring, int,
                                                    double, boolean, memory, time)
              Consumable : can only be defined for: int, double, memory, time
          
              Relational operator:
              - for consumables:              only <=
              - for non consumables:
                 - string, host, cstring:     only ==, !=
                 - boolean:                   only ==
                 - int, double, memory, time: ==, !=, <=, <, =>, >
          
              Requestable      : for all attribute
              default value         : only for consumables
          
          The type for built-in attributes is not allowed to be changed!
          
          When no centry list is passed in, the check for unique name and
          short cuts is skipped.

INPUTS
          lListElem *centry     - the centry list, which should be validated
          lList *centry_list    - if not null, the function checks, if the
                                  centry element is already in the list
          lList *answer_list    - contains the error messages

RESULT
          bool  false - error (the anwer_list contains the error message)
                true - okay


38.7.3 centry_fill_and_check

NAME
          centry_fill_and_check() -- fill and check the attribute

SYNOPSIS
          int centry_fill_and_check(lListElem *cep,
                                    bool allow_empty_boolean,
                                    bool allow_neg_consumable)

FUNCTION
          fill and check the attribute

INPUTS
          lListElem *cep           - CE_Type, this object will be checked
          lList** answer_list      - answer list
          int allow_empty_boolean  - boolean
             true  - NULL values of boolean attributes will
                     be replaced with "true"
             false - NULL values will be handled as error
          int allow_neg_consumable - boolean
             true  - negative values for consumable
                     resources are allowed.
             false - function will return with -1 if it finds
                     consumable resources with a negative value

RESULT
           0 on success
          -1 on error
           an error message will be written into SGE_EVENT


38.7.4 centry_is_referenced

NAME
          centry_is_referenced() -- Is centry element referenced?

SYNOPSIS
          bool
          centry_is_referenced(const lListElem *centry,
                               lList **answer_list,
                               const lList *master_cqueue_list,
                               const lList *master_exechost_list,
                               const lList *master_sconf_list)

FUNCTION
          Is the centry element referenced in a sublist of
          "master_queue_list", "master_exechost_list" or
          "master_sconf_list".

INPUTS
          const lListElem *centry           - CE_Type
          lList **answer_list               - AN_Type
          const lList *master_cqueue_list   - CQ_Type
          const lList *master_exechost_list - EH_Type

RESULT
          bool - true or false


38.7.5 centry_list_fill_request

NAME
          centry_list_fill_request() -- fills and checks list of complex entries

SYNOPSIS
          int centry_list_fill_request(lList *centry_list,
                                       lList *master_centry_list,
                                       bool allow_non_requestable,
                                       bool allow_empty_boolean,
                                       bool allow_neg_consumable)

FUNCTION
          This function fills a given list of complex entries with missing
          attributes which can be found in the complex. It checks also
          wether the given in the centry_list-List are valid.

INPUTS
          lList *this_list           - resources as complex list CE_Type
          lList **answer_list        - answer list
          lList *master_centry_list  - the global complex list
          bool allow_non_requestable - needed for qstat -l or qmon customize
                                      dialog
          int allow_empty_boolean    - boolean
             true  - NULL values of boolean attributes will
                     be replaced with "true"
             false - NULL values will be handled as error
          int allow_neg_consumable  - boolean
             true  - negative values for consumable
                     resources are allowed.
             false - function will return with -1 if it finds
                     consumable resources with a negative value

RESULT
          int - error
             0 on success
            -1 on error
             an error message will be written into SGE_EVENT


38.7.6 centry_list_get_master_list

NAME
          centry_list_get_master_list() -- return master list

SYNOPSIS
          lList ** centry_list_get_master_list(void)

FUNCTION
          Return master list.

INPUTS
          void - NONE

RESULT
          lList ** - CE_Type master list


38.7.7 centry_list_init_double

NAME
          centry_list_init_double() -- Initialize double from string

SYNOPSIS
          bool centry_list_init_double(lList *this_list)

FUNCTION
          Initialize all double values contained in "this_list"

INPUTS
          lList *this_list - CE_Type list

RESULT
          bool - true


38.7.8 centry_list_locate

NAME
          centry_list_locate() -- Find Centry element

SYNOPSIS
          lListElem *centry_list_locate(const lList *this_list, const char *name)

FUNCTION
          Find CEntry element with "name" in "this_list".

INPUTS
          const lList *this_list - CE_Type list
          const char *name       - name of an CE_Type entry

RESULT
          lListElem * - CE_Type element


38.7.9 centry_list_sort

NAME
          centry_list_sort() -- Sort a CE_Type list

SYNOPSIS
          bool centry_list_sort(lList *this_list)

FUNCTION
          Sort a CE_Type list

INPUTS
          lList *this_list - CE_Type list

RESULT
          bool - error state
             true  - success
             false - error


38.7.10 centry_print_resource_to_dstring

NAME
          centry_print_resource_to_dstring() -- Print to dstring

SYNOPSIS
          bool
          centry_print_resource_to_dstring(const lListElem *this_elem,
                                           dstring *string)

FUNCTION
          Print resource string (memory, time) to dstring.

INPUTS
          const lListElem *this_elem - CE_Type
          dstring *string            - dynamic string

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: centry_print_resource_to_dstring() is MT safe


38.7.11 centry_urgency_contribution

NAME
          centry_urgency_contribution() -- Compute urgency for a particular resource

SYNOPSIS
          double
          centry_urgency_contribution(int slots, const char *name, double
                                      value, const lListElem *centry)

FUNCTION
          The urgency contribution for a particular resource 'name' is determined
          based on the 'slot' amount and using 'value' as per slot request. The
          urgency value in the 'centry' element is used.

INPUTS
          int slots               - The slot amount assumed.
          const char *name        - The resource name.
          double value            - The per slot request.
          const lListElem *centry - The centry element (CE_Type)

RESULT
          double - The resulting urgency contribution

NOTES
          MT-NOTES: centry_urgency_contribution() is MT safe


38.8 ckpt


38.8.1 ckpt_is_referenced

NAME
          ckpt_is_referenced() -- Is a given CKPT referenced in other objects?

SYNOPSIS
          bool ckpt_is_referenced(const lListElem *ckpt, lList **answer_list,
                                  const lList *master_job_list,
                                  const lList *master_cqueue_list)

FUNCTION
          This function returns true if the given "ckpt" is referenced
          in at least one of the objects contained in "master_job_list" or
          "master_cqueue_list". If this is the case than
          a corresponding message will be added to the "answer_list".

INPUTS
          const lListElem *ckpt           - CK_Type object
          lList **answer_list             - AN_Type list
          const lList *master_job_list    - JB_Type list
          const lList *master_cqueue_list - CQ_Type list

RESULT
          bool - true or false


38.8.2 ckpt_list_do_all_exist

NAME
          ckpt_list_do_all_exist() -- Do all ckpt's exist?

SYNOPSIS
          bool
          ckpt_list_do_all_exist(const lList *ckpt_list,
                                 lList **answer_list,
                                 const lList *ckpt_ref_list)

FUNCTION
          Test if the checkpointing objects whose name is contained in
          "ckpt_ref_list" is contained in "ckpt_list".

INPUTS
          const lList *ckpt_list     - CK_Type list
          lList **answer_list        - AN_Type list
          const lList *ckpt_ref_list - ST_Type list containing ckpt names

RESULT
          bool - true if all ckpt objects exist


38.8.3 ckpt_list_get_master_list

NAME
          ckpt_list_get_master_list() -- Return pointer to master ckpt list

SYNOPSIS
          lList ** ckpt_list_get_master_list(void)

FUNCTION
          Return pointer to master ckpt list

RESULT
          lList ** - master ckpt list


38.8.4 ckpt_list_locate

NAME
          ckpt_list_locate -- find a ckpt object in a list

SYNOPSIS
          lListElem *ckpt_list_locate(lList *ckpt_list, const char *ckpt_name)

FUNCTION
          This function will return a ckpt object by name if it exists.
          

INPUTS
          lList *ckpt_list      - CK_Type object
          const char *ckpt_name - name of the ckpt object.

RESULT
          NULL - ckpt object with name "ckpt_name" does not exist
          !NULL - pointer to the cull element (CK_Type)


38.8.5 ckpt_validate

NAME
          ckpt_validate -- validate all ckpt interface parameters

SYNOPSIS
          int ckpt_validate(lListElem *ep, lList **alpp);

FUNCTION
          This function will test all ckpt interface parameters.
          If all are valid then it will return successfull.

INPUTS
          ep     - element which sould be verified.
          answer - answer list where the function stored error messages

RESULT
          [answer] - error messages will be added to this list
          STATUS_OK - success
          STATUS_EUNKNOWN or STATUS_EEXIST - error

NOTES
          MT-NOTE: ckpt_validate() is not MT safe


38.8.6 sge_parse_checkpoint_attr

NAME
          sge_parse_checkpoint_attr() -- make "when" bitmask from string

SYNOPSIS
          int sge_parse_checkpoint_attr(const char *attr_str)

FUNCTION
          Parse checkpoint "when" string and return a bitmask.

INPUTS
          const char *attr_str - when string

RESULT
          int - bitmask of checkpoint specifers
                0 if attr_str == NULL or nothing set or value
                may be a time value

NOTES
          MT-NOTE: sge_parse_checkpoint_attr() is MT safe


38.9 conf


38.9.1 policy_hierarchy_char2enum

NAME
          policy_hierarchy_char2enum() -- Return value for a policy char

SYNOPSIS
          policy_type_t policy_hierarchy_char2enum(char character)

FUNCTION
          This function returns a enum value for the first letter of a
          policy name.

INPUTS
          char character - "O", "F" or "S"

RESULT
             policy_type_t - enum value
          
          MT-NOTE:
             not thread safe, needs LOCK_SCHED_CONF(read)


38.9.2 policy_hierarchy_enum2char

NAME
          policy_hierarchy_enum2char() -- Return policy char for a value

SYNOPSIS
          char policy_hierarchy_enum2char(policy_type_t value)

FUNCTION
          Returns the first letter of a policy name corresponding to the
          enum "value".

INPUTS
          policy_type_t value - enum value

RESULT
             char - "O", "F", "S", "D"
          
          MT-NOTE:
             not thread safe, needs LOCK_SCHED_CONF(read)


38.9.3 policy_hierarchy_verify_value

NAME
          policy_hierarchy_verify_value() -- verify a policy string

SYNOPSIS
          int policy_hierarchy_verify_value(const char* value)

FUNCTION
          The function tests whether the given policy string (value) is i
          valid.

INPUTS
          const char* value - policy string

RESULT
             int - 0 -> OK
                   1 -> ERROR: one char is at least twice in "value"
                   2 -> ERROR: invalid char in "value"
                   3 -> ERROR: value == NULL
          
          MT-NOTE:  is MT safe, uses only the given data.


38.9.4 sconf_ph_fill_array

NAME
          sconf_ph_fill_array() -- fill the policy array

SYNOPSIS
          void sconf_ph_fill_array(policy_hierarchy_t array[],
                                           const char *value)

FUNCTION
          Fill the policy "array" according to the characters given by
          "value".
          
          value == "FODS":
             policy_hierarchy_t array[4] = {
                 {FUNCTIONAL_POLICY, 1},
                 {OVERRIDE_POLICY, 1},
                 {DEADLINE_POLICY, 1},
                 {SHARE_TREE_POLICY, 1}
             };
          
          value == "FS":
             policy_hierarchy_t array[4] = {
                 {FUNCTIONAL_POLICY, 1},
                 {SHARE_TREE_POLICY, 1},
                 {OVERRIDE_POLICY, 0},
                 {DEADLINE_POLICY, 0}
             };
          
          value == "OFS":
             policy_hierarchy_t hierarchy[4] = {
                 {OVERRIDE_POLICY, 1},
                 {FUNCTIONAL_POLICY, 1},
                 {SHARE_TREE_POLICY, 1},
                 {DEADLINE_POLICY, 0}
             };
          
          value == "NONE":
             policy_hierarchy_t hierarchy[4] = {
                 {OVERRIDE_POLICY, 0},
                 {FUNCTIONAL_POLICY, 0},
                 {SHARE_TREE_POLICY, 0},
                 {DEADLINE_POLICY, 0}
             };

INPUTS
          policy_hierarchy_t array[] - array with at least POLICY_VALUES
                                       values
          const char* value          - "NONE" or any combination
                                       of the first letters of the policy
                                       names (e.g. "OFSD")

RESULT
             "array" will be modified
          
          MT-NOTE:  is MT safe, uses LOCK_SCHED_CONF(read)


38.9.5 sconf_ph_print_array

NAME
          sconf_ph_print_array() -- print hierarchy array

SYNOPSIS
          void sconf_ph_print_array(policy_hierarchy_t array[])

FUNCTION
          Print hierarchy array in the debug output

INPUTS
             policy_hierarchy_t array[] - array with at least
                                          POLICY_VALUES values
          
          MT-NOTE: is MT save, no lock needed, works on the passed in data


38.10 cqueue


38.10.1 cqueue_create

NAME
          cqueue_create() -- Create a new cluster queue object

SYNOPSIS
          lListElem *
          cqueue_create(lList **answer_list,
                        const char *name)

FUNCTION
          Returns a new cluster queue object with the name "name".

INPUTS
          lList **answer_list - AN_Type list
          const char *name    - cluster queue name

RESULT
          lListElem * - CQ_Type object or NULL


38.10.2 cqueue_is_a_href_referenced

NAME
          cqueue_is_a_href_referenced() -- Is one href referenced

SYNOPSIS
          bool
          cqueue_is_a_href_referenced(const lListElem *this_elem,
                                      const lList *href_list,
                                      bool only_hostlist)

FUNCTION
          Returns true if at least one host contained in "href_list" is
          referenced in the cluster queue "this_elem". If "only_hostlist"
          is true then only the hostlist will be tested and all
          parameter lists will be ignored.

INPUTS
          const lListElem *this_elem - CQ_Type object
          const lList *href_list     - HR_Type list
          bool only_hostlist         - check only hostlist and ignore
                                       all parameter lists

RESULT
          bool - at least one object is referenced


38.10.3 cqueue_is_hgroup_referenced

NAME
          cqueue_is_hgroup_referenced() -- is a hgroup referenced in cqueue

SYNOPSIS
          bool
          cqueue_is_hgroup_referenced(const lListElem *this_elem,
                                      const lListElem *hgroup)

FUNCTION
          Is the given "hgroup" object referenced in the cluster queue
          "this_elem".

INPUTS
          const lListElem *this_elem - CQ_Type
          const lListElem *hgroup    - HGRP_Type

RESULT
          bool - true if "hgroup" is referenced


38.10.4 cqueue_is_href_referenced

NAME
          cqueue_is_href_referenced() -- is a host/hostgroup referenced in cqueue

SYNOPSIS
          bool
          cqueue_is_href_referenced(const lListElem *this_elem,
                                    const lListElem *href, bool only_hostlist)

FUNCTION
          Is the given "href" (host or hostgroup referenece) used in the
          definition of the cluster queue "this_elem"? If "only_hostlist"
          is true then only the hostlist will be tested and all
          parameter lists will be ignored.
          

INPUTS
          const lListElem *this_elem - CQ_Type
          const lListElem *href      - HR_Type
          bool    only_hostlist      - check only hostlist and ignore
                                       all parameter lists

RESULT
          bool - true if it is referenced


38.10.5 cqueue_list_add_cqueue

NAME
          cqueue_list_add_cqueue() -- Add a cluster queue to its master list

SYNOPSIS
          bool
          cqueue_list_add_cqueue(lListElem *queue)

FUNCTION
          Add a cluster queue in its master list.

INPUTS
          lListElem *queue - CQ_Type

RESULT
          bool - error state
             true  - success
             false - error


38.10.6 cqueue_list_find_all_matching_references

NAME
          cqueue_list_find_all_matching_references() -- as it says

SYNOPSIS
          bool
          cqueue_list_find_all_matching_references(const lList *this_list,
                                                   lList **answer_list,
                                                   const char *cqueue_pattern,
                                                   lList **qref_list)

FUNCTION
          Find all cqueues in "this_list" where the cqueue name matches
          the pattern "cqueue_pattern". The names of that cqueues will
          be added to the sublist "qref_list" (QR_Type). "answer_list" will
          contain an error message if this function failes.

INPUTS
          const lList *this_list     - CQ_Type
          lList **answer_list        - AN_Type
          const char *cqueue_pattern - fnmatch patterm
          lList **qref_list          - QR_Type list

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: cqueue_list_find_all_matching_references() is MT safe


38.10.7 cqueue_list_find_hgroup_references

NAME
          cqueue_list_find_hgroup_references() -- find hgroup references

SYNOPSIS
          bool
          cqueue_list_find_hgroup_references(const lList *this_list,
                                             lList **answer_list,
                                             const lListElem *hgroup,
                                             lList **string_list)

FUNCTION
          This function add each cqueue name contained in "this_list"
          to "string_list" where "hgroup" is referenced. Errors will
          be reported via "answer_list".

INPUTS
          const lList *this_list  - CQ_Type
          lList **answer_list     - AN_Type
          const lListElem *hgroup - HGRP_Type
          lList **string_list     - ST_Type

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: cqueue_list_find_hgroup_references() is MT safe


38.10.8 cqueue_list_locate

NAME
          cqueue_list_locate() -- Find a cluster queue in list

SYNOPSIS
          lListElem *
          cqueue_list_locate(const lList *this_list,
                             const char *name)

FUNCTION
          Find the cluster queue with name "name" in the list "this_list".

INPUTS
          const lList *this_list - CQ_Type list
          const char *name       - cluster queue name

RESULT
          lListElem * - cluster queue object or NULL


38.10.9 cqueue_list_locate_qinstance

NAME
          cqueue_list_locate_qinstance() -- finds a certain qinstance

SYNOPSIS
          lListElem *
          cqueue_list_locate_qinstance(lList *cqueue_list, const char *full_name)

FUNCTION
          Returns a certain qinstance with the name "full_name" from
          the master cqueue list given by "cqueue_list".

INPUTS
          lList *cqueue_list    - CQ_Type
          const char *full_name - qinstance name of the form <CQNAME>@<HOSTNAME>

RESULT
          lListElem * - QU_Type

NOTES
          MT-NOTE: cqueue_list_locate_qinstance() is MT safe


38.10.10 cqueue_list_locate_qinstance_msg

NAME
          cqueue_list_locate_qinstance_msg() -- finds a certain qinstance

SYNOPSIS
          lListElem *
          cqueue_list_locate_qinstance_msg(lList *cqueue_list, const char *full_name, bool raise_error)

FUNCTION
          Returns a certain qinstance with the name "full_name" from
          the master cqueue list given by "cqueue_list".

INPUTS
          lList *cqueue_list    - CQ_Type
          const char *full_name - qinstance name of the form <CQNAME>@<HOSTNAME>
          bool raise_error      - true - show error messages
                                - false - suppress error messages

RESULT
          lListElem * - QU_Type

NOTES
          MT-NOTE: cqueue_list_locate_qinstance_msg() is MT safe


38.10.11 cqueue_list_set_tag

NAME
          cqueue_list_set_tag() -- tags each cqueue and optionally qinstance

SYNOPSIS
          void
          cqueue_list_set_tag(lList *this_list,
                              u_long32 tag_value, bool tag_qinstances)

FUNCTION
          Tags all cqueues contained in "this_list" with the value
          "tag_value". Optionally all qinstances contained in the
          CQ_qinstances-sublist will be tagged too if "tag_qinstances"
          is true.

INPUTS
          lList *this_list    - CQ_Type
          u_long32 tag_value  - value
          bool tag_qinstances - true if instances should be tagged

RESULT
          void - None

NOTES
          MT-NOTE: cqueue_list_set_tag() is MT safe


38.10.12 cqueue_locate_qinstance

NAME
          cqueue_locate_qinstance() -- returns one qinstance from a cqueue

SYNOPSIS
          lListElem *
          cqueue_locate_qinstance(const lListElem *this_elem,
                                  const char *hostname)

FUNCTION
          Finds the queue instance locateted on the host "hostname" of a
          given cluster queue "this_elem".

INPUTS
          const lListElem *this_elem - CQ_Type object
          const char *hostname       - resolved hostname

RESULT
          lListElem * - qinstance object or NULL


38.10.13 cqueue_name_split

NAME
          cqueue_name_split() -- Get the CQ and host part of a QI name

SYNOPSIS
          bool
          cqueue_name_split(const char *name,
                            dstring *cqueue_name,
                            dstring *host_domain,
                            bool *has_hostname,
                            bool *has_domain)

FUNCTION
          Splits a qinstance name into its components.
          
          Examples:
          
          QI-name         cqueue_name  host_domain  has_hostname  has_domain
          ------------------------------------------------------------------
          all.q           all.q        ""           false         false
          all.q@hostname  all.q        hostname     true          false
          all.q@@hgrp     all.q        @hgrp        false         true

INPUTS
          const char *name     - CQ/QD or QI name
          dstring *cqueue_name - CQ part of the name
          dstring *host_domain - host or hostgroup or nothing
          bool *has_hostname   - is "host_domain" a hostname
          bool *has_domain     - if "host_domain" a hostgroup

RESULT
          bool - error state
          always true  - success


38.10.14 cqueue_set_template_attributes

NAME
          cqueue_set_template_attributes() -- Set default attributes

SYNOPSIS
          bool
          cqueue_set_template_attributes(lListElem *this_elem,
                                         lList **answer_list)

FUNCTION
          This function initializes all attributes of an empty cluster
          queue with default values. Please note that "this_elem" has to
          be "empty" before this function is called.

INPUTS
          lListElem *this_elem - CQ_Type
          lList **answer_list  - AN_Type

RESULT
          bool - error state
             true  - success
             false - error


38.10.15 cqueue_trash_used_href_setting

NAME
          cqueue_trash_used_href_setting() -- trash certain setting

SYNOPSIS
          bool
          cqueue_trash_used_href_setting(lListElem *this_elem,
                                         lList **answer_list,
                                         const char *hgroup_or_hostname)

FUNCTION
          Trash all attribute specific overwritings in "this_elem" for
          the give host or hgroup "hgroup_or_hostname". Errors will be
          reported in "answer_list".

INPUTS
          lListElem *this_elem           - CQ_Type
          lList **answer_list            - AN_Type
          const char *hgroup_or_hostname - host or hgroup name

RESULT
          bool - error result
             true  - success
             false - error

NOTES
          MT-NOTE: cqueue_trash_used_href_setting() is MT safe


38.10.16 cqueue_verify_attributes

NAME
          cqueue_verify_attributes() -- check all cluster queue attributes

SYNOPSIS
          bool
          cqueue_verify_attributes(lListElem *cqueue,
                                   lList **answer_list,
                                   lListElem *reduced_elem,
                                   bool in_master)

FUNCTION
          Check all cluster queue settings (and correct them if possible).
          
             - test that there is exact one default setting
             - check that there is only one setting for used hgroups/hosts
             - resolve hostnames
             - test attribute values

INPUTS
          lListElem *cqueue       - CQ_Type object to be verified
          lList **answer_list     - AN_Type list
          lListElem *reduced_elem - reduced CQ_Type. Containes
                                    only those attributes to be checked
          bool in_master          - true if this function is called in the
                                    master code

RESULT
          bool - error state
             true  - success
             false - error


38.10.17 cqueue_xattr_pre_gdi

NAME
          cqueue_xattr_pre_gdi() --

SYNOPSIS
          bool
          cqueue_xattr_pre_gdi(lList *this_list, lList **answer_list)

FUNCTION
          This function makes sure that a cqueue elements has the necessary
          information before it is sent to qmaster as a modify gdi request

INPUTS
          lList *this_list    - CQ_Type
          lList **answer_list - AN_Type

RESULT
          bool - error state
             true  - success
             false - error ("answer_list" containes more information

NOTES
          MT-NOTE: cqueue_xattr_pre_gdi() is MT safe


38.11 cqueue_is_used_in_subordinate

NAME
          cqueue_is_used_in_subordinate() -- checks for cqueue references

SYNOPSIS
          bool cqueue_is_used_in_subordinate(const char *cqueue_name,
                                             lListElem *cqueue)

FUNCTION
          The function goes through all cq subordinate definition and looks
          for the cq_name handed in. If it is found, the function will return
          true.

INPUTS
          const char *cqueue_name - cq name to look for
          const lListElem *cqueue - cq to look in
          

RESULT
          bool - true - a reference was found

NOTES
          MT-NOTE: cqueue_is_used_in_subordinate() is MT safe


38.12 double_print_int_to_dstring

NAME
          double_print_int_to_dstring() -- Print a double into a dstring as an int

SYNOPSIS
          lListElem *
          double_print_int_to_dstring(double value, dstring *string)

FUNCTION
          Print a double into a dstring as an int.

INPUTS
          double value      - the value to print
          dstring *string   - the dstring to receive the value

RESULT
          bool - returns false if value is out of range for an int

NOTES
          MT-NOTE: double_print_int_to_dstring() is MT safe


38.13 double_print_to_dstring

NAME
          double_print_to_dstring() -- Print a double into a dstring

SYNOPSIS
          lListElem *
          double_print_to_dstring(double value, dstring *string)

FUNCTION
          Print a double into a dstring.

INPUTS
          double value      - the value to print
          dstring *string   - the dstring to receive the value

RESULT
          bool - returns false if something goes wrong

NOTES
          MT-NOTE: double_print_to_dstring() is MT safe


38.14 feature


38.14.1 feature_activate

NAME
          feature_activate() -- switches the active featureset

SYNOPSIS
          void feature_activate(featureset_ id)

FUNCTION
          Marks the current active featureset within the
          Master_FeatureSet_List as inactive and flags the featureset
          given as parameter as active.
          

INPUTS
          id - feature set constant

RESULT
          modifies the Master_FeatureSet_List

NOTES
          MT-NOTE: feature_activate() is MT safe


38.14.2 feature_get_active_featureset_id

NAME
          feature_get_active_featureset_id() -- current active featureset

SYNOPSIS
          feature_id_t feature_get_active_featureset_id()

FUNCTION
          return an id of the current active featureset

RESULT
          feature_id_t - (find the definition in the .h file)

NOTES
          MT-NOTE: feature_get_active_featureset_id() is MT safe


38.14.3 feature_get_already_read_from_file

NAME
          feature_get_already_read_from_file()

SYNOPSIS
          void feature_get_already_read_from_file(int i)

RESULT
          Returns value of per thread global variable already_read_from_file.


38.14.4 feature_get_featureset_id

NAME
          feature_get_featureset_id() -- Value for a featureset string

SYNOPSIS
          feature_id_t feature_get_featureset_id(char* name)

FUNCTION
          This function returns the corresponding enum value for
          a given featureset string

INPUTS
          char* name - feature set name earlier known as product
                       mode string

RESULT
          feature_id_t

NOTES
          MT-NOTE: feature_get_featureset_id() is MT safe


38.14.5 feature_get_featureset_name

NAME
          feature_get_featureset_name() -- return the product mode string

SYNOPSIS
          char* feature_get_featureset_name(feature_id_t id)

FUNCTION
          returns the corresponding modestring for a featureset constant

INPUTS
          feature_id_t id - constant

RESULT
          mode string

NOTES
          MT-NOTE: feature_get_featureset_name() is MT safe


38.14.6 feature_get_master_featureset_list

NAME
          feature_get_master_featureset_list()

SYNOPSIS
          lList **feature_get_master_featureset_list(void)

RESULT
          Returns pointer to location where per thread global list
          Master_FeatureSet_List is stored.


38.14.7 feature_get_product_name

NAME
          feature_get_product_name() -- get product name string

SYNOPSIS
          char* feature_get_product_name(featureset_product_name_id_t style)

FUNCTION
          This function will return a text string containing the
          the product name. The return value depends on the style
          parameter. An invalid style value will automatically be
          interpreted as FS_SHORT.

INPUTS
          style     - FS_SHORT         = return short name
                      FS_LONG          = return long name
                      FS_VERSION       = return version
                      FS_SHORT_VERSION = return short name and version
                      FS_LONG_VERSION  = return long name and version
          buffer    - buffer provided by caller
                      the string returned by this function points to
                      this buffer

RESULT
          char* - string

NOTES
          MT-NOTE: feature_get_product_name() is MT safe


38.14.8 feature_initialize

NAME
          feature_initialize() -- initialize this module

SYNOPSIS
          static void feature_initialize(void)

FUNCTION
          build up the CULL list "Master_FeatureSet_List" (FES_Type) with
          information found in the array "enabled_features_mask"

INPUTS
          static array enabled_features_mask[][]

RESULT
          initialized Master_FeatureSet_List

NOTES
          MT-NOTE: feature_initialize() is MT safe


38.14.9 feature_initialize_from_string

NAME
          feature_initialize_from_string() -- tag one featureset as active

SYNOPSIS
          int feature_initialize_from_string(char *mode)

FUNCTION
          This function interprets the mode string and tags the
          corresponding featureset enty within the Master_FeatureSet_List
          as active.

INPUTS
          char *mode - product mode string (valid strings are defined in
                       the arry featureset_list[])

RESULT
           0 OK
          -3 unknown mode-string

NOTES
          MT-NOTE: feature_initialize_from_string() is MT safe


38.14.10 feature_is_enabled

NAME
          feature_is_enabled() -- 0/1 whether the feature is enabled

SYNOPSIS
          bool feature_is_enabled(feature_id_t id)

FUNCTION
          return true or false whether the given feature is enabled or
          disabled in the current active featureset

INPUTS
          feature_id_t id

RESULT
          true or false

NOTES
          MT-NOTE: feature_is_enabled() is MT safe


38.14.11 feature_mt_init

NAME
          feature_mt_init() -- Initialize feature code for multi threading use.

SYNOPSIS
          void feature_mt_init(void)

FUNCTION
          Set up feature code. This function must be called at least once before
          any of the feature oriented functions can be used. This function is
          idempotent, i.e. it is safe to call it multiple times.
          
          Thread local storage for the feature code state information is reserved.

INPUTS
          void - NONE

RESULT
          void - NONE

NOTES
          MT-NOTE: feature_mt_init() is MT safe


38.14.12 feature_once_init

NAME
          feature_once_init() -- One-time feature code initialization.

SYNOPSIS
          static feature_once_init(void)

FUNCTION
          Create access key for thread local storage. Register cleanup function.
          
          This function must be called exactly once.

INPUTS
          void - none

RESULT
          void - none

NOTES
          MT-NOTE: feature_once_init() is MT safe.


38.14.13 feature_set_already_read_from_file

NAME
          feature_set_already_read_from_file()

SYNOPSIS
          void feature_set_already_read_from_file(int i)

FUNCTION
          Set per thread global variable already_read_from_file.


38.14.14 feature_state_destroy

NAME
          feature_state_destroy() -- Free thread local storage

SYNOPSIS
          static void feature_state_destroy(void* theState)

FUNCTION
          Free thread local storage.

INPUTS
          void* theState - Pointer to memory which should be freed.

RESULT
          static void - none

NOTES
          MT-NOTE: feature_state_destroy() is MT safe.


38.14.15 feature_state_init

NAME
          feature_state_init() -- Initialize feature code state.

SYNOPSIS
          static void feature_state_init(struct feature_state_t* theState)

FUNCTION
          Initialize feature code state.

INPUTS
          struct feature_state_t* theState - Pointer to feature state structure.

RESULT
          static void - none

NOTES
          MT-NOTE: feature_state_init() is MT safe.


38.15 hgroup


38.15.1 –HGRP_Type

NAME
          HGRP_Type - CULL hostgroup element

ELEMENTS
          SGE_HOST(HGRP_name)
             Name of the hostgroup
          
          SGE_LIST(HGRP_host_list)
             List of hostnames and/or hostgroup names

FUNCTION
          HGRP_Type elements are used to define groups of hosts. Each group
          will be identified by a unique name.
          Each hostgroup might refer to none, one or multiple hosts and/or
          hostgroups. This object makes it possible to define a network of
          hostgroups and hosts.
          
          
                            --------------
                            |            |
                            V            | 0:x
                      ------------- -----|
                      | HGRP_Type |               ------------
                      ------------- ------------> | hostname |
                                         0:x      ------------
          
          Example
          
             Following diagram shows a network of 9 hostgroups (A; B; C;
             D; E; G; H; I). Each of those groups references one host
             (A -> a; B -> b; C -> c; ...). Additionally some of those
             hostgroups refer to one (A -> C; B -> C; C -> E; ...) or two
             hostgroups (E -> F,G; F -> H,I) The connections are all
             uni-directional, you have to read the diagram from the left
             to the right.
          
                      -----                           -----
                      | A | -- a                      | H | -- h
                      ----- \                       / -----
                              -----           -----
                              | C | -- c      | F | -- f
                              -----         / -----
                      ----- /       \ -----         \ -----
                      | B | -- b      | E | -- e      | I | -- i
                      -----           -----           -----
                              ----- /       \ -----
                              | D | -- d      | G | -- g
                              -----           -----
          
          Several functions exist to create such networks and to find
          certain sets of hosts and hostgroups within such a network:
          
          hgroup_find_references("E", &answer, master_list, &hosts, &groups)
             hosts -> e
             groups -> F, G
          
          hgroup_find_all_references("E", &answer, master_list, &hosts, &groups)
             hosts -> e, f, g, h, i
             groups -> F, G, H, I
          
          hgroup_find_referencees("E", &answer, master_list, &groups)
             groups -> C, D
          
          hgroup_find_all_referencees("E", &answer, master_list, &groups)
             groups -> A, B, C, D

SEE ALSO


38.15.2 hgroup_add_references

NAME
          hgroup_add_references() -- Add a host or group reference

SYNOPSIS
          bool hgroup_add_references(lListElem *this_elem,
                                     lList **answer_list,
                                     const lList *href_or_groupref)

FUNCTION
          Add a host or group reference.

INPUTS
          lListElem *this_elem          - HGRP_Type elem
          lList **answer_list           - AN_Type list
          const lList *href_or_groupref - HR_Type list

RESULT
          bool - error state
             true  - Success
             false - Error


38.15.3 hgroup_check_name

NAME
          hgroup_check_name() -- determine if the name is a valid hgroup name

SYNOPSIS
          void check_hgroup_name(lList **answer_list, const char* name)

FUNCTION
          Determine if the given name is a valid hostgroup name. If not
          add an approbiate error to the answer_list

INPUTS
          lList **answer_list - answer list where errors are stored
          const char* name    - name of the hostgroup

RESULT
          bool - result
             true  -  name contains a valid name for a hostgroup
             false - name is not a valid name for a hostrgroup

NOTES
          MT-NOTE: check_hgroup_name() is not MT safe

SEE ALSO


38.15.4 hgroup_create

NAME
          hgroup_create() -- Create a new hgroup.

SYNOPSIS
          lListElem*
          hgroup_create(lList **answer_list, const char *name,
                        lList *href_or_groupref)

FUNCTION
          Create a new hostgroup.

INPUTS
          lList **answer_list     - AN_Type list
          const char *name        - name
          lList *href_or_groupref - list of hosts for this hgroup
          bool is_name_validate   - if true, the hgrp name is validated. Should be done all the time,
                                    there is only one case in qconf in that the name has to be ignored.

RESULT
          lListElem* - new element or NULL


38.15.5 hgroup_find_all_referencees

NAME
          hgroup_find_all_referencees() -- find groups refering to this group

SYNOPSIS
          bool
          hgroup_find_all_referencees(const lListElem *this_elem,
                                      lList **answer_list,
                                      lList *master_list,
                                      lList **occupants_groups)

FUNCTION
          Find all hostgroups from 'master_list' which reference the
          hostgroup 'this_elem'. The name of these hostgroups will be
          returned in the hreference list 'occupants_groups'.
          'answer_list' will contain error messages if the function is
          not successfull
          

INPUTS
          const lListElem *this_elem - HGRP_Type element
          lList **answer_list        - AN_Type list
          const lList *master_list   - list of all existing HGRP_Type elements
          lList **occupants_groups   - HR_Type list

RESULT
          bool - exit state
             true  - Success
             false - Error


38.15.6 hgroup_find_all_references

NAME
          hgroup_find_all_references() -- Find referenced host and groups

SYNOPSIS
          bool
          hgroup_find_all_references(const lListElem *this_elem,
                                     lList **answer_list, lList *master_list,
                                     lList **used_hosts, lList **used_groups)

FUNCTION
          Find directly or indirectly referenced hgroup names.
          'master_list' has to be the list of all existing hgroups.
          'used_hosts' and 'used_groups' will contain the names of
          hosts and groups referenced by 'this_elem'.

INPUTS
          const lListElem *this_elem - HGRP_Type
          lList **answer_list        - AN_Type list
          const lList *master_list   - HGRP_Type list
          lList **used_hosts         - HR_Type list
          lList **used_groups        - HR_Type list

RESULT
          bool - error state
             true  - Success
             false - Error

BUGS
          Extremely poor performance. Try not to use this function.


38.15.7 hgroup_find_referencees

NAME
          hgroup_find_referencees() -- Find groups refering to this group

SYNOPSIS
          bool
          hgroup_find_referencees(const lListElem *this_elem,
                                  lList **answer_list,
                                  lList *master_list,
                                  lList **occupants_groups
                                  lList **occupants_queues)

FUNCTION
          Find all hostgroups from 'master_list' which reference the
          hostgroup 'this_elem'. The name of these hostgroups will be
          returned in the hreference list 'occupants_groups'.
          'answer_list' will contain error messages if the function is
          not successfull

INPUTS
          const lListElem *this_elem        - HGRP_Type
          lList **answer_list               - AN_Type
          const lList *master_hgroup_list   - HGRP_Type master list
          const lList *master_cqueue_list   - CQ_Type
          lList **occupants_groups          - HR_Type
          lList **occupants_queues          - ST_Type

RESULT
          bool - Error state
             true  - Success
             false - Error


38.15.8 hgroup_find_references

NAME
          hgroup_find_references() -- find directly referenced hosts and groups

SYNOPSIS
          bool
          hgroup_find_references(const lListElem *this_elem,
                                 lList **answer_list,
                                 lList *master_list,
                                 lList **used_hosts,
                                 lList **used_groups)

FUNCTION
          Find all hgroups which are directly referenced by 'this_elem'
          'master_list' has to be the list of all existing hgroups.
          'used_hosts' and 'used_groups' will contain the names of
          hosts and groups after a call to this function.

INPUTS
          const lListElem *this_elem - HGRP_Type
          lList **answer_list        - AN_Type
          const lList *master_list   - HGRP_Type
          lList **used_hosts         - HR_Type
          lList **used_groups        - HR_Type

RESULT
          bool - Error state
             true  - Success
             false - Error


38.15.9 hgroup_list_exists

NAME
          hgroup_list_exists() -- Do hostgroups really exist.

SYNOPSIS
          bool
          hgroup_list_exists(const lList *this_list,
                             lList **answer_list,
                             const lList *href_list)

FUNCTION
          This functions returns true if all hostgroups given by the parameter
          "href_list" exist in "this_list". If one or more objects are missing
          a corresponding error message will be returned via "answer_list".

INPUTS
          const lList *this_list - HGRP_Type
          lList **answer_list    - AN_Type
          const lList *href_list - HR_Type

RESULT
          bool - true or false


38.15.10 hgroup_list_find_matching

NAME
          hgroup_list_find_matching() -- Find hgroups which match pattern

SYNOPSIS
          bool
          hgroup_list_find_matching(const lList *this_list,
                                    const char *hgroup_pattern,
                                    lList **href_list)

FUNCTION
          Selects all hostgroups of "this_list" which match the pattern
          "hgroup_pattern". All matching hostgroup names will be added to
          "href_list"

INPUTS
          const lList *this_list     - HGRP_Type list
          const char *hgroup_pattern - hostgroup pattern
          lList **used_hosts         - HR_Type list

RESULT
          bool - error state
             true  - success
             false - error


38.15.11 hgroup_list_find_matching_and_resolve

NAME
          hgroup_list_find_matching_and_resolve() -- Finds hostnames

SYNOPSIS
          bool
          hgroup_list_find_matching_and_resolve(const lList *this_list,
                                                const char *hgroup_pattern,
                                                lList **used_hosts)

FUNCTION
          Selects all hostgroups of "this_list" which match the pattern
          "hgroup_pattern". All hostnames which are directly or indirectly
           referenced will be added to "used_hosts"

INPUTS
          const lList *this_list     - HGRP_Type
          const char *hgroup_pattern - fnmatch pattern
          lList **used_hosts         - HR_Type

RESULT
          bool - error state
             true  - Success
             false - Error


38.15.12 hgroup_list_get_master_list

NAME
          hgroup_list_get_master_list() -- Returns master list

SYNOPSIS
          lList **hgroup_list_get_master_list(void)

FUNCTION
          Returns master list containing all existing hostgroup objects.

INPUTS
          void - none

RESULT
          lList** - HGRP_Type list


38.15.13 hgroup_list_locate

NAME
          hgroup_list_locate() -- Find a group by name

SYNOPSIS
          lListElem* hgroup_list_locate(const lList *this_list,
                                           const char *group)

FUNCTION
          Find a 'group' in 'this_list'.

INPUTS
          const lList *this_list - HGRP_Type list
          const char *group      - group name

RESULT
          lListElem* - found element or NULL


38.16 host


38.16.1 host_get_load_value

NAME
          host_get_load_value() -- return a load value of an exec host

SYNOPSIS
          const char* host_get_load_value(lListElem *host, const char *name)

FUNCTION
          Returns a certain load value for a certain host.

INPUTS
          lListElem *host  - the host to query
          const char *name - the name of the load value

RESULT
          const char* - string describing the load value

EXAMPLE
          lListElem *host = lGetElemHost(Master_Host_List, EH_name, "myhost");
          const char *value = host_get_load_value(host, "np_load_avg");
          printf("The load on host myhost is %s\n", value);


38.16.2 host_is_referenced

NAME
          host_is_referenced() -- Is a given host referenced in other objects?

SYNOPSIS
          bool host_is_referenced(const lListElem *host,
                                  lList **answer_list,
                                  const lList *queue_list
                                  const lList *hgrp_list)

FUNCTION
          This function returns true if the given "host" is referenced
          in a cqueue contained in "queue_list" or in a host group.
          If this is the case than a corresponding message will be added
          to the "answer_list".

INPUTS
          const lListElem *host   - EH_Type, AH_Type or SH_Type object
          lList **answer_list     - AN_Type list
          const lList *queue_list - CQ_Type list
          const lList *hgrp_list  - HGRP_Type list (Master list)

RESULT
          int - true (1) or false (0)


38.16.3 host_list_merge

NAME
          host_list_merge() -- merge global host settings into exec hosts

SYNOPSIS
          bool
          host_list_merge(lList *this_list)

FUNCTION
          Merges settings from the global host to the exec hosts objects.
          Currently this applies only to the report_variables attribute.

INPUTS
          lList *this_list - the exec host list to work on

RESULT
          bool - true on success, else false

NOTES
          MT-NOTE: host_list_merge() is MT safe

SEE ALSO


38.16.4 host_merge

NAME
          host_merge() -- merge global host settings into an exec host

SYNOPSIS
          bool
          host_merge(lListElem *host, const lListElem *global_host)

FUNCTION
          Merges settings from the global host object into a specific exec host.
          Use the global settings, if no host specific settings are done.
          Currently this applies only to the report_variables attribute.

INPUTS
          lListElem *host              - the host object to hold the merged config
          const lListElem *global_host - the global host object

RESULT
          bool - true on success, else false

NOTES
          MT-NOTE: host_merge() is MT safe

SEE ALSO


38.17 href


38.17.1 href_list_add

NAME
          href_list_add() -- Add host or hostgroup reference.

SYNOPSIS
          bool
          href_list_add(lList **this_list, lList **answer_list,
                        const char *host_or_group)

FUNCTION
          Add a host or hostgroup given by 'host_or_group' into the list
          'this_list'. If the function is successfull then the function
          returns 'true' otherwise it will add an entry into 'answer_list'
          and return with 'false'. If 'this_list' does not exist than it
          will be created.

INPUTS
          lList **this_list         - HR_Type list
          lList **answer_list       - AN_Type list
          const char *host_or_group - host or group name

RESULT
          bool - error state
             true - Success
             false - Error


38.17.2 href_list_append_to_dstring

NAME
          href_list_append_to_dstring() -- Print href-list to dstring

SYNOPSIS
          bool
          href_list_append_to_dstring(const lList *this_list,
                                      dstring *string)

FUNCTION
          Print href-list to dstring

INPUTS
          const lList *this_list - HR_Type
          dstring *string        - dynamic string

RESULT
          bool - Error state
             true  - Success
             false - Error


38.17.3 href_list_compare

NAME
          href_list_compare() -- Finds additional entries in list

SYNOPSIS
          bool
          href_list_compare(const lList *this_list, lList **answer_list,
                            const lList *list, lList **add_hosts,
                            lList **add_groups, lList **equity_hosts,
                            lList **equity_groups)

FUNCTION
          This function will find differences between two hostref lists
          given by 'this_list' and 'list'. Hosts and hostgroups which are
          only in 'this_list' can be found in 'add_hosts' and 'add_groups'.
          References which are contained in both lists can be found in
          'equity_hosts' and 'equity_groups' after a call to this function.
          
          If the calling function is not interested in one ore more of the
          result lists than NULL should be used as parameter. The calling
          function is responsible to free all result lists.
          
          If the callee is also interested in the references which are
          only part of 'list' than this function can not be used.
          href_list_find_diff() should be used in this case.

INPUTS
          const lList *this_list - HR_Type list to comapre
          lList **answer_list    - AN_Type list
          const lList *list      - 2nd HR_Type list to be compared
          lList **add_hosts      - HR_Type list
          lList **add_groups     - HR_Type list
          lList **equity_hosts   - HR_Type list
          lList **equity_groups  - HR_Type list

RESULT
          bool - error state
             true  - Success
             false - Error

SEE ALSO


38.17.4 href_list_debug_print

NAME
          href_list_debug_print() -- Prints HR_Type list into TOP_LAYER

SYNOPSIS
          void href_list_debug_print(const lList *this_list, const char *prefix)

FUNCTION
          Prints prefix and HR_Type "this_list" into TOP_LAYER of debug
          output if this_list exists.

INPUTS
          const lList *this_list - HR_Type list
          const char *prefix     - prefix string

RESULT
          void -  None


38.17.5 href_list_find_all_referencees

NAME
          href_list_find_all_referencees() -- Find occupying hosts and groups

SYNOPSIS
          bool
          href_list_find_all_referencees(const lList *this_list,
                                         lList **answer_list,
                                         const lList *master_list,
                                         lList **occupant_groups)

FUNCTION
          Finds recursivly all hostgroups which occupy the hostgroups mentioned in
          'this_list'. 'master_list' is the list of all
          existing hostgroups. Occupying hostgroups will be
          added to 'occupant_groups'. In case of any errors 'answer_list'
          will be filled.

INPUTS
          const lList *this_list   - RH_Type
          lList **answer_list      - AH_Type
          const lList *master_list - HGRP_Type
          lList **occupant_groups  - RH_Type

RESULT
          bool - error state
             true  - Success
             false - Error


38.17.6 href_list_find_all_references

NAME
          href_list_find_all_references() -- Find referenced hosts and hgroups

SYNOPSIS
          bool
          href_list_find_all_references(const lList *this_list,
                                        lList **answer_list,
                                        const lList *master_list,
                                        lList **used_hosts,
                                        lList **used_groups)

FUNCTION
          Finds all hosts and hostgroups which are directly and inderectly
          referenced by the hostgroups mentioned in 'this_list'.
          'master_list' is the list of all existing hostgroups. Referenced
          hosts and hostgroups will be added to 'used_hosts' and 'used_groups'.
          In case of any errors 'answer_list' will be filled.

INPUTS
          const lList *this_list   - RN_Type
          lList **answer_list      - AN_Type
          const lList *master_list - HGRP_Type
          lList **used_hosts       - RN_Type
          lList **used_groups      - RN_Type

RESULT
          bool - error state
             true  - Success
             false - Error


38.17.7 href_list_find_diff

NAME
          href_list_find_diff() -- difference between two lists

SYNOPSIS
          bool
          href_list_find_diff(const lList *this_list, lList **answer_list,
                              const lList *list, lList **add_hosts,
                              lList **rem_hosts, lList **add_groups,
                              lList **rem_groups)

FUNCTION
          Will identify differences between 'this_list' and 'list'.
          hosts which are only in 'this_list' will be copied into 'add_hosts'
          hosts which are only in 'list' will be copied into 'rem_hosts'
          groups which are only in 'this_list' will be copied to 'add_groups'
          groups which are only in 'this' will be copied to 'rem_groups'
          
          The calling context is responsible to free all result lists.
          If the callee is not interested in one or more of the resultlist
          than NULL should be used as parameter for this function.

INPUTS
          const lList *this_list - HR_Type list to be compared
          lList **answer_list    - AN_Type list
          const lList *list      - 2nd HR_Type list to be compared
          lList **add_hosts      - HR_Type list
          lList **rem_hosts      - HR_Type list
          lList **add_groups     - HR_Type list
          lList **rem_groups     - HR_Type list

RESULT
          bool - error state
             true  - Success
             false - Error

SEE ALSO


38.17.8 href_list_find_effective_diff

NAME
          href_list_find_effective_diff() -- Resolves groups and creates diff

SYNOPSIS
          bool href_list_find_effective_diff(lList **answer_list,
                                             const lList *add_groups,
                                             const lList *rem_groups,
                                             const lList *master_list,
                                             lList **add_hosts, lList **rem_hosts)

FUNCTION
          Resolves host names of all groups contained in "add_groups"
          and "rem_groups". Hostnames not part of both resulting hostgroup
          sets will be stored in "add_hosts" and "rem_hosts".

INPUTS
          lList **answer_list      - AN_Type list
          const lList *add_groups  - HR_Type list1 (hgroups)
          const lList *rem_groups  - HR_Type list2 (hgroups)
          const lList *master_list - HGRP_Type list of all hgroups
          lList **add_hosts        - resolved "add_groups" hosts not part
                                     of "rem_groups"
          lList **rem_hosts        - resolved "rem_groups" hosts not part
                                     of "add_hosts"

RESULT
          bool - error state
             true  - Success
             false - Error


38.17.9 href_list_find_referencees

NAME
          href_list_find_referencees() --  Find occupying hosts and hgroups

SYNOPSIS
          bool
          href_list_find_referencees(const lList *this_list,
                                     lList **answer_list,
                                     const lList *master_list,
                                     lList **occupant_groups)

FUNCTION
          Finds hostgroup references which directy occupy at least one of the
          hostgroups mentioned in 'this_list'. 'master_list' is the list of
          all existing hostgroups. Directly occupying hostgroups will be
          added to 'occupant_groups'. In case of any errors 'answer_list'
          will be filled.

INPUTS
          const lList *this_list   - HR_Type
          lList **answer_list      - AN_Type
          const lList *master_list - HGRP_Type
          lList **occupant_groups  - HR_Type

RESULT
          bool - error state
             true  - Success
             false - Error


38.17.10 href_list_find_references

NAME
          href_list_find_references() -- Find referenced hosts and groups

SYNOPSIS
          bool
          href_list_find_references(const lList *this_list,
                                    lList **answer_list,
                                    const lList *master_list,
                                    lList **referenced_hosts,
                                    lList **referenced_groups)

FUNCTION
          Finds hosts and hostgroups, which are directy referenced
          in the hostgroups mentioned in 'this_list'. 'master_list' is
          the list of all existing hostgroups. Directly referenced hosts
          and hostgroups will be added to 'used_hosts' and 'used_groups'.
          In case of any errors 'answer_list' will be filled.

INPUTS
          const lList *this_list   - HR_Type
          lList **answer_list      - AN_Type
          const lList *master_list - HGRP_Type
          lList **used_hosts       - HR_Type
          lList **used_groups      - HR_Type

RESULT
          bool - error state
             true  - Success
             false - Error


38.17.11 href_list_has_member

NAME
          href_list_has_member() -- Is reference already in list

SYNOPSIS
          bool
          href_list_has_member(const lList *this_list,
                               const char *host_or_group)

FUNCTION
          Is the given host or hostgroup ('host_or_group') already
          contained in the reference list?

INPUTS
          const lList *this_list    - HR_Type list
          const char *host_or_group - hostname or hgroup

RESULT
          bool - error state
             true  - Success
             false - Error


38.17.12 href_list_locate

NAME
          href_list_locate() -- Find an entry in the reference list

SYNOPSIS
          lListElem*
          href_list_locate(const lList *this_list, const char *name)

FUNCTION
          Find an entry in the reference list.

INPUTS
          const lList *this_list - HR_Type
          const char *name       - host or groupname

RESULT
          lListElem* - Pointer to host or hostgroup element or NULL


38.17.13 href_list_make_uniq

NAME
          href_list_make_uniq() -- remove duplicates

SYNOPSIS
          void href_list_make_uniq(lList *this_list, lList **answer_list)

FUNCTION
          Remove duplicates from "this_list"

INPUTS
          lList *this_list    - HR_Type list
          lList **answer_list - AN_Type list

RESULT
          void - none


38.17.14 href_list_remove_existing

NAME
          href_list_remove_existing() -- Removes entries from list

SYNOPSIS
          bool href_list_remove_existing(lList **this_list,
                                         lList **answer_list,
                                         lList *list)

FUNCTION
          Removes all entries contained in "list" will be removed from
          "this_list" if they exist.

INPUTS
          lList **this_list   - HR_Type list
          lList **answer_list - AN_Type list
          lList *list         - HR_Type list

RESULT
          bool - Error state
             true  - Success
             false - Error


38.17.15 href_list_resolve_hostnames

NAME
          href_list_resolve_hostnames() -- resolve hostnames

SYNOPSIS
          bool
          href_list_resolve_hostnames(lList *this_list,
                                      lList **answer_list, bool ignore_errors

FUNCTION
          Resolve hostnames contained in 'this_list'. Depending on the
          'ignore_errors' parameter the function will either fail if a
          host is not resolvable or this will be ignored.

INPUTS
          lList *this_list    - HR_Type list
          lList **answer_list - AN_Type list
          bool ignore_errors  - ignore if a host is not resolveable

RESULT
          bool - error state
             true  - Success
             false - Error


38.18 ja_task


38.18.1 –JAT_Type

NAME
          JAT_Type - CULL array task

ELEMENTS
          SGE_ULONG(JAT_task_number) --->  JAT_id
             Unique task number assigned during task creation.
          
          SGE_ULONG(JAT_status) ---> merge status, state and hold
             First part of the state (see also JAT_hold, JAT_state)
          
          SGE_ULONG(JAT_start_time)
             Tasks start time.
          
          SGE_ULONG(JAT_end_time)
             Tasks end time.
             Only used in Execd to simulate job runs.
          
          SGE_ULONG(JAT_hold)
             Second part of the state (user, operator, system hold)
             (see also JAT_status, JAT_state)
          
          SGE_STRING(JAT_granted_pe)
             Name of a granted parallel environment
          
          SGE_ULONG(JAT_job_restarted)
             Was the task restarted (due to reschedule/migrate)?
             JG: TODO: it is no boolean, but misused for other information!
          
          SGE_LIST(JAT_granted_destin_identifier_list)
             Granted destination identifier list (JG_Type)
          
          SGE_STRING(JAT_master_queue) ---> == first element of JAT_granted_destin_identifier_list?
             Master queue
          
          SGE_ULONG(JAT_state)
             Third part of state (see also JAT_hold, JAT_status)
          
          SGE_ULONG(JAT_pvm_ckpt_pid) --->  still used? Any reference to PVM?
          
          SGE_ULONG(JAT_pending_signal)
          
          SGE_ULONG(JAT_pending_signal_delivery_time)
          
          SGE_ULONG(JAT_pid) ---> move up
          
          SGE_STRING(JAT_osjobid)
             Unique id which applies to all os processes started
             on behalf of this task. Set during the startup phase of the
             jobscript. Meaning depends on the architecture of that
             host were the task is started.
                SOLARIS/LINUX/ALPHA  - supplementary group id
                IRIX                 - array session id
          
          SGE_LIST(JAT_usage_list)
             Raw usage from data collector. No longer used by schedd.
             Scaled by qmaster to JAT_scaled_usage_list. 'UA_Type' list.
             Not spooled.
          
          SGE_LIST(JAT_scaled_usage_list)
             Scaled usage set by qmaster, used by schedd. 'UA_Type' list.
             Not spooled.
          
          SGE_ULONG(JAT_fshare)
             Functional shares associated with the job. Set and
             used by schedd. Stored to qmaster for displaying.
             Not spooled.
          
          SGE_DOUBLE(JAT_tix)
             Total tickets. Set by schedd, saved to qmaster.
             Sent to PTF. Not Spooled
          
          SGE_DOUBLE(JAT_oticket)
             Override tickets set by schedd. Saved to qmaster and
             sent to PTF. Not spooled.
          
          SGE_DOUBLE(JAT_fticket)
             Functional tickets set bye schedd. Saved to qmaster and
             sent to PTF. Not spooled.
          
          SGE_DOUBLE(JAT_sticket)
             Share-tree tickets set by schedd. Saved to qmaster.
             Not spooled.
          
          SGE_DOUBLE(JAT_share)
             Job targeted proportion set by schedd. Saved to qmaster.
             Not spooled.
          
          SGE_ULONG(JAT_suitable) ---> only for output.
          
          SGE_LIST(JAT_task_list, PET_Type)
             List of running parallel tasks
          
          SGE_LIST(JAT_finished_task_list, FPET_Type)
             List of finished parallel tasks - contains only task names.
          
          SGE_LIST(JAT_previous_usage_list)
          
          SGE_OBJECT(JAT_pe_object)
             PE object granted to this task (PE_Type), only used in execd
          
          SGE_ULONG(JAT_next_pe_task_id)
             Used locally in execd to store next pe task id for this jatask on this execd.
          
          SGE_DOUBLE(JAT_progress_in_former_runs)
             The proportion of the total job run time earlier runs achieved and secured.
             No where used.
          
          SGE_ULONG(JAT_stop_initiate_time)
             The time when the action to initiate a job finish (i.e. job termination,
             or checkpoint creation) was triggered or re-triggered.
          
          SGE_DOUBLE(JAT_prio )
             The GE priority derived from weighted normalized tickets and
             weighted normalized static urgency. Changes with task due to GE ticket
             dependency. Not spooled.
          
          SGE_DOUBLE(JAT_ntix )
             Relative importance due to JAT_tix amount in the range between
             0.0 and 1.0.
             Not spooled.
          
          SGE_ULONG(JAT_wallclock_limit)
             Resulting wallclock_limit. If not requested the minimum by queue h_rt's.

FUNCTION
          JAT_Type elements make sense only in conjunction with JB_Type
          elements.  One element of each type is necessary to hold all
          data for the execution of one job. One JB_Type element and
          x JAT_Type elements are needed to execute an array job with
          x tasks.
          
                   -----------       1:x        ------------
                   | JB_Type |<---------------->| JAT_Type |
                   -----------                  ------------
          
          The relation between these two elements is defined in the
          'JB_ja_tasks' sublist of a 'JB_Type' element. This list will
          contain all belonging JAT_Type elements.
          
          The 'JAT_Type' CULL element contains all attributes in which
          one array task may differ from another array task of the
          same array job. The 'JB_Type' element defines all attributes
          wich are equivalent for all tasks of an array job.
          A job and an array job with one task are equivalent
          concerning their data structures. Both consist of one 'JB_Type'
          and one 'JAT_Type' element.
          
          'JAT_Type' elements contain dynamic data which accrue during the
          execution of a job. Therefore it is not necessary to create
          these elements during the submission of a (array) job, but
          after the job has been dispatched.

SEE ALSO


38.18.2 ja_task_add_finished_pe_task

NAME
          ja_task_add_finished_pe_task() -- remember finished parallel task

SYNOPSIS
          bool
          ja_task_add_finished_pe_task(lListElem *ja_task,
                                       const char *pe_task_id)

FUNCTION
          To avoid duplicate handling of finished parallel tasks (which
          could be triggered by sge_execd sending task end reports multiple
          times until it receives an ack from qmaster), the ja_task object
          (JAT_Type) contains a list of finished parallel tasks.
          
          ja_task_add_finished_pe_task tries to add a new parallel task to
          this list.
          
          If an entry with the given pe_task_id already exists, the function
          returns false, else true.

INPUTS
          lListElem *ja_task     - the ja_task to check/modify
          const char *pe_task_id - the pe_task_id to check/insert

RESULT
          bool - error state
             true  - if the pe_task_id did not yet exist and could be inserted,
             false - if the pe_task_id already existed.

SEE ALSO


38.18.3 ja_task_clear_finished_pe_tasks

NAME
          ja_task_clear_finished_pe_tasks() -- clear finished task list

SYNOPSIS
          bool
          ja_task_clear_finished_pe_tasks(lListElem *ja_task)

FUNCTION
          A ja_task contains a list of all finished parallel tasks (see also
          sgeobj/ja_task/ja_task_add_finished_pe_task()).
          
          In certain circumstances (e.g. if a ja_task is rescheduled), it is
          necessary to clear this list.
          
          ja_task_clear_finished_pe_tasks removes the complete sublist including
          the contained task ids.

INPUTS
          lListElem *ja_task - the ja_task to modify

RESULT
          bool - true, if the list could be cleared,
                 false, if no list of finished pe_tasks existed.

SEE ALSO


38.18.4 ja_task_list_print_to_string

NAME
          ja_task_list_print_to_string() -- print task id ranges into string

SYNOPSIS
          void ja_task_list_print_to_string(const lList *ja_task_list,
                                            dstring *range_string)

FUNCTION
          The ids of all tasks contained in 'ja_task_list' will be printed
          into 'range_string'.

INPUTS
          const lList *ja_task_list - JAT_Type list
          dstring *range_string     - dynamic string


38.18.5 ja_task_list_split_group

NAME
          ja_task_list_split_group() -- Splits a list into two parts

SYNOPSIS
          lList* ja_task_list_split_group(lList **ja_task_list)

FUNCTION
          All tasks which have the same state (JAT_status, JAT_state) like
          the first element of 'ja_task_list' will be removed from i
          'ja_task_list' and returned by this function.

INPUTS
          lList **ja_task_list - JAT_Type list

RESULT
          lList* - JAT_Type list (elements with equivalent state)

SEE ALSO


38.18.6 ja_task_message_add

NAME
          ja_task_message_add() -- add a message to the message list of a task

SYNOPSIS
          bool
          ja_task_message_add(lListElem *this_elem, u_long32 type,
                              const char *message)

FUNCTION
          Adds a message in the "JAT_message_list"-message list of "this_elem"
          "type" will be the message type. "message" is the text string stored
          int the new element of the sublist.

INPUTS
          lListElem *this_elem - JAT_Type element
          u_long32 type        - message type id
          const char *message  - message

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: ja_task_message_add() is MT safe

SEE ALSO


38.18.7 ja_task_message_trash_all_of_type_X

NAME
          ja_task_message_trash_all_of_type_X() -- Trash messages of certain type

SYNOPSIS
          bool
          ja_task_message_trash_all_of_type_X(lListElem *this_elem,
                                              u_long32 type)

FUNCTION
          Trash all messages from the sublist of JAT_message_list which are of
          the given "type".
          

INPUTS
          lListElem *this_elem - JAT_Type element
          u_long32 type        - type id

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: ja_task_message_trash_all_of_type_X() is MT safe


38.18.8 ja_task_search_pe_task

NAME
          ja_task_search_pe_task() -- Find a certain PE Task

SYNOPSIS
          lListElem* ja_task_search_pe_task(const lListElem *ja_task,
                                            const char **pe_task_id)

FUNCTION
          Find a certain PE Task with "pe_task_id" in "ja_task"

INPUTS
          const lListElem *ja_task - JAT_Type element
          const char *pe_task_id   - PE task id string (e.g. "1.speedy")

RESULT
          lListElem* - PET_Type


38.19 job


38.19.1 –GR_Type

NAME
          GR_Type - CULL group element

ELEMENTS
          SGE_ULONG (GR_group)
            Group IDs of a process.


38.19.2 –JB_Type

NAME
          JB_Type - CULL job element

ELEMENTS
          Job identification and dependencies
          ===================================
          
          SGE_ULONG(JB_job_number) ---> JB_id
             Uniq job number.
          
          SGE_STRING(JB_job_name)
             Job name ("qsub/qalter -N job_name")
          
          SGE_XULONG(JB_version)
          
          SGE_LIST(JB_jid_request_list)
             job requested dependencies (JRE_Type only JRE_job_name)
          
          SGE_LIST(JB_jid_predecessor_list)
             Predecessor jobs (JRE_Type only JRE_job_name)
          
          SGE_LIST(JB_jid_successor_list)
             Sucessor jobs (JRE_Type only JRE_job_number)
          
          SGE_LIST(JB_ja_ad_request_list)
             job requested array dependencies (JRE_Type only JRE_job_name)
          
          SGE_LIST(JB_ja_ad_predecessor_list)
             Predecessor array jobs (JRE_Type only JRE_job_name)
          
          SGE_LIST(JB_ja_ad_successor_list)
             Sucessor array jobs (JRE_Type only JRE_job_number)
          
          SGE_STRING(JB_session)
             Jobs session (JAPI session tag for job event selection)
          
          Project/Department
          ==================
          
          SGE_STRING(JB_project)
             Project name (qsub -P project_name)
          
          SGE_STRING(JB_department)
             Department name. Set by scheduler.
          
          Data related to job script
          ===========================
          
          SGE_STRING(JB_directive_prefix)
             Command prefix for jobscript ("qsub -C prefix") for parsing
             special comments in the script file.
          
          SGE_XSTRING(JB_exec_file)
          ---> is the path to the locally spooled copy on the execution daemon,
               it is script what actually gets executed,
               In the case of a binary, is unused.
          
          SGE_STRING(JB_script_file)
          ---> is the path to the job as sent from the CLI, is the path on the submit host
               In the case of a binary, is the path to the binary
          
          SGE_ULONG(JB_script_size)
          ---> really needed?
          
          SGE_STRING(JB_script_ptr)
          ---> the pointer to the character area of the jobscript
          
          Time information
          ================
          
          SGE_RULONG(JB_submission_time)
          
          SGE_ULONG(JB_execution_time)
             When should the job start ("qsub/qalter -a date_time")
          
          SGE_ULONG(JB_deadline)
             Deadline initiation time. (qsub -dl date_time)
          
          User related information
          ========================
          
          SGE_RSTRING(JB_owner) ---> rename to JB_user to be consistent?
          
          SGE_RULONG(JB_uid)
          
          SGE_RSTRING(JB_group)
          
          SGE_RULONG(JB_gid)
          
          SGE_STRING(JB_account)
             Account string ("qsub/qalter -A account string")
          
          Submission environment
          ======================
          
          SGE_STRING(JB_cwd)
             Current working directory during qsub ("qsub -cwd")
          
          SGE_BOOL(JB_notify)
             Notify job of impending kill/stop signal. ("qsub -notify")
          
          SGE_ULONG(JB_type)
             Start job immediately or not at all. ("qsub -now")
             JG: TODO: it is no boolean, but misused for other information!
          
          SGE_BOOL(JB_reserve)
             Specifies a reservation is desired by the user ("-R y|n").
             Available for non-immediate job submissions. Irrespective
             of the users desire a job reservation is made
          
             o only in reservation scheduling mode
             o only until the maximum number of reservations during a
               scheduling run is not exceeded when the order comes at
               this job. The maximum number (SC_max_reservation) can be
               specified in sched_conf(5).
             o only for non-immediate jobs
          
             Default is 'n'.
          
          SGE_ULONG(JB_ar) ---> JB_ar
             Uniq advance reservation number.
          
          SGE_ULONG(JB_priority)
             Priority ("qsub/qalter -p priority")
          
          SGE_ULONG(JB_jobshare)
             Priority ("qsub/qalter -js jobshare")
          
          SGE_LIST(JB_shell_list, PN_Type)
             Command interpreter to be used (PN_Type).
             ("qsub/qalter -S shell")
          
          SGE_ULONG(JB_verify)
             Triggers "verify" messages. (qsub -verify)
          
          SGE_LIST(JB_env_list)
             Export these env variables (VA_Type). ("qsub -V").
          
          SGE_TLIST(JB_context, VA_Type)
             Custom attributes (name,val) pairs (VA_Type).
             ("qsub/qalter -ac/-dc context_list")
          
          SGE_LIST(JB_job_args)
             Job arguments (ST_Type).
          
          SGE_LIST(JB_binding)
             Binding strategy for execution host (and later scheduler)
          
          Checkpointing/Restart
          =====================
          SGE_ULONG(JB_checkpoint_attr)  ----> merge all checkpointing
                                               stuff to one object?
             Checkpoint attributes ("qsub/qalter -c interval_flags")
          
          SGE_STRING(JB_checkpoint_name)
             Name of ckpt object ("qsub/qalter -ckpt ckpt_name")
          
          SGE_OBJECT(JB_checkpoint_object, CK_Type)
             Ckpt object which will be sent from qmaster to execd.
          
          SGE_ULONG(JB_checkpoint_interval)
             Checkpoint frequency ("qsub/qalter -c seconds")
          
          SGE_ULONG(JB_restart)
             Is job rerunable? ("qsub/qalter -r y/n")
             JG: TODO: it is no boolean, but misused for other information!
          
          Job I/O
          =======
          
          SGE_LIST(JB_stdout_path_list)
             Pathname for stdout (PN_Type). ("qsub/qalter -o path_name")
          
          SGE_LIST(JB_stderr_path_list)
             Std error path streams (PN_Type). ("qsub/qalter "-e path_name")
          
          SGE_LIST(JB_stdin_path_list)
             Std input path streams (PN_Type). ("qsub/qalter "-i path_name")
          
          SGE_BOOL(JB_merge_stderr)
             Merge stdout and stderr? ("qsub/qalter -j y|n")
          
          Resource requests
          =================
          
          SGE_LIST(JB_hard_resource_list, CE_Type)
             Hard resource requirements/limits/restrictions (CE_Type).
             ("qsub -l resource_list")
          
          SGE_LIST(JB_soft_resource_list, CE_Type)
             Soft resource requirements/limits/restrictions (CE_Type).
             ("qsub -l resource_list")
          
          SGE_LIST(JB_hard_queue_list)
             ----> why separated from other requests?
             Hard queue list (QR_Type). ("qsub -q dest_identifier")
          
          SGE_LIST(JB_soft_queue_list)
             ----> why separated from other requests?
             Soft queue list (QR_Type). ("qsub/qselect -q dest_identifier")
          
          Mail options
          ============
          
          SGE_ULONG(JB_mail_options)
             Mail options  ("qsub/qalter -m mail_options")
          
          SGE_LIST(JB_mail_list)
             Mail recipiants (MR_Type). ("qsub/qalter -M mail_list)
          
          Parallel Job info
          =================
          
          SGE_STRING(JB_pe)
             Name of requested PE or wildcard expression for matching PEs
          
          SGE_LIST(JB_pe_range)
             PE slot range (RN_Type). Qmaster ensure it is ascending and
             normalized.
          
          SGE_LIST(JB_master_hard_queue_list)
             Master queue list (QR_Type). ("qsub -masterq queue_list")
          
          Security related data
          =====================
          
          SGE_XSTRING(JB_tgt)
             Kerberos client TGT
          
          SGE_XSTRING(JB_cred)
             DCE/Kerberos credentials
          
          Data related to array jobs
          ==========================
          
          SGE_LIST(JB_ja_structure)
             Elements describe task id range structure during the
             submission time of a (array) job (RN_Type).
             ("qsub -t tid_range")
          
          SGE_LIST(JB_ja_n_h_ids)
             Just submitted array task without hold state (RN_Type).
             ("qsub -t tid_range")
          
          SGE_LIST(JB_ja_u_h_ids)
             Just submitted and user hold applied (RN_Type).
             ("qsub -h -t tid_range")
             ("qalter -h u/U jid.tid1-tid2:step")
          
          SGE_LIST(JB_ja_s_h_ids)
             Just submitted and system hold applied (RN_Type).
             ("qalter -h s/S jid.tid1-tid2:step")
          
          SGE_LIST(JB_ja_o_h_ids)
             Just submitted and operator hold applied (RN_Type).
             ("qalter -h o/O jid.tid1-tid2:step")
          
          SGE_LIST(JB_ja_a_h_ids)
             Just submitted and array hold applied (RN_Type).
             ("qalter -hold_jid_ad wc_job_list")
          
          SGE_LIST(JB_ja_z_ids)
             Zombie task ids (RN_Type).
          
          SGE_LIST(JB_ja_template)
             Template for new tasks.  The schedd thread
             stores initial tickets in this element. (JAT_Type)
          
          SGE_LIST(JB_ja_tasks)
             List of array tasks (in case of array jobs) or one task
             (in case of a job) (JAT_Type).
          
          Data used only in scheduler
          ===========================
          
          SGE_HOST(JB_host)
             host job is executing on. Local to scheduler.
             Not spooled.
          
          SGE_REF(JB_category)
             Category string reference used in scheduler.
          
          Misc
          ====
          
          SGE_LIST(JB_user_list)
             List of usernames (qsub/qalter -u username_list).
             ---> qsub -u does not exist. Not part of a job, but only
                  userd for qalter request as where condition. Could most
                  probably be passed via lCondition.
          
          SGE_LIST(JB_job_identifier_list)
             ---> condition for qalter? Then it should better be passed
                  via condition.
             (ID_Type)
          
          SGE_XULONG(JB_verify_suitable_queues)   ---> qalter?
          
          SGE_XULONG(JB_soft_wallclock_gmt) ---> the same as complex s_rt?
          
          SGE_XULONG(JB_hard_wallclock_gmt) ---> the same as complex h_rt?
          
          SGE_DOUBLE(JB_urg )
             Absolute static urgency importance. The admin can use arbitrary
             weighting factors in the formula used to determine this number. So any
             value is possible. Needed only when scheduling code is run.
             Not spooled.
          
          SGE_DOUBLE(JB_nurg )
             Relative importance due to static urgency in the range between 0.0
             and 1.0. No need to make this a per task attribute as long as waiting time
             and deadline remain job attributes.
             Not spooled.
          
          SGE_DOUBLE(JB_nppri )
             Relative importance due to Posix priority in the range between 0.0
             and 1.0. No need to make this a per task attribute as long as the POSIX
             priority remains a job attribute.
             Not spooled.
          
          SGE_DOUBLE(JB_rrcontr )
             Combined contribution to static urgency from all resources. This can
             be any value. Actually this is a property of job category. This field is
             needed only to provide it for diagnosis purposes it as per job information
             via GDI.
             Not spooled.
          
          SGE_DOUBLE(JB_dlcontr )
             Contribution to static urgency from job deadline. This can be any
             value. No need to make this a per task attribute as long a deadline is a
             job attribute. Increases over time.
             Not spooled.
          
          SGE_DOUBLE(JB_wtcontr )
             Contribution to static urgency from waiting time. This can be any
             value. No need to make this a per task attribute as long as waiting time
             is a job attribute. Increases over time.
             Not spooled.
          
          SGE_ULONG(JB_override_tickets)
             - override tickets assigned by admin.
             (qalter -ot tickets).
          
          SGE_LIST(JB_qs_args) ---> qsi?
             Arguments for foreign queuing system (ST_Type).
             Either delete it, or recycle it to be used with starter_method.
          
          SGE_LIST(JB_path_aliases)
             Path aliases list (PA_Type).
          
          SGE_ULONG(JB_pty)
             Interactive job should be started in a pty. 0=no, 1=yes, 2=use default.
          
          SGE_ULONG(JB_ja_task_concurrency)
             The number of concurrent array tasks executing at any given time.
          

FUNCTION
          JB_Type elements make only sense in conjunction with JAT_Type
          elements.  One element of each type is necessary to hold all
          data for the execution of one job. One JB_Type element and
          x JAT_Type elements are needed to execute an array job with
          x tasks.
          
                   -----------       1:x        ------------
                   | JB_Type |<---------------->| JAT_Type |
                   -----------                  ------------
          
          The relation between these two elements is defined in the
          'JB_ja_tasks' sublist of a 'JB_Type' element. This list will
          contain all belonging JAT_Type elements.
          
          The 'JAT_Type' CULL element containes all attributes in which
          one array task may differ from another array task of the
          same array job. The 'JB_Type' element defines all attributes
          wich are equivalent for all tasks of an array job.
          A job and an array job with one task are equivalent
          concerning their data structures. Both consist of one 'JB_Type'
          and one 'JAT_Type' element.

SEE ALSO


38.19.3 –PRO_Type

NAME
          PRO_Type - CULL process element

ELEMENTS
          SGE_ULONG (PRO_pid)
             Process id of the element
          SGE_ULONG (PRO_utime)
             Number of jiffies that this process has been scheduled in user mode.
          SGE_ULONG (PRO_stime)
             Number of jiffies that this process has been scheduled in kernel mode.
          SGE_ULONG64 (PRO_vsize)
             Virtual memory size in bytes.
          SGE_LIST (PRO_groups)
             GR_Type list with all groups associated with this process.
          SGE_BOOL (PRO_rel)
             Flag if this process belongs to a GE job.
          SGE_BOOL (PRO_run)
             Flag if this process is still running.
          SGE_ULONG (PRO_io)
             IO statistic for the running process.


38.19.4 jb_now

NAME
          jb_now -- macros to handle flag JB_type

SYNOPSIS
          JOB_TYPE_IMMEDIATE
          JOB_TYPE_QSH
          JOB_TYPE_QLOGIN
          JOB_TYPE_QRSH
          JOB_TYPE_QRLOGIN
          
          JOB_TYPE_NO_ERROR
             When a job of this type fails and the error condition usually
             would result in the job error state the job is finished. Thus
             no qmod -c "*" is supported.


38.19.5 job_add_as_zombie

NAME
          job_add_as_zombie() -- add task into zombie id list

SYNOPSIS
          void job_add_as_zombie(lListElem *zombie, lList **answer_list,
                                 u_long32 ja_task_id)

FUNCTION
          Adds a task into the zombie id list (JB_ja_z_ids)

INPUTS
          lListElem *zombie    - JB_Type
          lList **answer_list  - AN_Type
          u_long32 ja_task_id  - Task id to be inserted

SEE ALSO


38.19.6 job_add_parent_id_to_context

NAME
          job_add_parent_id_to_context() -- add parent jobid to job context

SYNOPSIS
          void job_add_parent_id_to_context(lListElem *job)

FUNCTION
          If we have JOB_ID in environment implicitly put it into the
          job context variable PARENT if was not explicitly set using
          "-sc PARENT=$JOBID". By doing this we preserve information
          about the relationship between these two jobs.

INPUTS
          lListElem *job - JB_Type element

RESULT
          void - None


38.19.7 job_check_correct_id_sublists

NAME
          job_check_correct_id_sublists() -- test JB_ja_* sublists

SYNOPSIS
          void
          job_check_correct_id_sublists(lListElem *job, lList **answer_list)

FUNCTION
          Test following elements of "job" whether they are correct:
             JB_ja_structure, JB_ja_n_h_ids, JB_ja_u_h_ids,
             JB_ja_s_h_ids, JB_ja_o_h_ids, JB_ja_a_h_ids, JB_ja_z_ids
          The function will try to correct errors within this lists. If
          this is not possible an error will be returned in "answer_list".
          

INPUTS
          lListElem *job      - JB_Type element
          lList **answer_list - AN_Type list

RESULT
          void - none


38.19.8 job_check_owner

NAME
          job_check_owner() -- check the owner of a job

SYNOPSIS
          int job_check_owner(const char *user_name, u_long32 job_id)

FUNCTION
          Checks if the owner of the job specified by job_id is the
          user given by user_name.

INPUTS
          const char *user_name      - the user name
          u_long32   job_id          - the job number
          lList      master_job_list - a ref to the master job list

RESULT
          int - -1, if the job cannot be found
                 0, if the user is the job owner
                 1, if the user is not the job owner


38.19.9 job_check_qsh_display

NAME
          job_check_qsh_display() -- check DISPLAY variable for qsh jobs

SYNOPSIS
          int
          job_check_qsh_display(const lListElem *job, lList **answer_list,
                                bool output_warning)

FUNCTION
          Checks the DISPLAY variable for qsh jobs:
          - existence
          - empty string
          - local variable
          
          In each error cases, an appropriate error message is generated.
          If output_warning is set to true, an error message is output.
          In each case, an error message is written into answer_list.

INPUTS
          const lListElem *job - the job to check
          lList **answer_list  - answer list to take error messages, if
                                 NULL, no answer is passed back.
          bool output_warning  - output error messages to stderr?

RESULT
          int - STATUS_OK, if function call succeeds,
                else STATUS_EUNKNOWN.

NOTES
          To fully hide the data representation of the DISPLAY settings,
          functions job_set_qsh_display and job_get_qsh_display would
          be usefull.


38.19.10 job_count_pending_tasks

NAME
          job_count_pending_tasks() -- Count number of pending tasks

SYNOPSIS
          bool job_count_pending_tasks(lListElem *job, bool count_all)

FUNCTION
          This function returns the number of pending tasks of a job.

INPUTS
          lListElem *job - JB_Type
          bool           - number of tasks or simply 0/1 if count_all is 'false'

RESULT
          int - number of tasks or simply 0/1 if count_all is 'false'


38.19.11 job_create_hold_id_lists

NAME
          job_create_hold_id_lists() -- Lists for hold combinations

SYNOPSIS
          void job_create_hold_id_lists(const lListElem *job,
                                        lList *id_list[16],
                                        u_long32 hold_state[16])

FUNCTION
          This function creates sixteen 'id_lists'. Tasks whose id is
          contained in an id list has the hold state combination delivered
          by 'hold_state'.
          
          After using 'id_list' the function job_destroy_hold_id_lists()
          has to be called to free allocated memory.

INPUTS
          const lListElem *job    - JB_Type
          lList *id_list[16]      - NULL initialized pointer array
          u_long32 hold_state[16] - Array for hold state combinations

SEE ALSO


38.19.12 job_create_task

NAME
          job_create_task() -- Create an array task

SYNOPSIS
          lListElem* job_create_task(lListElem *job, lList **answer_list,
                                     u_long32 ja_task_id)

FUNCTION
          This function return the array task with the id 'ja_task_id' if
          it exists in the JB_ja_tasks-sublist of 'job'.
          A new element will be created in the sublist
          of 'job' and a pointer to the new element will be returned.
          Errors may be found in the 'answer_list'

INPUTS
          lListElem *job             - JB_Type
          lList **answer_list        - AN_Type
          u_long32 ja_task_id        - array task id

RESULT
          lListElem* - JAT_Type element

NOTES
          In case of errors, the function should return a message in a
          given answer_list (answer_list != NULL).


38.19.13 job_delete_not_enrolled_ja_task

NAME
          job_delete_not_enrolled_ja_task() -- remove unenrolled task

SYNOPSIS
          void job_delete_not_enrolled_ja_task(lListElem *job,
                                               lList **answer_list,
                                               u_long32 ja_task_number)

FUNCTION
          Removes an unenrolled pending task from the id lists.

INPUTS
          lListElem *job          - JB_Type
          lList **answer_list     - AN_Type
          u_long32 ja_task_number - Task to be removed

SEE ALSO


38.19.14 job_destroy_hold_id_lists

NAME
          job_destroy_hold_id_lists() -- destroy hold combination lists

SYNOPSIS
          void job_destroy_hold_id_lists(const lListElem *job,
                                         lList *id_list[16])

FUNCTION
          This function frees all memory allocated by a previous call of
          job_create_hold_id_lists().

INPUTS
          const lListElem *job - JB_Type
          lList *id_list[16]   - array of RN_Type lists

SEE ALSO


38.19.15 job_enroll

NAME
          job_enroll() -- enrolls a array task into the JB_ja_tasks lists

SYNOPSIS
          lListElem *job_enroll(lListElem *job, lList **answer_list,
                                u_long32 ja_task_number)

FUNCTION
          The task with 'ja_task_number' will be enrolled into the
          JB_ja_tasks list of 'job' when this function is called.

INPUTS
          lListElem *job          - JB_Type
          lList **answer_list     - AN_Type
          u_long32 ja_task_number - task number

RESULT
          lListElem * - the ja_task


38.19.16 job_get_biggest_enrolled_task_id

NAME
          job_get_biggest_enrolled_task_id() -- find biggest enrolled tid

SYNOPSIS
          u_long32 job_get_biggest_enrolled_task_id(const lListElem *job)

FUNCTION
          Returns the biggest task id currently existing in a job
          which is enrolled in the JB_ja_tasks sublist of 'job'.
          If no task is enrolled 0 will be returned.

INPUTS
          const lListElem *job - JB_Type element

RESULT
          u_long32 - task id or 0


38.19.17 job_get_biggest_unenrolled_task_id

NAME
          job_get_biggest_unenrolled_task_id() -- find biggest unenrolled id

SYNOPSIS
          u_long32 job_get_biggest_unenrolled_task_id(const lListElem *job)

FUNCTION
          Returns the biggest task id currently existing in a job
          which is not enrolled in the JB_ja_tasks sublist of 'job'.
          If no task is enrolled 0 will be returned.

INPUTS
          const lListElem *job - JB_Type element

RESULT
          u_long32 - task id or 0


38.19.18 job_get_enrolled_ja_tasks

NAME
          job_get_enrolled_ja_tasks() -- num. of enrolled array tasks

SYNOPSIS
          u_long32 job_get_not_enrolled_ja_tasks(const lListElem *job)

FUNCTION
          This function returns the number of tasks enrolled in the
          JB_ja_tasks sublist.

INPUTS
          const lListElem *job - JB_Type

RESULT
          u_long32 - number of tasks

SEE ALSO


38.19.19 job_get_env_string

NAME
          job_get_env_string() -- get value of certain job env variable

SYNOPSIS
          const char* job_get_env_string(const lListElem *job,
                                         const char *variable)

FUNCTION
          Return the string value of the job environment "variable".
          
          Please note: The "*_O_*" env variables get their final
                       name shortly before job execution. Find more
                       information in the comment of
                       job_initialize_env()

INPUTS
          const lListElem *job - JB_Type element
          const char* variable - environment variable name

RESULT
          const char* - value of "variable"

SEE ALSO


38.19.20 job_get_hold_state

NAME
          job_get_hold_state() -- Returns the hold state of a task

SYNOPSIS
          u_long32 job_get_hold_state(lListElem *job, u_long32 ja_task_id)

FUNCTION
          Returns the hold state of a job/array-task

INPUTS
          lListElem *job      - JB_Type
          u_long32 ja_task_id - array task id

RESULT
          u_long32 - hold state (see MINUS_H_TGT_*)


38.19.21 job_get_id_string

NAME
          job_get_id_string() -- get an id string for a job/jatask/petask

SYNOPSIS
          const char *
          job_get_id_string(u_long32 job_id, u_long32 ja_task_id,
                            const char *pe_task_id)

FUNCTION
          Returns an id string for a certain job, ja task or pe task.
          The function should be used in any code that outputs ids, e.g.
          in error strings to ensure we have the same output format
          everywhere. If the ja_task_id is 0, only the job id is output.

INPUTS
          u_long32 job_id        - the job id
          u_long32 ja_task_id    - the ja task id or 0 to output only
                                   job_id
          const char *pe_task_id - optionally the pe task id
          dstring *buffer        - a buffer to be used for printing the id string

RESULT
          const char* - pointer to a static buffer. It is valid until the
                        next call of the function.

NOTES
          MT-NOTE: job_get_id_string() is MT safe


38.19.22 job_get_ja_task_hold_state

NAME
          job_get_ja_task_hold_state() -- Hold state of unenrolled task

SYNOPSIS
          u_long32 job_get_ja_task_hold_state(const lListElem *job,
                                              u_long32 ja_task_id)

FUNCTION
          Returns the hold state of a task which is not enrolled in
          the JB_ja_tasks list of 'job'

INPUTS
          const lListElem *job - JB_Type
          u_long32 ja_task_id  - valid ja task id

RESULT
          u_long32 - hold state


38.19.23 job_get_ja_task_template

NAME
          job_get_ja_task_template() -- create a ja task template

SYNOPSIS
          lListElem* job_get_ja_task_template_pending(const lListElem *job,
                                                      u_long32 ja_task_id)

FUNCTION
          The function returns a pointer to a template array task element.
          This task represents a currently submitted pending task.

INPUTS
          const lListElem *job - JB_Type
          u_long32 ja_task_id  - array task number

RESULT
          lListElem* - template task (JAT_Type)

SEE ALSO


38.19.24 job_get_ja_task_template_hold

NAME
          job_get_ja_task_template_hold() -- create a ja task template

SYNOPSIS
          lListElem* job_get_ja_task_template_pending(const lListElem *job,
                                                      u_long32 ja_task_id)

FUNCTION
          The function returns a pointer to a template array task element.
          This task represents a currently submitted pending task.
          
          The task number (JAT_task_number) of this template task will be
          initialized with the value given by 'ja_task_id'.
          
          The hold state of the task (JAT_hold) will be initialized with
          the 'hold_state' value. The function job_get_ja_task_hold_state()
          may be used to get the current hold state of an unenrolled
          pending task.

INPUTS
          const lListElem *job - JB_Type
          u_long32 ja_task_id  - array task number

RESULT
          lListElem* - template task (JAT_Type)

SEE ALSO


38.19.25 job_get_ja_task_template_pending

NAME
          job_get_ja_task_template_pending() -- create a ja task template

SYNOPSIS
          lListElem* job_get_ja_task_template_pending(const lListElem *job,
                                                      u_long32 ja_task_id)

FUNCTION
          The function returns a pointer to a template array task element.
          This task represents a currently submitted pending task
          (no hold state).
          
          The task number (JAT_task_number) of this template task will be
          initialized with the value given by 'ja_task_id'.

INPUTS
          const lListElem *job - JB_Type
          u_long32 ja_task_id  - array task number

RESULT
          lListElem* - template task (JAT_Type)

SEE ALSO

NOTES
          MT-NOTE: job_get_ja_task_template_pending() is MT safe


38.19.26 job_get_ja_tasks

NAME
          job_get_ja_tasks() -- returns number of array tasks

SYNOPSIS
          u_long32 job_get_ja_tasks(const lListElem *job)

FUNCTION
          This function returns the overall number of tasks in an array job.

INPUTS
          const lListElem *job - JB_Type

RESULT
          u_long32 - number of tasks

SEE ALSO


38.19.27 job_get_job_key

NAME
          job_get_job_key() -- create a unique key

SYNOPSIS
          const char* job_get_job_key(u_long32 job_id)

FUNCTION
          Creates a unique key consisting of the job_id.
          The job id can reread by calling job_parse_key().

INPUTS
          u_long32 job_id        - job id

RESULT
          const char* - pointer to a static buffer containing the key.
                        The result is only valid until the next call of the
                        function.

NOTES
          MT-NOTE: job_get_job_key() is MT safe

SEE ALSO


38.19.28 job_get_key

NAME
          job_get_key() -- create a unique key

SYNOPSIS
          const char* job_get_key(u_long32 job_id, u_long32 ja_task_id,
                                  const char *pe_task_id, dstring *buffer)

FUNCTION
          Creates a unique key consisting of job_id, ja_task_id and
          pe_task_id. This key can again be split into its components
          by a call to job_parse_key().

INPUTS
          u_long32 job_id        - job id
          u_long32 ja_task_id    - ja task id
          const char *pe_task_id - pe task id
          dstring *buffer        - dstring buffer used to generate the key

RESULT
          const char* - pointer to the key, stored within buffer

NOTES
          MT-NOTE: job_get_key() is MT safe

SEE ALSO


38.19.29 job_get_not_enrolled_ja_tasks

NAME
          job_get_not_enrolled_ja_tasks() -- num. of unenrolled tasks

SYNOPSIS
          u_long32 job_get_not_enrolled_ja_tasks(const lListElem *job)

FUNCTION
          This function returns the number of tasks not enrolled in the
          JB_ja_tasks sublist.

INPUTS
          const lListElem *job - JB_Type

RESULT
          u_long32 - number of tasks

SEE ALSO


38.19.30 job_get_request

NAME
          job_get_request() -- Returns the requested centry name

SYNOPSIS
          lListElem *
          job_get_request(const lListElem *this_elem, const char **centry_name)

FUNCTION
          Returns the requested centry name if it is requested by the give
          job (JB_Type).

INPUTS
          const lListElem *this_elem - JB_Type element
          const char *centry_name    - name

RESULT
          lListElem * - CE_Type element

NOTES
          MT-NOTE: job_get_request() is MT safe


38.19.31 job_get_shell_start_mode

NAME
          job_get_shell_start_mode() -- get shell start mode for 'job'

SYNOPSIS
          const char* job_get_shell_start_mode(const lListElem *job,
                                             const lListElem *queue,
                                  const char *conf_shell_start_mode)

FUNCTION
          Returns a string identifying the shell start mode for 'job'.

INPUTS
          const lListElem *job              - JB_Type element
          const lListElem *queue            - QU_Type element
          const char *conf_shell_start_mode - shell start mode of
                                              configuration

RESULT
          const char* - shell start mode


38.19.32 job_get_smallest_enrolled_task_id

NAME
          job_get_smallest_enrolled_task_id() -- find smallest enrolled tid

SYNOPSIS
          u_long32 job_get_smallest_enrolled_task_id(const lListElem *job)

FUNCTION
          Returns the smallest task id currently existing in a job
          which is enrolled in the JB_ja_tasks sublist of 'job'.
          If no task is enrolled 0 will be returned.

INPUTS
          const lListElem *job - JB_Type element

RESULT
          u_long32 - task id or 0


38.19.33 job_get_smallest_unenrolled_task_id

NAME
          job_get_smallest_unenrolled_task_id() -- get smallest id

SYNOPSIS
          u_long32 job_get_smallest_unenrolled_task_id(const lListElem *job)

FUNCTION
          Returns the smallest task id currently existing in a job
          which is not enrolled in the JB_ja_tasks sublist of 'job'.
          If all tasks are enrolled 0 will be returned.

INPUTS
          const lListElem *job - JB_Type element

RESULT
          u_long32 - task id or 0


38.19.34 job_get_state_string

NAME
          job_get_state_string() -- write job state flags into a string

SYNOPSIS
          void job_get_state_string(char *str, u_long32 op)

FUNCTION
          This function writes the state flags given by 'op' into the
          string 'str'

INPUTS
          char *str   - containes the state flags for 'qstat'/'qhost'
          u_long32 op - job state bitmask


38.19.35 job_get_submit_ja_tasks

NAME
          job_get_submit_ja_tasks() -- array size during job submittion

SYNOPSIS
          u_long32 job_get_submit_ja_tasks(const lListElem *job)

FUNCTION
          The function returns the ammount of tasks the job had during
          it's submittion

INPUTS
          const lListElem *job - JB_Type

RESULT
          u_long32 - number of tasks

SEE ALSO


38.19.36 job_get_submit_task_ids

NAME
          job_get_submit_task_ids() -- Submit time task specification

SYNOPSIS
          void job_get_submit_task_ids(const lListElem *job,
                                       u_long32 *start,
                                       u_long32 *end,
                                       u_long32 *step)

FUNCTION
          The function returns the "start", "end" and "step" numbers
          which where used to create "job" (qsub -t <range>).

INPUTS
          const lListElem *job - JB_Type element
          u_long32 *start      - first id
          u_long32 *end        - last id
          u_long32 *step       - step size (>=1)


38.19.37 job_has_soft_requests

NAME
          job_has_soft_requests() -- Has the job soft requests?

SYNOPSIS
          bool job_has_soft_requests(lListElem *job)

FUNCTION
          True (1) will be returned if the job has soft requests.

INPUTS
          lListElem *job - JB_Type

RESULT
          bool - true or false

NOTES
          MT-NOTES: job_has_soft_requests() is MT safe


38.19.38 job_initialize_env

NAME
          job_initialize_env() -- initialize environment (partially)

SYNOPSIS
          void job_initialize_env(lListElem *job, lList **answer_list,
                                  const lList* path_alias_list)

FUNCTION
          Initialize the environment sublist (JB_env_list) of "job".
          Path aliasing ("path_alias_list") has to be initialized before
          this function might be called.
          
          Following enironment variables will be added:
             <VAR_PREFIX>O_HOME
             <VAR_PREFIX>O_LOGNAME
             <VAR_PREFIX>O_PATH
             <VAR_PREFIX>O_SHELL
             <VAR_PREFIX>O_TZ
             <VAR_PREFIX>O_HOST
             <VAR_PREFIX>O_WORKDIR
             <VAR_PREFIX>O_MAIL
          
          This function will be used in SGE/EE client applications.
          Clients do not know which prefix should be used for job
          environment variables ("SGE_" or other). Therefore
          we use the define <VAR_PREFIX> which will be replaced shortly
          before the job is started.

INPUTS
          lListElem *job               - JB_Type element
          lList **answer_list          - AN_Type list pointer
          const lList* path_alias_list - PA_Type list


38.19.39 job_initialize_id_lists

NAME
          job_initialize_id_lists() -- initialize task id range lists

SYNOPSIS
          void job_initialize_id_lists(lListElem *job, lList **answer_list)

FUNCTION
          Initialize the task id range lists within "job". All tasks within
          the JB_ja_structure element of job will be added to the
          JB_ja_n_h_ids list. All other id lists stored in the "job" will
          be deleted.

INPUTS
          lListElem *job      - JB_Type element
          lList **answer_list - AN_Type list pointer

RESULT
          int - return state
             -1 - error
              0 - OK

SEE ALSO

NOTES
          MT-NOTE: job_initialize_id_lists() is MT safe


38.19.40 job_is_array

NAME
          job_is_array() -- Is "job" an array job or not?

SYNOPSIS
          bool job_is_array(const lListElem *job)

FUNCTION
          The function returns true (1) if "job" is an array job with more
          than one task.

INPUTS
          const lListElem *job - JB_Type element

RESULT
          bool - true or false

SEE ALSO


38.19.41 job_is_ckpt_referenced

NAME
          job_is_ckpt_referenced() -- Does job reference the given CKPT?

SYNOPSIS
          bool job_is_ckpt_referenced(const lListElem *job,
                                      const lListELem *ckpt)

FUNCTION
          The function returns true if "job" references the
          checkpointing object "ckpt".

INPUTS
          const lListElem *job  - JB_Type element
          const lListElem *ckpt - CK_Type object

RESULT
          bool - true or false


38.19.42 job_is_enrolled

NAME
          job_is_enrolled() -- Is a certain array task enrolled

SYNOPSIS
          bool job_is_enrolled(const lListElem *job, u_long32 task_number)

FUNCTION
          This function will return true (1) if the array task with
          'task_number' is not enrolled in the JB_ja_tasks sublist
          of 'job'.

INPUTS
          const lListElem *job - JB_Type
          u_long32 task_number - task_number

RESULT
          bool - true or false


38.19.43 job_is_ja_task_defined

NAME
          job_is_ja_task_defined() -- was this task submitted

SYNOPSIS
          bool job_is_ja_task_defined(const lListElem *job,
                                      u_long32 ja_task_number)

FUNCTION
          This function will return true (1) if the task with
          'ja_task_number' is defined within the array 'job'. The task
          is defined when 'ja_task_number' is enclosed in the task id
          range which was specified during submit time (qsub -t).

INPUTS
          const lListElem *job    - JB_Type
          u_long32 ja_task_number - task number

RESULT
          bool - true or false

NOTES
          MT-NOTE: job_is_ja_task_defined() is MT safe


38.19.44 job_is_parallel

NAME
          job_is_parallel() -- Is "job" a parallel job?

SYNOPSIS
          bool job_is_parallel(const lListElem *job)

FUNCTION
          This function returns true if "job" is a parallel job
          (requesting a parallel environment).

INPUTS
          const lListELem *job - JB_Type element

RESULT
          bool - true or false

SEE ALSO


38.19.45 job_is_pe_referenced

NAME
          job_is_pe_referenced() -- Does job reference the given PE?

SYNOPSIS
          bool job_is_pe_referenced(const lListElem *job,
                                   const lListElem *pe)

FUNCTION
          The function returns true if "job" references the "pe".
          This is also the case if job requests a wildcard PE and
          the wildcard name matches the given pe name.

INPUTS
          const lListElem *job - JB_Type element
          const lListElem *pe  - PE_Type object

RESULT
          int - true or false


38.19.46 job_is_tight_parallel

NAME
          job_is_tight_parallel() -- Is "job" a tightly integrated par. job?

SYNOPSIS
          bool job_is_tight_parallel(const lListElem *job,
                                     const lList *pe_list)

FUNCTION
          This function returns true if "job" is really a tightly
          integrated parallel job.

INPUTS
          const lListElem *job - JB_Type element
          const lList *pe_list - PE_Type list with all existing PEs

RESULT
          bool - true or false

SEE ALSO


38.19.47 job_is_zombie_job

NAME
          job_is_zombie_job() -- Is 'job' a zombie job

SYNOPSIS
          bool job_is_zombie_job(const lListElem *job)

FUNCTION
          True will be returned if 'job' is a zombie job.

INPUTS
          const lListElem *job - JB_Type

RESULT
          bool - true or false


38.19.48 job_list_add_job

NAME
          job_list_add_job() -- Creates a joblist and adds an job into it

SYNOPSIS
          int job_list_add_job(lList **job_list, const char *name,
                               lListElem *job, int check)

FUNCTION
          A 'job_list' will be created by this function if it does not
          already exist and 'job' will be inserted into this 'job_list'.
          'name' will be the name of the new list.
          
          If 'check' is true (1) than the function will test whether
          there is already an element in 'job_list' which has the same
          'JB_job_number' like 'job'. If this is true than -1 will be
          returned by this function.
          

INPUTS
          lList **job_list - JB_Type
          const char *name - name of the list
          lListElem *job   - JB_Type element
          int check        - Does the element already exist?

RESULT
          int - error code
                1 => invalid parameter
               -1 => check failed: element already exists
                0 => OK


38.19.49 job_list_locate

NAME
          job_list_locate() -- find job in a list

SYNOPSIS
          lListElem* job_list_locate(lList *job_list, u_long32 job_id)

FUNCTION
          Returns the job element within "job_list" having "job_id" as
          primary key.

INPUTS
          lList *job_list - JB_Type list
          u_long32 job_id - job id

RESULT
          lListElem* - JB_Type element


38.19.50 job_list_register_new_job

NAME
          job_list_register_new_job() -- try to register a new job

SYNOPSIS
          int job_list_register_new_job(const lList *job_list,
                                        u_long32 max_jobs,
                                        int force_registration)

FUNCTION
          This function checks whether a new job would exceed the maximum
          of allowed jobs per cluster ("max_jobs"). If the limit would be
          exceeded then the function will return 1 otherwise 0. In some
          situations it may be necessary to force the registration
          of a new job (reading jobs from spool area). This may be done
          with "force_registration".
          

INPUTS
          const lListElem *job   - JB_Type element
          u_long32 max_jobs      - maximum number of allowed jobs per user
          int force_registration - force job registration

RESULT
          int - 1 => limit would be exceeded
                0 => otherwise

SEE ALSO


38.19.51 job_might_be_tight_parallel

NAME
          job_might_be_tight_parallel() -- Tightly integrated job?

SYNOPSIS
          bool job_might_be_tight_parallel(const lListElem *job,
                                           const lList *pe_list)

FUNCTION
          This functions returns true  if "job" might be a tightly
          integrated job. True will be returned if (at least one) pe
          matching the requested (wildcard) pe of a job has
          "contol_slaves=true" in its configuration.

INPUTS
          const lListElem *job - JB_Type element
          const lList *pe_list - PE_Type list with all existing PEs

RESULT
          bool - true or false

SEE ALSO


38.19.52 job_parse_key

NAME
          job_parse_key() -- parse a key generated by job_get_key()

SYNOPSIS
          bool
          job_parse_key(char *key, u_long32 *job_id, u_long32 *ja_task_id,
                        char **pe_task_id, bool *only_job)

FUNCTION
          Parse a key generated by job_get_key() and split it into its
          components.

INPUTS
          char *key            - key to be parsed
          u_long32 *job_id     - pointer to job_id
          u_long32 *ja_task_id - pointer to ja_task_id
          char **pe_task_id    - pointer to pe_task_id
          bool *only_job       - true, if only a job id is contained in
                                 key, else false.

RESULT
          bool - true, if the key could be parsed, else false

NOTES
          MT-NOTE: job_get_key() is MT safe
          
          The pe_task_id is only valid until the passed key is deleted!

SEE ALSO


38.19.53 job_resolve_host_for_path_list

NAME
          job_resolve_host_for_path_list() -- resolves hostnames in path lists

SYNOPSIS
          int
          job_resolve_host_for_path_list(const lListElem *job,
                                         lList **answer_list, int name)

FUNCTION
          Resolves hostnames in path lists.

INPUTS
          const lListElem *job - the submited cull list
          lList **answer_list  - AN_Type element
          int name             - a JB_Type (JB_stderr_path_list or
                                            JB_stout_path_list)

RESULT
          int - error code (STATUS_OK, or ...)


38.19.54 job_search_task

NAME
          job_search_task() -- Search an array task

SYNOPSIS
          lListElem* job_search_task(const lListElem *job,
                                     lList **answer_list,
                                     u_long32 ja_task_id)

FUNCTION
          This function return the array task with the id 'ja_task_id' if
          it exists in the JB_ja_tasks-sublist of 'job'. If the task
          is not found in the sublist, NULL is returned.

INPUTS
          const lListElem *job       - JB_Type
          lList **answer_list        - AN_Type
          u_long32 ja_task_id        - array task id

RESULT
          lListElem* - JAT_Type element

NOTES
          In case of errors, the function should return a message in a
          given answer_list (answer_list != NULL).
          MT-NOTE: job_search_task() is MT safe


38.19.55 job_set_env_string

NAME
          job_set_env_string() -- set value of certain job env variable

SYNOPSIS
          void job_set_env_string(lListElem *job,
                                  const char* variable,
                                  const char *value)

FUNCTION
          Set the string "value" of the job environment "variable".
          
          Please note: The "*_O_*" env variables get their final
                       name shortly before job execution. Find more
                       information in the comment of
                       job_initialize_env()

INPUTS
          lListElem *job       - JB_Type element
          const char* variable - environment variable name
          const char* value    - new value

SEE ALSO


38.19.56 job_set_hold_state

NAME
          job_set_hold_state() -- Changes the hold state of a task.

SYNOPSIS
          void job_set_hold_state(lListElem *job, lList **answer_list,
                                  u_long32 ja_task_id,
                                  u_long32 new_hold_state)

FUNCTION
          This function changes the hold state of a job/array-task.

INPUTS
          lListElem *job          - JB_Type
          lList **answer_list     - AN_Type
          u_long32 ja_task_id     - Array task id
          u_long32 new_hold_state - hold state (see MINUS_H_TGT_*)


38.19.57 job_set_submit_task_ids

NAME
          job_set_submit_task_ids() -- store the initial range ids in "job"

SYNOPSIS
          int job_set_submit_task_ids(lListElem *job, u_long32 start,
                                      u_long32 end, u_long32 step)

FUNCTION
          The function stores the initial range id values ("start", "end"
          and "step") in "job". It should only be used in functions
          initializing new jobs.

INPUTS
          lListElem *job - JB_Type job
          u_long32 start - first id
          u_long32 end   - last id
          u_long32 step  - step size

RESULT
          int - 0 -> OK
                1 -> no memory

NOTES
          MT-NOTE: job_set_submit_task_ids() is MT safe


38.19.58 jobscript_get_key

NAME
          jobscript_get_key() -- create a unique key

SYNOPSIS
          const char* jobscript_get_key(lListElem *jep, dstring *buffer)

FUNCTION
          Creates a unique key consisting of job_id and jobscript name
          This key can again be split into its components
          by a call to jobscript_parse_key()

INPUTS
          u_long32 job_id        - job id
          dstring *buffer        - buffer

RESULT
          const char* - pointer to a static buffer containing the key.
          
                        The result is only valid until the next call of the
                        function.

NOTES
          MT-NOTE: jobscript_get_key() is MT safe

SEE ALSO


38.19.59 jobscript_parse_key

NAME
          jobscript_parse_key() -- parse a key generated by job_get_key()

SYNOPSIS
          const char *  job_parse_key(char *key, const char **exec_file)

FUNCTION
          Parse a key generated by jobscript_get_key()

INPUTS
          char *key                 - key to be parsed
          onst char **exec_file     - exec_file name to unlink

RESULT
          const char * the database job key

NOTES
          MT-NOTE: jobscript_parse_key() is MT safe
          

SEE ALSO


38.20 job_is_binary

NAME
          job_is_binary() -- Was "job" job submitted with -b y?

SYNOPSIS
          bool job_is_binary(const lListElem *job)

FUNCTION
          This function returns true if "job" is a "binary" job
          which was e.g. submitted with qsub -b y

INPUTS
          const lListELem *job - JB_Type element

RESULT
          bool - true or false

SEE ALSO


38.21 job_is_requesting_consumable

NAME
          job_is_requesting_consumable() -- Is job requesting resources of type
                                            CONSUMABLE_JOB?

SYNOPSIS
          bool job_is_requesting_consumable(lListElem *jep, const char *resoure_name)

FUNCTION
          This function returns true if "job" is requesting a resource with type
          CONSUMABLE_JOB.

INPUTS
          lListELem *jep - JB_Type element
          const char *resource_name - Name of resource

RESULT
          bool - true or false


38.22 jsv


38.22.1 –JSV_Type

NAME
          JSV_Type - CULL job submission verification element

ELEMENTS
          SGE_STRING(JSV_name)
             name of this element, no hashing because there are not much
          
          SGE_STRING(JSV_command)
             absolute path of the script
          
          SGE_STRING(JSV_pid)
             pid of the process
          
          SGE_REF(JSV_in)
             stdin to the process (type: FILE*)
          
          SGE_REF(JSV_out)
             stdout of the process (type: FILE*)
          
          SGE_REF(JSV_err)
             stderr of the process (type: FILE*)
          
          SGE_BOOL(JSV_has_to_restart)
             should we restart the ls script?
          
          SGE_LIST(JSV_incomplete)
             current values we got from the script
          
          SGE_LIST(JSV_complete)
             last complete set of send values
          
          SGE_ULONG(JSV_last_mod)
             last modification time of ls script

FUNCTION
          The attributes of this element show the state of a jsv script.
          A list of these elements is used in submit clients and master process.


38.22.2 jsv_create

NAME
          jsv_create() -- creates a new JSV object and initializes its attributes

SYNOPSIS
          static lListElem *
          jsv_create(const char *name, const char *context, lList **answer_list,
                     const char *jsv_url, const char *type, const char *user,
                     const char *scriptfile)

FUNCTION
          Returns a new JSV instance.

INPUTS
          const char *name       - Name od the new JSV element
          const char *context    - JSV_CONTEXT_CLIENT or thread name
          lList **answer_list    - AN_Type list
          const char *jsv_url    - JSV URL
          const char *type       - type part of 'jsv_url'
          const char *user       - user part of 'jsv_url'
          const char *scriptfile - path part of 'jsv_url'

RESULT
          static lListElem * - JSV_Type element

NOTES
          MT-NOTE: jsv_create() is MT safe


38.22.3 jsv_do_communication

NAME
          jsv_do_communication() -- Starts communicating with a JSV script

SYNOPSIS
          bool
          jsv_do_communication(sge_gdi_ctx_class_t *ctx, lListElem *jsv,
                               lList **answer_list)

FUNCTION
          Start a communication cycle to verify one job. The job to
          be verified has to be store in 'jsv' as attribute 'JSV_new_job'.
          Depending on the response of the JSV instance certain attributes
          in the 'jsv' will be changes (JSV_restart, JSV_soft_shutdown,
          JSV_done, JSV_new_job)

INPUTS
          sge_gdi_ctx_class_t *ctx - GE context
          lListElem *jsv           - JSV_Type instance
          lList **answer_list      - AN_Type list

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: jsv_do_communication() is MT safe


38.22.4 jsv_do_verify

NAME
          jsv_do_verify() -- verify a job using JSV's

SYNOPSIS
          bool
          jsv_do_verify(sge_gdi_ctx_class_t* ctx, const char *context,
                        lListElem **job, lList **answer_list, bool holding_lock)

FUNCTION
          This function verifies a job specification using one or multiple
          JSVs. The 'context' string will be used to identify which JSV's
          should be executed.
          
          In commandline clients the string "JSV_CONTEXT_CLIENT" has to be
          passed to this function. In qmaster context the name of the thread
          which calls this function has to be provided.
          
          If multiple JSVs should be executed then the job specification
          of 'job' will be passed to the first JSV. This specification might
          be changed during the verification process. The result will be
          passed to the second JSV process which might also adjust job
          specification parameters. This will either continue until the
          last JSV returns successfully or until a JSV rejects the job.
          
          'job' is input and output parameter. It might either be unchanged,
          partially changed or completely removed. Therfore 'job' might not be
          element in a list when the function is called.
          
          'holding_lock' notifies the function that the calling function
          is holding the global lock. In that case the global lock will be
          released during the verification process. After that the global
          lock will be aquired again.
          
          This function will return 'true' if the verification process
          was successfull. In that case 'job' contains the job specification
          of the verified job with all adjustments which might have been
          requested during the verification process of all JSV's.
          
          If the job was rejected by one of the JSVs then the return value
          of this funtion will be 'false' and the answer list will eiter
          contain the error reason which was provided by the rejecting JSV
          script/binary or it will contain a uniform message that the
          job was rejected due to JSV verification. If the job is acceped
          or accepted with modifications the returned value will be 'true'.

INPUTS
          sge_gdi_ctx_class_t* ctx - context object
          const char *context      - JSV_CONTEXT_CLIENT or thread name
          lListElem **job          - pointer or a job (JB_Type)
          lList **answer_list      - answer_list for messages
          bool holding_lock        - is the calling thread holding the
                                     global lock

RESULT
          bool - error state
             true  - success
                     job is accepted or accepted with modifications
             false - error
                     job is rejected

NOTES
          MT-NOTE: jsv_do_verify() is MT safe


38.22.5 jsv_is_enabled

NAME
          jsv_is_enabled() -- is JSV enabled in the given context

SYNOPSIS
          bool jsv_is_enabled(void)

FUNCTION
          Returns if there are active JSV instances which have to be triggered.
          As a side effect the function updates the JSV (restart) if the
          configuration setting changed in master.

INPUTS
          void - NONE

RESULT
          bool - is jsv active
             true  - there are active JSVs
             false - JSV is not configured

NOTES
          MT-NOTE: jsv_is_enabled() is MT safe


38.22.6 jsv_list_add

NAME
          jsv_list_add() -- adds a new JSV

SYNOPSIS
          bool
          jsv_list_add(const char *name, const char *context,
                       lList **answer_list, const char *jsv_url)

FUNCTION
          By calling this function a new JSV element will be registered internally.
          The JSV will be initialized with the values 'name", 'context', and
          'jsv_url'. The 'name' and 'context' will be used to identify the JSV.
          In command line clients the 'context' string JSV_CONTEXT_CLIENT should
          be passed to this function. Within qmaster the name of the thread
          which calls this function sould be used as 'context' string.
          
          The JSV data structures will be initialized but the JSV is not started
          when this function returns.
          
          In case of any errors the 'answer_list' will be filled and the function
          will return with the value 'false' instead of 'true'.
          

INPUTS
          const char *name    - JSV name (used for error messages)
          const char *context - JSV context name (to identify this JSV)
          lList **answer_list - AN_Type answer list
          const char *jsv_url - JSV URL

RESULT
          bool - error state
             true  - success
             false - false

NOTES
          MT-NOTE: jsv_list_add() is MT safe


38.22.7 jsv_list_remove

NAME
          jsv_list_remove() -- remove a JSV script

SYNOPSIS
          bool jsv_list_remove(const char *name, const char *context)

FUNCTION
          Remove all JSV scripts were 'name' and 'context' matches.

INPUTS
          const char *name    - name of a JSV script
          const char *context - JSV_CLIENT_CONTEXT or thread name

RESULT
          bool - error status
             true  - success
             false - error

NOTES
          MT-NOTE: jsv_list_remove() is MT safe


38.22.8 jsv_list_remove_all

NAME
          jsv_list_remove_all() -- Remove all JSV elements

SYNOPSIS
          bool jsv_list_remove_all(void)

FUNCTION
          Remove all JSV elements from the global 'jsv_list'

INPUTS
          void - None

RESULT
          bool - error state
             true  - success
             false - failed

NOTES
          MT-NOTE: jsv_list_remove_all() is MT safe


38.22.9 jsv_list_update

NAME
          jsv_list_update() -- update configuration and state of a JSV

SYNOPSIS
          bool
          jsv_list_update(const char *name, const char *context,
                          lList **answer_list, const char *jsv_url)

FUNCTION
          A call to this function either updates the configuration and/or
          state of a existing JSV or it creates a new one. 'name' and
          'context' are used to identify if the JSV already exists. If
          it does not exist then it will be created.
          
          If the JSV exists then it is tested if the provided 'jsv_url'
          is different from the jsv_url stored in the JSV element. In
          that case the provided 'jsv_url' will be used as new
          configuration value. If the JSV process is already running
          then it will be stopped. The process will also be stopped
          if the script file which was used to create the JSV process
          has been changed.

INPUTS
          const char *name    - name of the JSV element
          const char *context - context string which indentifies JSVs
          lList **answer_list - AN_Type answer list
          const char *jsv_url - JSV URL string

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: jsv_list_update() is not MT safe


38.22.10 jsv_send_command

NAME
          jsv_send_command() -- sends a command to a JSV script

SYNOPSIS
          bool
          jsv_send_command(lListElem *jsv, lList **answer_list, const char *message)

FUNCTION
          Sends the 'message' to the 'jsv' script. If this fails then
          'answer_list' will be filled.

INPUTS
          lListElem *jsv      - JSV element
          lList **answer_list - answer list
          const char *message - null terminated string

RESULT
          bool - error state
             true  - success
             false - failed

NOTES
          MT-NOTE: jsv_send_command() is MT safe


38.22.11 jsv_start

NAME
          jsv_start() -- Start a JSV isntance

SYNOPSIS
          bool jsv_start(lListElem *jsv, lList **answer_list)

FUNCTION
          A call to this function starts a new JSV instance if it is
          currently not running. Handles to pipe ends will be stored
          internally so that it is possible to communicate with the
          process which was started by this function.

INPUTS
          lListElem *jsv      - JSV_Type data structure
          lList **answer_list - AN_Type list where error messages are stored.

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: jsv_start() is not MT safe

SEE ALSO


38.22.12 jsv_url_parse

NAME
          jsv_url_parse() -- parses a JSV URL

SYNOPSIS
          bool
          jsv_url_parse(dstring *jsv_url, lList **answer_list, dstring *type,
                        dstring *user, dstring *path, bool in_client)

FUNCTION
          This function parses the given 'jsv_url' and fills the dstring 'type',
          'user' and 'path' with the parsed elements. If one of the elements was
          not specified with the JSV URL then the corresponding variable will
          not be changed.
          
          A JSV URL has following format:
          
             jsi_url := client_jsv_url | server_jsv_url ;
             server_jsi_url := [ type ":" ] [ user "@" ] path ;
             client_jsi_url := [ type ":" ] path ;
          
          Within client JSVs it is not allowed to specify a user. This function
          has to be used with value 'true' for the parameter 'in_client'.
          If an error happens during parsing then this function will fill
          'answer_list' with a corresponding message and the function will
          return with value 'false' otherwiese 'true' will be returned.

INPUTS
          dstring *jsv_url    - dstring containing a JSV url
          lList **answer_list - answer_list
          dstring *type       - "script"
          dstring *user       - specified username or NULL
          dstring *path       - absolute path to a script or binary
          bool in_client      - true in commandline clients
                                false within qmaster

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: jsv_url_parse() is MT safe


38.23 loadsensor


38.23.1 –LS_Type

NAME
          LS_Type - CULL load sensor element

ELEMENTS
          SGE_STRING(LS_name)
             name of this load sensor, no hashing,
             we only have few loadsensors/host
          
          SGE_STRING(LS_command)
             absolute path of the ls script
          
          SGE_STRING(LS_pid)
             pid of the ls process
          
          SGE_REF(LS_in)
             stdin to the ls process (type: FILE*)
          
          SGE_REF(LS_out)
             stdout of the ls process (type: FILE*)
          
          SGE_REF(LS_err)
             stderr of the ls process (type: FILE*)
          
          SGE_BOOL(LS_has_to_restart)
             should we restart the ls script?
          
          SGE_ULONG(LS_tag)
             tag for internal use
          
          SGE_LIST(LS_incomplete)
             current values we got from the ls script
          
          SGE_LIST(LS_complete)
             last complete set of ls values
          
          SGE_ULONG(LS_last_mod)
             last modification time of ls script

FUNCTION
          The attributes of this element show the state of a load sensor.
          A list of these elements is used in the execd.


38.24 mailrec


38.24.1 mailrec_parse

NAME
          mailrec_parse() -- Parse a list of mail recipients

SYNOPSIS
          int mailrec_parse(lList **lpp, const char *mail_str)

FUNCTION
          Parse a list of mail recipients.
          user[@host][,user[@host],...]

INPUTS
          lList **lpp          - MR_Type list
          const char *mail_str - stringlist of mail recipients

RESULT
          int - error state
             0 - success
            >0 - error

SEE ALSO

NOTES
          MT-NOTE: mailrec_parse() is MT safe


38.24.2 mailrec_unparse

NAME
          mailrec_unparse() -- Build a string of mail reipients

SYNOPSIS
          int mailrec_unparse(lList *head, char *mail_str,
                              unsigned int mail_str_len)

FUNCTION
          Build a string of mail reipients ("user@host,user,...")

INPUTS
          lList *head               - MR_Type list
          char *mail_str            - buffer to be filled
          unsigned int mail_str_len - size of buffer

RESULT
          int - error state
             0 - success
            >0 - error

SEE ALSO


38.25 manop


38.25.1 manop_is_manager

NAME
          manop_is_manager() -- is a certain user manager?

SYNOPSIS
          bool manop_is_manager(const char *user_name)

FUNCTION
          Checks if the user given by user name is a manager.

INPUTS
          const char *user_name - user name

RESULT
          bool - true or false

NOTES
          Operator/Manager should be a property of a user.
          Then the function would be user_is_manager - much more plausible

SEE ALSO


38.25.2 manop_is_operator

NAME
          manop_is_operator() -- is a certain user operator?

SYNOPSIS
          bool manop_is_operator(const char *user_name)

FUNCTION
          Checks if the user given by user name is a operator.
          A manager is implicitly also an operator.

INPUTS
          const char *user_name - user name

RESULT
          bool - true or false

NOTES
          Operator/Manager should be a property of a user.
          Then the function would be user_is_operator - much more plausible

SEE ALSO


38.26 object


38.26.1 –Object-Handling

NAME
          Object Handling -- utilities for sgeobj object access

FUNCTION
          This module provides utility functions for accessing CULL
          objects, e.g. getting a string representation for fields,
          setting field contents from string representation etc.

SEE ALSO


38.26.2 –Object-Typedefs

NAME
          Object-Typedefs -- typedefs for generic object handling

SYNOPSIS
          The enumeration sge_object_type defines different object and
          message types.
          
          The following types are defined:
             SGE_TYPE_ADMINHOST
             SGE_TYPE_CALENDAR
             SGE_TYPE_CKPT
             SGE_TYPE_CONFIG
             SGE_TYPE_GLOBAL_CONFIG
             SGE_TYPE_EXECHOST
             SGE_TYPE_JATASK
             SGE_TYPE_PETASK
             SGE_TYPE_JOB
             SGE_TYPE_JOB_SCHEDD_INFO
             SGE_TYPE_MANAGER
             SGE_TYPE_OPERATOR
             SGE_TYPE_SHARETREE
             SGE_TYPE_PE
             SGE_TYPE_PROJECT
             SGE_TYPE_CQUEUE
             SGE_TYPE_QINSTANCE
             SGE_TYPE_SCHEDD_CONF
             SGE_TYPE_SCHEDD_MONITOR
             SGE_TYPE_SHUTDOWN
             SGE_TYPE_MARK_4_REGISTRATION
             SGE_TYPE_SUBMITHOST
             SGE_TYPE_USER
             SGE_TYPE_USERSET
             SGE_TYPE_CUSER
             SGE_TYPE_CENTRY
             SGE_TYPE_ZOMBIE
             SGE_TYPE_SUSER
             SGE_TYPE_RQS
             SGE_TYPE_AR
             SGE_TYPE_JOBSCRIPT
          
          If usermapping is enabled, an additional object type is defined:
             SGE_TYPE_HGROUP
          
          The last value defined as obect type is SGE_TYPE_ALL.


38.26.3 object_append_field_to_dstring

NAME
          object_append_field_to_dstring() -- object field to string

SYNOPSIS
          const char *
          object_append_field_to_dstring(const lListElem *object,
                                         lList **answer_list,
                                         dstring *buffer, const int nm,
                                         char string_quotes)

FUNCTION
          Returns a string representation of a given object attribute.
          If errors arrise they are returned in the given answer_list.
          Data will be created in the given dynamic string buffer.
          For some fields a special handling is implemented, e.g. mapping
          bitfields to string lists.

INPUTS
          const lListElem *object - object to use
          lList **answer_list     - used to return error messages
          dstring *buffer         - buffer used to format the result
          const int nm            - attribute to output
          char string_quotes      - character to be used for string quoting
                                    '\0' means no quoting

RESULT
          const char * - string representation of the attribute value
                         (pointer to the string in the dynamic string
                         buffer, or NULL if an error occured.

NOTES
          For sublists, subobjects and references NULL is returned.

BUGS
          For the handled special cases, the dstring is cleared,
          the default handling appends to the dstring buffer.

SEE ALSO


38.26.4 object_append_raw_field_to_dstring

NAME
          object_append_raw_field_to_dstring() -- object field to string

SYNOPSIS
          const char *
          object_append_raw_field_to_dstring(const lListElem *object,
                                             lList **answer_list,
                                             dstring *buffer, const int nm,
                                             char string_quotes)

FUNCTION
          Returns a string representation of a given object attribute.
          If errors arrise they are returned in the given answer_list.
          Data will be created in the given dynamic string buffer.
          For some fields a special handling is implemented, e.g. mapping
          bitfields to string lists.

INPUTS
          const lListElem *object - object to use
          lList **answer_list     - used to return error messages
          dstring *buffer         - buffer used to format the result
          const int nm            - attribute to output
          char string_quotes      - character to be used for string quoting
                                    '\0' means no quoting

RESULT
          const char * - string representation of the attribute value
                         (pointer to the string in the dynamic string
                         buffer, or NULL if an error occured.

NOTES
          For sublists, subobjects and references NULL is returned.

BUGS
          For the handled special cases, the dstring is cleared,
          the default handling appends to the dstring buffer.

SEE ALSO


38.26.5 object_delete_range_id

NAME
          object_delete_range_id() -- del certain id from an range_list

SYNOPSIS
          void
          object_delete_range_id(lListElem *object, lList **answer_list,
                                 const int rnm, const u_long32 id)

FUNCTION
          Deletes a certain id from an objects sublist that is a range list.

INPUTS
          lListElem *object   - the object to handle
          lList **answer_list - error messages will be put here
          const int rnm       - attribute containing the range list
          const u_long32 id   - id to delete


38.26.6 object_get_name_prefix

NAME
          object_get_name_prefix() -- get prefix of cull attribute name

SYNOPSIS
          const char *
          object_get_name_prefix(const lDescr *descr, dstring *buffer)

FUNCTION
          Returns the prefix that is used in attribute names characterizing
          the object type (e.g. "QU_" for the QU_Type).

INPUTS
          const lDescr *descr - object type to use
          dstring *buffer     - buffer that is used to return the result

RESULT
          const char * - the prefix or
                         NULL, if an error occured

EXAMPLE
          object_get_name_prefix(QU_Type, buffer) = "QU_"
          object_get_name_prefix(JB_Type, buffer) = "JB_"

NOTES
          The function relies on object_get_primary_key. This function only
          is implemented for some object types.
          For types not handled in object_get_primary_key, NULL will be
          returned.

SEE ALSO


38.26.7 object_get_primary_key

NAME
          object_get_primary_key() -- get primary key for object type

SYNOPSIS
          int object_get_primary_key(const lDescr *descr)

FUNCTION
          Returns the primary key field for a given object type.

INPUTS
          const lDescr *descr - the object type (descriptor)

RESULT
          int - name (nm) of the primary key field or
                NoName (-1) on error.

NOTES
          Only implemented for selected object types.
          It would be better to have the necessary data in the object
          description, e.g. via a field property CULL_PRIMARY_KEY.
          
          Function interface breaks style guide - either we would have to
          pass an object, or call it descr_get_primary_key.


38.26.8 object_get_type

NAME
          object_get_type() -- return type (descriptor) for object

SYNOPSIS
          const lDescr * object_get_type(const lListElem *object)

FUNCTION
          Returns the cull type (descriptor) for a certain object.
          This descriptor can be different from the objects descriptor,
          as the objects descriptor can come from an object created from
          communication, can be a partial descriptor etc.

INPUTS
          const lListElem *object - the object to analyze

RESULT
          const lDescr * - the object type / descriptor


38.26.9 object_has_type

NAME
          object_has_type() -- has an object a certain type?

SYNOPSIS
          bool
          object_has_type(const lListElem *object, const lDescr *descr)

FUNCTION
          Checks if an object has a certain type.
          The check is done by looking up the primary key field in descr and
          checking, if this key field is contained in the given object.

INPUTS
          const lListElem *object - object to check
          const lDescr *descr     - type to check against

RESULT
          bool - true, if the object has the given type, else false

NOTES
          As looking up the primary key of an object is only implemented
          for selected types, this function also will work only for these
          object types.

SEE ALSO


38.26.10 object_name_get_type

NAME
          object_name_get_type() -- Return type id of a certain object

SYNOPSIS
          sge_object_type object_name_get_type(const char *name)

FUNCTION
          returns the type id a an object given by "name"
          We allow to pass in names in the form <object_name>:<key>, e.g.
          USERSET:deadlineusers.

INPUTS
          const char *name - object name

RESULT
          sge_object_type - type of the object

NOTES
          MT-NOTE: object_name_get_type() is MT safe


38.26.11 object_parse_field_from_string

NAME
          object_parse_field_from_string() -- set object attr. from str

SYNOPSIS
          bool
          object_parse_field_from_string(lListElem *object,
                                         lList **answer_list,
                                         const int nm, const char *value)

FUNCTION
          Sets a new value for a certain object attribute.
          The new value is passed as parameter in string format.
          For some fields a special handling is implemented, e.g. mapping
          string lists to bitfields.

INPUTS
          lListElem *object   - the object to change
          lList **answer_list - used to return error messages
          const int nm        - the attribute to change
          const char *value   - the new value

RESULT
          bool - true on success,
                 false, on error, error description in answer_list

NOTES
          Sublists, subobjects and references cannot be set with this
          function.

SEE ALSO


38.26.12 object_parse_raw_field_from_string

NAME
          object_parse_raw_field_from_string() -- set object attr. from str

SYNOPSIS
          bool
          object_parse_raw_field_from_string(lListElem *object,
                                             lList **answer_list,
                                             const int nm, const char *value)

FUNCTION
          Sets a new value for a certain object attribute.
          The new value is passed as parameter in string format.

INPUTS
          lListElem *object   - the object to change
          lList **answer_list - used to return error messages
          const int nm        - the attribute to change
          const char *value   - the new value

RESULT
          bool - true on success,
                 false, on error, error description in answer_list

NOTES
          Sublists, subobjects and references cannot be set with this
          function.

SEE ALSO


38.26.13 object_set_range_id

NAME
          object_set_range_id() -- store the initial range ids in "job"

SYNOPSIS
          int object_set_range_id(lListElem *job, u_long32 start,
                                      u_long32 end, u_long32 step)

FUNCTION
          The function stores the initial range id values ("start", "end"
          and "step") in the range list of an object. It should only be used
          in functions initializing objects range lists.

INPUTS
          lListElem *object - object to handle
          const int rnm     - attribute containing the range list
          u_long32 start    - first id
          u_long32 end      - last id
          u_long32 step     - step size

RESULT
          int - 0 -> OK
                1 -> no memory

NOTES
          MT-NOTE: object_set_range_id() is MT safe


38.26.14 object_type_free_master_list

NAME
          object_type_free_master_list() -- free the master list

SYNOPSIS
          bool
          object_type_free_master_list(const sge_object_type type)

FUNCTION
          Frees the masterlist for a certain type of objects.

INPUTS
          const sge_object_type type - the object type

RESULT
          bool - true, if the list existed and could be freed, else false

SEE ALSO


38.26.15 object_type_get_descr

NAME
          object_type_get_descr() -- get the descriptor for an event type

SYNOPSIS
          const lDescr* object_type_get_descr(const sge_object_type type)

FUNCTION
          Returns the CULL element descriptor for the object type
          associated with the given event.

INPUTS
          const sge_object_type type - the event type

RESULT
          const lDescr* - the descriptor, or NULL, if no descriptor is
                          associated with the type

EXAMPLE
          object_type_get_descr(SGE_TYPE_JOB) will return the descriptor
             JB_Type,
          object_type_get_descr(SGE_TYPE_SHUTDOWN) will return NULL

SEE ALSO


38.26.16 object_type_get_key_nm

NAME
          object_type_get_key_nm() -- get the primary key attribute for type

SYNOPSIS
          int object_type_get_key_nm(const sge_object_type type)

FUNCTION
          Returns the primary key attribute for the object type associated
          with the given event type.

INPUTS
          const sge_object_type type - event type

RESULT
          int - the key number (struct element nm of the descriptor), or
                -1, if no object type is associated with the event type

EXAMPLE
          object_type_get_key_nm(SGE_TYPE_JOB) will return JB_job_number
          object_type_get_key_nm(SGE_TYPE_SHUTDOWN) will return -1

SEE ALSO


38.26.17 object_type_get_master_list

NAME
          object_type_get_master_list() -- get master list for object type

SYNOPSIS
          lList** object_type_get_master_list(const sge_object_type type)

FUNCTION
          Returns a pointer to the master list holding objects of the
          given type.

INPUTS
          const sge_object_type type - the object type

RESULT
          lList** - the corresponding master list, or NULL, if the object
                    type has no associated master list

EXAMPLE
          object_type_get_master_list(SGE_TYPE_JOB) will return a pointer
          to the Master_Job_List.
          
          object_type_get_master_list(SGE_TYPE_SHUTDOWN) will return NULL,
          as this object type has no associated master list.

SEE ALSO


38.26.18 object_type_get_name

NAME
          object_type_get_name() -- get a printable name for event type

SYNOPSIS
          const char* object_type_get_name(const sge_object_type type)

FUNCTION
          Returns a printable name for an event type.

INPUTS
          const sge_object_type type - the event type

RESULT
          const char* - string describing the type

EXAMPLE
          object_type_get_name(SGE_TYPE_JOB) will return "JOB"

SEE ALSO


38.26.19 sge_master_list

NAME
          sge_master_list() -- get master list for object type

SYNOPSIS
          lList** sge_master_list(const object_description *object_base,
                                  const sge_object_type type)

FUNCTION
          Returns a pointer to the master list holding objects of the
          given type.

INPUTS
          const sge_object_type type - the object type

RESULT
          lList** - the corresponding master list, or NULL, if the object
                    type has no associated master list

EXAMPLE
          object_type_get_master_list(SGE_TYPE_JOB) will return a pointer
          to the Master_Job_List.
          
          object_type_get_master_list(SGE_TYPE_SHUTDOWN) will return NULL,
          as this object type has no associated master list.

SEE ALSO


38.27 path_alias


38.27.1 –PA_Type

NAME
          RN_Type - CULL path alias element

ELEMENTS
          SGE_STRING(PA_origin)
             original path
          
          SGE_HOST(PA_submit_host)
             submit hostname
          
          SGE_HOST(PA_exec_host)
             destination execution host
          
          SGE_STRING(PA_translation)
             path translation for the original path

FUNCTION
          CULL element holding information necessary to realize
          path aliasing. (Find more information in the --PathAlias
          ADOC comment)

SEE ALSO


38.27.2 -PathAlias

NAME
          PathAlias - Path aliasing mechanism for SGE/EE

FUNCTION
          Sometimes the directory structure on the different submit,
          execution hosts is not exactly the same. This makes it
          necessary to map certain paths for specific hosts.
          
          The administrators/users have the possibility to
          activate path aliasing by creating one or more of following
          files:
          
             $SGE_ROOT/$CELL/common/sge_aliases
             $HOME/.sge_aliases
          
          The file format is documentied in the ADOC commet for the
          function path_alias_read_from_file().
          
          The files are interpreted as follows:
             - after a submit client (qsub, qmon, ...) has retrieved
               the current working directory, the cluster global
               path aliasing file is read, if present. The user
               path aliasing file is read afterwards, as if it were
               appended to the global file.
             - as soon as both files are read, the path aliasing
               information is passed along with the submitted job.
             - On the execution host the aliasing information will be
               evaluated. The leading part of the current working
               directory will be replaced if the execution host entry of
               the path alias matches the executing host.

SEE ALSO


38.27.3 path_alias_list_get_path

NAME
          path_alias_list_get_path() -- map path according alias table

SYNOPSIS
          int path_alias_list_get_path(const lList *path_aliases,
                                       lList **alpp,
                                       const char *inpath,
                                       const char *myhost,
                                       char *outpath,
                                       int outmax)

FUNCTION
          "path_aliases" is used to map "inpath" for the host "myhost"
          into its alias path which will be written into the buffer
          "outpath" of size "outmax".

INPUTS
          const lList *path_aliases - alias table (PA_Type)
          lList **alpp              - AN_Type list pointer
          const char *inpath        - input path
          const char *myhost        - hostname
          char *outpath             - result path
          int outmax                - size of "outpath"

RESULT
          int - return state
             0 - OK

NOTES
          MT-NOTE: path_alias_list_get_path() is MT safe


38.27.4 path_alias_list_initialize

NAME
          path_alias_list_initialize() -- initialize path_alias_list

SYNOPSIS
          int path_alias_list_initialize(lList **path_alias_list,
                                         lList **alpp,
                                         const char *user,
                                         const char *host)

FUNCTION
          Intitialize "path_alias_list" according to the different
          path aliasing files.
          
          Following files will be used if available:
          
             $SGE_ROOT/$CELL/common/sge_aliases
             $HOME/.sge_aliases

INPUTS
          lList **path_alias_list - PA_Type list pointer
          lList **alpp            - AN_Type list pointer
          const char *user        - username
          const char *host        - hostname

RESULT
          int - return state
             -1 - error
              0 - OK

NOTES
          MT-NOTE: path_alias_list_initialize() is MT safe


38.27.5 path_alias_read_from_file

NAME
          path_alias_read_from_file() -- read file content to list

SYNOPSIS
          #include <sgeobj/sge_path_alias.h>
          
          static int path_alias_read_from_file(lList **path_alias_list,
                                               lList **alpp,
                                               char *file_name)

FUNCTION
          Read and parse the file with the name "file_name" and append
          entries into "path_alias_list". Errors will be logged in "alpp".
          
          File format:
          - Blank lines and lines beginning with a # sign in the first
            column are skipped.
          - Each line - other than a blank line or a line preceded by # -
            must contain four strings separated by any number of blanks
            or tabs.
          - The first string specifies a source path, the second a submit
            host, the third an execution host, and the fourth the source
            path replacement.
          - Both the submit and the execution host entries may consist
            of only a * sign, which matches any host.

INPUTS
          lList **path_alias_list - PA_Type list pointer
          lList **alpp            - AN_Type list pointer
          char *file_name         - name of an alias file

RESULT
          static int - error state
             -1 - Error
              0 - OK

NOTES
          MT-NOTE: path_alias_read_from_file() is MT safe


38.28 pe


38.28.1 –PE_Type

NAME
          PE_Type -- CULL

ELEMENTS
          SGE_STRING(PE_name)
             name of the pe
          
          SGE_ULONG(PE_slots)
             number of total slots
          
          SGE_LIST(PE_user_list)
             US_Type; list of allowed users
          
          SGE_LIST(PE_xuser_list)
             US_Type; list of not allowed users
          
          SGE_STRING(PE_start_proc_args)
             cmd line sequence for starting the pe
          
          SGE_STRING(PE_stop_proc_args)
             cmd line sequence for stopping the pe
          
          SGE_STRING(PE_allocation_rule)
             number of processors per machine
          
          SGE_BOOL(PE_control_slaves)
             whether slave tasks get fed into execd
          
          SGE_BOOL(PE_job_is_first_task)
             whether the job script also starts first
             task like with pvm or job script is just a
             starter doing no work like with mpi, dmake
             --> has only a meaning when
             PE_control_slaves is true
          
          SGE_LIST(PE_resource_utilization, RUE_Type)
             internal field; used only to store number used slots
             this field gets not spooled, updated dynamically
          
          SGE_STRING(PE_urgency_slots)
             Specifies what slot amount shall be used when computing jobs
             static urgency in case of jobs with slot range PE requests.
             The actual problem is that when determining the urgency number
             the number of slots finally assigned is not yet known. The following
             settings are supported: min/max/avg/<fixed integer>
          
          SGE_STRING(PE_qsort_args)
             Specifies the dynamic library, function name, and string arguments
             that should be called instead of the queue sort function once
             the candidate queues for a job have been located.  The format is:
             library_name function_name [strings_arguments ...]. The entire
             string is passed to the function as the second argument.
             NOTE: This is only available when compiled with -DSGE_PQS_API
          
          SGE_BOOL(PE_accounting_summary)
             For tightly integrated parallel jobs.
             Specifies if a single accounting record is written for the whole job,
             or if every task gets an individual accounting record.


38.28.2 pe_create_template

NAME
          pe_create_template -- build up a generic pe object

SYNOPSIS
          lListElem *pe_create_template(char *pe_name);

FUNCTION
          build up a generic pe object

INPUTS
          pe_name - name used for the PE_name attribute of the generic
                    pe object. If NULL then "template" is the default name.

RESULT
          !NULL - Pointer to a new CULL object of type PE_Type
          NULL - Error

NOTES
          MT-NOTE: pe_set_slots_used() is MT safe


38.28.3 pe_debit_slots

NAME
          pe_debit_slots() -- Debit pos/neg number of slots from PE

SYNOPSIS
          void pe_debit_slots(lListElem *pep, int slots, u_long32 job_id)

FUNCTION
          Increases or decreses the number of slots used with a PE.

INPUTS
          lListElem *pep  - The PE (PE_Type)
          int slots       - Pos/neg number of slots.
          u_long32 job_id - Job id for monitoring purposes.

NOTES
          MT-NOTE: pe_debit_slots() is MT safe


38.28.4 pe_is_matching

NAME
          pe_is_matching() -- Does Pe name match the wildcard?

SYNOPSIS
          bool pe_is_matching(const lListElem *pe, const char *wildcard)

FUNCTION
          The function returns true (1) if the name of the given
          "pe" matches the "wildcard".

INPUTS
          const lListElem *pe  - PE_Type element
          const char *wildcard - wildcard

RESULT
          bool - true or false


38.28.5 pe_is_referenced

NAME
          pe_is_referenced() -- Is a given PE referenced in other objects?

SYNOPSIS
          bool pe_is_referenced(const lListElem *pe, lList **answer_list,
                                const lList *master_job_list,
                                const lList *master_cqueue_list)

FUNCTION
          This function returns true (1) if the given "pe" is referenced
          in at least one of the objects contained in "master_job_list"
          or "master_cqueue_list". If this is the case than
          a corresponding message will be added to the "answer_list".

INPUTS
          const lListElem *pe             - PE_Type object
          lList **answer_list             - AN_Type list
          const lList *master_job_list    - JB_Type list
          const lList *master_cqueue_list - CQ_Type list

RESULT
          bool - true or false


38.28.6 pe_list_do_all_exist

NAME
          pe_list_do_all_exist() -- Check if a list of PE's really exists

SYNOPSIS
          bool
          pe_list_do_all_exist(const lList *pe_list,
                               lList **answer_list,
                               const lList *pe_ref_list,
                               bool ignore_make_pe)

FUNCTION
          Check if all PE's in "pe_ref_list" really exist in "pe_list".
          If "ignore_make_pe" is 'true' than the test for the PE with the
          name "make" will not be done.

INPUTS
          const lList *pe_list     - PE_Type list
          lList **answer_list      - AN_Type list
          const lList *pe_ref_list - ST_Type list of PE names
          bool ignore_make_pe      - bool

RESULT
          bool
             true  - if all PE's exist
             false - if at least one PE does not exist

NOTES
          MT-NOTE: pe_urgency_slots() is MT safe


38.28.7 pe_list_find_matching

NAME
          pe_list_find_matching() -- Find a PE matching  wildcard expr

SYNOPSIS
          const lListElem* pe_list_find_matching(lList *pe_list,
                                           const char *wildcard)

FUNCTION
          Try to find a PE that matches the given "wildcard" expression.

INPUTS
          const lList *pe_list       - PE_Type list
          const char *wildcard - Wildcard expression

RESULT
          lListElem* - PE_Type object or NULL


38.28.8 pe_list_locate

NAME
          pe_list_locate() -- Locate a certain PE

SYNOPSIS
          lListElem* pe_list_locate(lList *pe_list, const char *pe_name)

FUNCTION
          Locate the PE with the name "pe_name".

INPUTS
          lList *pe_list      - PE_Type list
          const char *pe_name - PE name

RESULT
          lListElem* - PE_Type object or NULL

NOTES
          MT-NOTE: pe_list_locate() is MT safe


38.28.9 pe_set_slots_used

NAME
          pe_set_slots_used() -- Set number of used PE slots

SYNOPSIS
          int pe_set_slots_used(lListElem *pe, int slots)

FUNCTION
          Sets the number of used PE slots.

INPUTS
          lListElem *pe - The pe object (PE_Type)
          int slots     - Number of slots.

RESULT
          int - 0 on success -1 on error

NOTES
          MT-NOTE: pe_set_slots_used() is MT safe


38.28.10 pe_slots_used

NAME
          pe_get_slots_used() -- Returns used PE slots

SYNOPSIS
          int pe_get_slots_used(const lListElem *pe)

FUNCTION
          Returns the number of currently used PE slots.

INPUTS
          const lListElem *pe - The PE object (PE_Type)

RESULT
          int - number of currently used PE slots or -1 on error

NOTES
          MT-NOTE: pe_get_slots_used() is MT safe


38.28.11 pe_urgency_slots

NAME
          pe_urgency_slots() -- Compute PEs urgency slot amount for a slot range

SYNOPSIS
          int pe_urgency_slots(const lListElem *pe,
                               const char *urgency_slot_setting,
                               const lList* range_list)

FUNCTION
          Compute PEs urgency slot amount for a slot range. The urgency slot
          amount is the amount that is assumed for a job with a slot range
          before an assignment.

INPUTS
          const lListElem *pe              - PE_Type object.
          const char *urgency_slot_setting - Ugency slot setting as in sge_pe(5)
          const lList* range_list          - RN_Type list.

RESULT
          int - The slot amount.

NOTES
          MT-NOTE: pe_urgency_slots() is MT safe


38.28.12 pe_validate

NAME
          pe_validate() -- validate a parallel environment

SYNOPSIS
          int pe_validate(int startup, lListElem *pep, lList **alpp)

FUNCTION
          Ensures that a new pe is not a duplicate of an already existing one
          and checks consistency of the parallel environment:
             - pseudo parameters in start and stop proc
             - validity of the allocation rule
             - correctness of the queue list, the user list and the xuser list
          

INPUTS
          lListElem *pep - the pe to check
          lList **alpp   - answer list pointer, if an answer shall be created, else
                           NULL - errors will in any case be output using the
                           Grid Engine error logging macros.
          int startup    - are we in qmaster startup phase?

RESULT
          int - STATUS_OK, if everything is ok, else other status values,
                see libs/gdi/sge_answer.h

NOTES
          MT-NOTE: pe_validate() is not MT safe


38.28.13 pe_validate_qsort_args

NAME
          pe_validate_qsort_args() -- Ensures the qsort_args setting is valid
          by verifying that the dynamic link library can be loaded. This function
          is presumably called during startup and whenever a PE is created
          or modified.

SYNOPSIS
          int pe_validate_qsort_args(lList **alpp, const char *qsort_args,
                lListElem *pe, void **lib, void **fn)

FUNCTION
          Validates urgency slot setting.

INPUTS
          lList **alpp  - On error a context message is returned.
          const char *qsort_args - The qsort_args string
          lListElem *pe - The new or existing PE
          void **lib - The returned handle of the dynamically linked library
          void **fn - The returned address of the dynamically linked function

RESULT
          int - values other than STATUS_OK indicate error condition

NOTES
          MT-NOTE: pe_validate_qsort_args() is not MT safe


38.28.14 pe_validate_slots

NAME
          pe_validate_slots() -- Ensure urgency slot setting is valid.

SYNOPSIS
          int pe_validate_slots(lList **alpp, u_long32 slots)

FUNCTION
          Validates slot setting.

INPUTS
          lList **alpp   - On error a context message is returned.
          u_long32 slots - The slots value.

RESULT
          int - values other than STATUS_OK indicate error condition

NOTES
          MT-NOTE: pe_validate_slots() is MT safe


38.28.15 pe_validate_urgency_slots

NAME
          pe_validate_urgency_slots() -- Ensure urgency slot setting is valid.

SYNOPSIS
          int pe_validate_urgency_slots(lList **alpp, const char *s)

FUNCTION
          Validates urgency slot setting.

INPUTS
          lList **alpp  - On error a context message is returned.
          const char *s - The urgency slot string to be validated.

RESULT
          int - values other than STATUS_OK indicate error condition

NOTES
          MT-NOTE: pe_validate_urgency_slots() is MT safe


38.29 pe_task


38.29.1 –PETR_Type

NAME
          PET_Type - CULL pe task request element

ELEMENTS
          Job identification
          ==================
          SGE_ULONG(PETR_jobid)
          
          SGE_ULONG(PETR_jataskid)
          
          Submission information
          ======================
          SGE_STRING(PETR_queuename)
          
          SGE_STRING(PETR_owner)
          
          SGE_STRING(PETR_cwd)
          
          SGE_LIST(PETR_path_aliases)
          
          SGE_LIST(PETR_environment)
          
          Time information
          ================
          SGE_ULONG(PETR_submission_time)

FUNCTION
          Objects of PETR_Type are used to request the start of a task in a
          tightly integrated parallel job.

SEE ALSO


38.29.2 –PETR_Type

NAME
          PET_Type - CULL pe task request element

ELEMENTS
          Job identification
          ==================
          SGE_ULONG(PETR_jobid)
          
          SGE_ULONG(PETR_jataskid)
          
          Submission information
          ======================
          SGE_STRING(PETR_queuename)
          
          SGE_STRING(PETR_owner)
          
          SGE_STRING(PETR_cwd)
          
          SGE_LIST(PETR_path_aliases)
          
          SGE_LIST(PETR_environment)
          
          Time information
          ================
          SGE_ULONG(PETR_submission_time)

FUNCTION
          Objects of PETR_Type are used to request the start of a task in a
          tightly integrated parallel job.

SEE ALSO


38.29.3 –PETR_Type

NAME
          PET_Type - CULL pe task request element

ELEMENTS
          Job identification
          ==================
          SGE_ULONG(PETR_jobid)
          
          SGE_ULONG(PETR_jataskid)
          
          Submission information
          ======================
          SGE_STRING(PETR_queuename)
          
          SGE_STRING(PETR_owner)
          
          SGE_STRING(PETR_cwd)
          
          SGE_LIST(PETR_path_aliases)
          
          SGE_LIST(PETR_environment)
          
          Time information
          ================
          SGE_ULONG(PETR_submission_time)

FUNCTION
          Objects of PETR_Type are used to request the start of a task in a
          tightly integrated parallel job.

SEE ALSO


38.29.4 –PET_Type

NAME
          PET_Type - CULL pe task element

ELEMENTS
          Job identification
          ==================
          SGE_STRING(PET_id)
             The pe task id. It is unique per job.
          
          SGE_STRING(PET_name)
             Optional name of a pe task. Not yet completely implemented, but
             it could be used to pass information to be shown by qstat.
          
          Runtime control information
          ===================
          SGE_ULONG(PET_status)
             Status of the pe job, see defines in libs/gdi/sge_jobL.h.
          
          SGE_LIST(PET_granted_destin_identifier_list)
             Granted destination identifier list. Will contain one
             entry specifying the queue the pe task runs in.
          
          SGE_ULONG(PET_pid)
             Pid of a running pe task (process group id).
          
          SGE_STRING(PET_osjobid)
             os jobid  of a running pe task.
          
          Usage information
          =================
          SGE_LIST(PET_usage)
          SGE_LIST(PET_scaled_usage)
          SGE_LIST(PET_previous_usage)
          
          Time information
          ================
          SGE_ULONG(PET_submission_time)
          SGE_ULONG(PET_start_time)
          SGE_ULONG(PET_end_time)
          
          Submission information
          ======================
          SGE_STRING(PET_cwd)
             Current working directory of the pe task. If not set, the
             cwd from the ja task is inherited.
          
          SGE_LIST(PET_path_aliases)
             Path alias list for the pe task.
          
          SGE_LIST(PET_environment)
             Environment variables exported to the pe task.
             They will overwrite inherited variables from the ja task.

FUNCTION
          PET_Type objects are used to store information about tasks of
          tightly integrated parallel jobs (started with qrsh -inherit).
          
          Parallel tasks are sub objects of array tasks (even for non
          array jobs one pseudo array task is created).
          
              +---------+   1:x   +----------+   1:x   +----------+
              | JB_Type |<------->| JAT_Type |<------->| PET_Type |
              +---------+         +----------+         +----------+

SEE ALSO


38.29.5 –PET_Type

NAME
          PET_Type - CULL pe task element

ELEMENTS
          Job identification
          ==================
          SGE_STRING(PET_id)
             The pe task id. It is unique per job.
          
          SGE_STRING(PET_name)
             Optional name of a pe task. Not yet completely implemented, but
             it could be used to pass information to be shown by qstat.
          
          Runtime control information
          ===================
          SGE_ULONG(PET_status)
             Status of the pe job, see defines in libs/gdi/sge_jobL.h.
          
          SGE_LIST(PET_granted_destin_identifier_list)
             Granted destination identifier list. Will contain one
             entry specifying the queue the pe task runns in.
          
          SGE_ULONG(PET_pid)
             Pid of a running pe task (process group id).
          
          SGE_STRING(PET_osjobid)
             os jobid  of a running pe task.
          
          Usage information
          =================
          SGE_LIST(PET_usage)
          SGE_LIST(PET_scaled_usage)
          SGE_LIST(PET_previous_usage)
          
          Time information
          ================
          SGE_ULONG(PET_submission_time)
          SGE_ULONG(PET_start_time)
          SGE_ULONG(PET_end_time)
          
          Submission information
          ======================
          SGE_STRING(PET_cwd)
             Current working directory of the pe task. If not set, the
             cwd from the ja task is inherited.
          
          SGE_LIST(PET_path_aliases)
             Path alias list for the pe task.
          
          SGE_LIST(PET_environment)
             Environment variables exported to the pe task.
             They will overwrite inherited variables from the ja task.

FUNCTION
          PET_Type objects are used to store information about tasks of
          tightly integrated parallel jobs (started with qrsh -inherit).
          
          Parallel tasks are sub objects of array tasks (even for non
          array jobs one pseudo array task is created).
          
              +---------+   1:x   +----------+   1:x   +----------+
              | JB_Type |<------->| JAT_Type |<------->| PET_Type |
              +---------+         +----------+         +----------+

SEE ALSO


38.29.6 –PET_Type

NAME
          PET_Type - CULL pe task element

ELEMENTS
          Job identification
          ==================
          SGE_STRING(PET_id)
             The pe task id. It is unique per job.
          
          SGE_STRING(PET_name)
             Optional name of a pe task. Not yet completely implemented, but
             it could be used to pass information to be shown by qstat.
          
          Runtime control information
          ===================
          SGE_ULONG(PET_status)
             Status of the pe job, see defines in libs/gdi/sge_jobL.h.
          
          SGE_LIST(PET_granted_destin_identifier_list)
             Granted destination identifier list. Will contain one
             entry specifying the queue the pe task runns in.
          
          SGE_ULONG(PET_pid)
             Pid of a running pe task (process group id).
          
          SGE_STRING(PET_osjobid)
             os jobid  of a running pe task.
          
          Usage information
          =================
          SGE_LIST(PET_usage)
          SGE_LIST(PET_scaled_usage)
          SGE_LIST(PET_previous_usage)
          
          Time information
          ================
          SGE_ULONG(PET_submission_time)
          SGE_ULONG(PET_start_time)
          SGE_ULONG(PET_end_time)
          
          Submission information
          ======================
          SGE_STRING(PET_cwd)
             Current working directory of the pe task. If not set, the
             cwd from the ja task is inherited.
          
          SGE_LIST(PET_path_aliases)
             Path alias list for the pe task.
          
          SGE_LIST(PET_environment)
             Environment variables exported to the pe task.
             They will overwrite inherited variables from the ja task.

FUNCTION
          PET_Type objects are used to store information about tasks of
          tightly integrated parallel jobs (started with qrsh -inherit).
          
          Parallel tasks are sub objects of array tasks (even for non
          array jobs one pseudo array task is created).
          
              +---------+   1:x   +----------+   1:x   +----------+
              | JB_Type |<------->| JAT_Type |<------->| PET_Type |
              +---------+         +----------+         +----------+

SEE ALSO


38.29.7 pe_task_sum_past_usage

NAME
          pe_task_sum_past_usage() -- sum up pe tasks past usage

SYNOPSIS
          lListElem* pe_task_sum_past_usage(lListElem *container,
                                            const lListElem *pe_task)

FUNCTION
          The pe task list of a ja task can contain one container
          element to hold the usage of finished pe tasks no longer
          stored in the task list.
          
          This function adds the usage of pe_task to the usage of container.

INPUTS
          lListElem *container     - container object to hold past usage
          const lListElem *pe_task - the pe task from which to copy usage

RESULT
          lListElem* - the container object

SEE ALSO


38.29.8 pe_task_sum_past_usage_all

NAME
          pe_task_sum_past_usage_all() -- sum up all pe tasks past usage

SYNOPSIS
          lListElem* pe_task_sum_past_usage_all(lList *pe_task_list)

FUNCTION
          Similar to pe_task_sum_past_usage, but will sum up the usage of
          all pe tasks in a task list to the container object in this list.
          
          If the container object does not yet exist, it will be created.

INPUTS
          lList *pe_task_list - the pe task list to process

RESULT
          lListElem* - the container object

SEE ALSO


38.29.9 pe_task_sum_past_usage_list

NAME
          pe_task_sum_past_usage_list() -- sum up pe tasks past usage

SYNOPSIS
          lListElem*
          pe_task_sum_past_usage_list(lList *pe_task_list,
                                      const lListElem *pe_task)

FUNCTION
          Similar to pe_task_sum_past_usage.
          The container is retrieved from pe_task_list, if it does not
          yet exist it is created and inserted into pe_task_list as
          first element.

INPUTS
          lList *pe_task_list      - list containing the container object
          const lListElem *pe_task - the pe task from which to copy usage

RESULT
          lListElem* - the container object

SEE ALSO


38.30 qinstance


38.30.1 qinstance_check_owner

NAME
          qinstance_check_owner() -- check if a user is queue owner

SYNOPSIS
          bool
          qinstance_check_owner(const lListElem *queue, const char *user_name)

FUNCTION
          Checks if the given user is an owner of the given queue.
          Managers and operators are implicitly owner of all queues.

INPUTS
          const lListElem *queue - the queue to check
          const char *user_name  - the user name to check

RESULT
          bool - true, if the user is owner, else false


38.30.2 qinstance_debit_consumable

NAME
          qinstance_debit_consumable() -- Debits/Undebits consumables

SYNOPSIS
          int
          qinstance_debit_consumable(lListElem *qep,
                                     lListElem *jep,
                                     lList *centry_list,
                                     int slots)

FUNCTION
          Checks if there are nonstatic load values avaialable for the
          qinstance. If this is the case, then then the "unknown" state
          of that machine will be released.

INPUTS
          lListElem *qep     - Qinstance resource container
          lListElem *jep     - The job (JB_Type) defining which resources and how
                               much of them need to be (un)debited
          lList *centry_list - The global complex list that is needed to interpret
                               the jobs' resource requests.
          int slots          - The number of slots for which we are debiting.
                               Positive slots numbers cause debiting, negative
                               ones cause undebiting.

RESULT
          Returns -1 in case of an error. Otherwise the number of (un)debitations
          that actually took place is returned. If 0 is returned that means the
          consumable resources of the 'ep' object has not changed.

NOTES
          MT-NOTE: qinstance_debit_consumable() is MT safe


38.30.3 qinstance_get_name

NAME
          qinstance_get_name() -- returns the fullname of a qinstance object

SYNOPSIS
          const char *
          qinstance_get_name(const lListElem *this_elem,
                             dstring *string_buffer)

FUNCTION
          Returns the fullname of a qinstance object

INPUTS
          const lListElem *this_elem - QU_Type
          dstring *string_buffer     - dynamic string buffer

RESULT
          const char * - pointer to the internal string buffer of "string_buffer"

NOTES
          MT-NOTE: qinstance_get_name() is MT safe


38.30.4 qinstance_increase_qversion

NAME
          qinstance_increase_qversion() -- increase the qinstance queue version

SYNOPSIS
          void qinstance_increase_qversion(lListElem *this_elem)

FUNCTION
          Increase the queue version of the given qinstance "this_elem".

INPUTS
          lListElem *this_elem - QU_Type element

RESULT
          void - None

NOTES
          MT-NOTE: qinstance_increase_qversion() is MT safe


38.30.5 qinstance_is_a_ckpt_referenced

NAME
          qinstance_is_a_ckpt_referenced() -- Is an CKPT object referenced

SYNOPSIS
          bool qinstance_is_a_ckpt_referenced(const lListElem *this_elem)

FUNCTION
          Is an CKPT object referenced in "this_elem".

INPUTS
          const lListElem *this_elem - CKPT_Type element

RESULT
          bool - test result
             true  - a CKPT is referenced
             false - no CKPT is referenced

NOTES
          MT-NOTE: qinstance_is_a_ckpt_referenced() is MT safe


38.30.6 qinstance_is_a_pe_referenced

NAME
          qinstance_is_a_pe_referenced() -- is a PE referenced

SYNOPSIS
          bool qinstance_is_a_pe_referenced(const lListElem *this_elem)

FUNCTION
          Test is at least one PE is referenced by qinstance "this_elem"

INPUTS
          const lListElem *this_elem - QU_Type

RESULT
          bool - test result
             true  - an PE is referenced
             false - no PE is referenced ("NONE")

NOTES
          MT-NOTE: qinstance_is_a_pe_referenced() is MT safe


38.30.7 qinstance_is_calendar_referenced

NAME
          qinstance_is_calendar_referenced() -- is the calendar referenced

SYNOPSIS
          bool
          qinstance_is_calendar_referenced(const lListElem *this_elem,
                                           const lListElem *calendar)

FUNCTION
          Is the "calendar" referenced in the qinstance "this_elem".

INPUTS
          const lListElem *this_elem - QU_Type element
          const lListElem *calendar  - CAL_Type element

RESULT
          bool - test result
             true  - is referenced
             false - is not referenced

NOTES
          MT-NOTE: qinstance_is_calendar_referenced() is MT safe


38.30.8 qinstance_is_centry_a_complex_value

NAME
          qinstance_is_centry_a_complex_value() -- Is it a complex_value

SYNOPSIS
          bool
          qinstance_is_centry_a_complex_value(const lListElem *this_elem,
                                              const lListElem *centry)

FUNCTION
          Is the given "centry" in the list of complex_values of "this_elem".

INPUTS
          const lListElem *this_elem - QU_Type element
          const lListElem *centry    - CE_Type element

RESULT
          bool - test result
             true  - it is a complex value
             false - no complex value

NOTES
          MT-NOTE: qinstance_is_centry_a_complex_value() is MT safe


38.30.9 qinstance_is_ckpt_referenced

NAME
          qinstance_is_ckpt_referenced() -- Is the CKTP referenced

SYNOPSIS
          bool
          qinstance_is_ckpt_referenced(const lListElem *this_elem,
                                       const lListElem *ckpt)

FUNCTION
          Tests if the given CKPT object ("ckpt") is referenced in
          the qinstance "this_elem".

INPUTS
          const lListElem *this_elem - QU_Type element
          const lListElem *ckpt      - CKPT_Type element

RESULT
          bool - test result
             true  - CKPT is referenced
             false - CKPT is not referenced

NOTES
          MT-NOTE: qinstance_is_ckpt_referenced() is MT safe


38.30.10 qinstance_is_pe_referenced

NAME
          qinstance_is_pe_referenced() -- Is the PE object referenced

SYNOPSIS
          bool
          qinstance_is_pe_referenced(const lListElem *this_elem,
                                     const lListElem *pe)

FUNCTION
          Is the given PE ("pe") referenced in the qinstance element "this_elem".

INPUTS
          const lListElem *this_elem - QU_Type element
          const lListElem *pe        - PE_Type element

RESULT
          bool - test result
             true  - is referenced
             false - is not referenced

NOTES
          MT-NOTE: qinstance_is_pe_referenced() is MT safe


38.30.11 qinstance_list_find_matching

NAME
          qinstance_list_find_matching() -- find certain qinstances

SYNOPSIS
          bool
          qinstance_list_find_matching(const lList *this_list,
                                       lList **answer_list,
                                       const char *hostname_pattern,
                                       lList **qref_list)

FUNCTION
          Finds all qinstances in "this_list" whose hostname part matches
          the "hostname_pattern" (fnmatch pattern) and stores the
          qinstance name in "qref_list". In case of any error "answer_list"
          will be filled.

INPUTS
          const lList *this_list       - QU_Type list
          lList **answer_list          - AN_Type list
          const char *hostname_pattern - fnmatch hostname pattern
          lList **qref_list            - QR_Type list

RESULT
          bool - error result
             true  - success

NOTES
          MT-NOTE: qinstance_list_find_matching() is MT safe


38.30.12 qinstance_list_locate

NAME
          qinstance_list_locate() -- find a qinstance

SYNOPSIS
          lListElem *
          qinstance_list_locate(const lList *this_list,
                                const char *hostname, const char *cqueue_name)

FUNCTION
          Find a qinstance in "this_list" which is part of the cluster queue
          with the name "cqueue_name" and resides on the host with the name
          "hostname".

INPUTS
          const lList *this_list  - QU_Type list
          const char *hostname    - hostname
          const char *cqueue_name - cluster queue name

RESULT
          lListElem * - QU_Type element

NOTES
          MT-NOTE: qinstance_list_locate() is MT safe


38.30.13 qinstance_list_locate2

NAME
          qinstance_list_locate2() -- find a qinstance using the fullname

SYNOPSIS
          lListElem *
          qinstance_list_locate2(const lList *queue_list,
                                 const char *full_name)

FUNCTION
          find a qinstance using the fullname

INPUTS
          const lList *queue_list - QU_Type list
          const char *full_name   - fullname of the qinstance (<cqueue>@<hostname>)

RESULT
          lListElem * - QU_type element

NOTES
          MT-NOTE: qinstance_list_locate2() is MT safe


38.30.14 qinstance_list_set_tag

NAME
          qinstance_list_set_tag() -- tag a list of qinstances

SYNOPSIS
          void
          qinstance_list_set_tag(lList *this_list, u_long32 tag_value)

FUNCTION
          Tag a list of qinstances ("this_list") with "tag_value".

INPUTS
          lList *this_list   - QU_Type list
          u_long32 tag_value - unsingned long value (not a bitmask)

RESULT
          void - None

NOTES
          MT-NOTE: qinstance_list_set_tag() is MT safe


38.30.15 qinstance_list_validate

NAME
          qinstance_list_validate() -- validates and initializes qinstances

SYNOPSIS
          bool
          qinstance_list_validate(lList *this_list, lList **answer_list)

FUNCTION
          Validates qinstances attributes and initializes them if necessary.

INPUTS
          lList *this_list - QU_Type list
          lList **answer_list - AN_Type

RESULT
          void - error result
             true  - success
             false - error

NOTES
          MT-NOTE: qinstance_list_validate() is MT safe


38.30.16 qinstance_message_add

NAME
          qinstance_message_add() -- Adds a message to the qinstance structure

SYNOPSIS
          bool
          qinstance_message_add(lListElem *this_elem, u_long32 type,
                                const char *message)

FUNCTION
          Adds a message to the qinstance structure

INPUTS
          lListElem *this_elem - QU_Type
          u_long32 type        - message type
          const char *message  - message

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: qinstance_message_add() is MT safe


38.30.17 qinstance_message_trash_all_of_type_X

NAME
          qinstance_message_trash_all_of_type_X() -- Trash messages

SYNOPSIS
          bool
          qinstance_message_trash_all_of_type_X(lListElem *this_elem,
                                                u_long32 type)

FUNCTION
          Removes all messages with the message "type" id.

INPUTS
          lListElem *this_elem - QU_Type
          u_long32 type        - message type

RESULT
          bool - error state
             true  - success
             false - error

NOTES
          MT-NOTE: qinstance_message_trash_all_of_type_X() is MT safe


38.30.18 qinstance_set_full_name

NAME
          qinstance_set_full_name() -- set the full name of the qinstance

SYNOPSIS
          void
          qinstance_set_full_name(lListElem *this_elem)

FUNCTION
          Set the full name of the qinstance. The QU_qname name attribute
          will be used as input for the cqueue part and QU_qhostname
          as hostname part of the full name.

INPUTS
          lListElem *this_elem - QU_Type

RESULT
          void - NONE

NOTES
          MT-NOTE: qinstance_set_full_name() is MT safe


38.30.19 qinstance_set_slots_used

NAME
          qinstance_set_slots_used() -- Modifies the number of used slots

SYNOPSIS
          void
          qinstance_set_slots_used(lListElem *this_elem, int new_slots)

FUNCTION
          Modifies the number of used slots

INPUTS
          lListElem *this_elem - QU_Type
          int new_slots        - new slot value

RESULT
          void - NONE

NOTES
          MT-NOTE: qinstance_set_slots_used() is MT safe


38.30.20 qinstance_slots_reserved

NAME
          qinstance_slots_reserved() -- the number of maximal reserved slots

SYNOPSIS
          int qinstance_slots_reserved(const lListElem *this_elem)

FUNCTION
          Returns the number of maximal reserved slots by all advance reservations

INPUTS
          const lListElem *this_elem - QU_Type element

RESULT
          int - number of slots

NOTES
          MT-NOTE: qinstance_slots_reserved() is MT safe


38.30.21 qinstance_slots_used

NAME
          qinstance_slots_used() -- Returns the number of currently used slots

SYNOPSIS
          int
          qinstance_slots_used(const lListElem *this_elem)

FUNCTION
          Returns the number of currently used slots.

INPUTS
          const lListElem *this_elem - QU_Type element

RESULT
          int - number of slots

NOTES
          MT-NOTE: qinstance_slots_used() is MT safe


38.30.22 qinstance_validate

NAME
          qinstance_validate() -- validates and initializes qinstances

SYNOPSIS
          bool
          qinstance_validate(lListElem *this_elem, lList **answer_list)

FUNCTION
          Validates qinstance attributes and initializes them if necessary.

INPUTS
          lListElem *this_elem - QU_Type
          lList **answer_list - AN_Type

RESULT
          void - error result
             true  - success
             false - error

NOTES
          MT-NOTE: qinstance_validate() is MT safe


38.30.23 qtype_append_to_dstring

NAME
          qtype_append_to_dstring() -- Creates qtype bitmask as string

SYNOPSIS
          const char * qtype_append_to_dstring(u_long32 qtype, dstring *string)

FUNCTION
          This functions expects a "qtype" bitmask. Each bit represents a
          certain queue type. If it is set to 1 the corresponding type name
          will be appended to "string". If no bit is 1 than "NONE" will be
          appended to "string".

INPUTS
          u_long32 qtype  - bitmask
          dstring *string - string

RESULT
          const char * - pointer to the internal buffer of string

NOTES
          MT-NOTE: qtype_append_to_dstring() is MT safe


38.31 qinstance_state


38.31.1 –State_Chart

                  /---------------------------------------------------\
                  |                     exists                        |
                  |                                                   |
          o-----> |                                                   |------->X
                  |                               /-----------------\ |
                  |                               |   (suspended)   | |
                  |                               |                 | |
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !s   |            |    |   s   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - -|-|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !S   |            |    |   S   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - -|-|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !A   |            |    |   A   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - -|-|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !C   |            |    |   C   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |                               \-----------------/ |
                  |- - - - - - - - - - - - - - - - - - - - - - - - - -|
                  |                               /-----------------\ |
                  |                               |   (disabled)    | |
                  |                               |                 | |
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !u   |            |    |   u   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - - -|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !a   |            |    |   a   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - - -|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !d   |            |    |   d   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - -|-|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !D   |            |    |   D   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - -|-|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !E   |            |    |   E   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - -|-|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !c   |            |    |   c   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |- - - - - - - - - - - - - - - -|- - - - - - - - -|-|
                  |         /--------\            |    /-------\    | |
                  | o-----> |        |---------------> |       |    | |
                  |         |   !o   |            |    |   o   |    | |
                  |         |        | <---------------|       |    | |
                  |         \--------/            |    \-------/    | |
                  |                               \-----------------/ |
                  \---------------------------------------------------/
          
                  u := qinstance-host is unknown
                  a := load alarm
                  s := manual suspended
                  A := suspended due to suspend_threshold
                  S := suspended due to subordinate
                  C := suspended due to calendar
                  d := manual disabled
                  D := disabled due to calendar
                  c := configuration ambiguous
                  o := orphaned
                  P := preempted


38.31.2 qinstance_has_state

NAME
          qinstance_has_state() -- checks a qi for a given states

SYNOPSIS
          bool qinstance_has_state(const lListElem *this_elem, u_long32 bit)

FUNCTION
          Takes a state mask and a queue instance and checks wheather the queue
          is in at least one of the states. If the state mask contains U_LONG32_MAX
          the function will always return true.

INPUTS
          const lListElem *this_elem - queue instance
          u_long32 bit               - state mask

RESULT
          bool - true, if the queue instance has one of the requested states.

NOTES
          MT-NOTE: qinstance_has_state() is MT safe


38.31.3 qinstance_state_from_string

NAME
          qinstance_state_from_string() -- takes a state string and returns an int

SYNOPSIS
          u_long32 qinstance_state_from_string(const char* sstate)

FUNCTION
          Takes a string with character representations of the different states and
          generates a mask with the different states.

INPUTS
          const char* sstate - each character one state
          lList **answer_list - stores error messages
          u_long32 filter  - a bit filter for allowed states

RESULT
          u_long32 - new state or 0, if no state was set

NOTES
          MT-NOTE: qinstance_state_from_string() is MT safe


38.31.4 transition_is_valid_for_qinstance

NAME
          transition_is_valid_for_qinstance() -- is transition valid

SYNOPSIS
          bool
          transition_is_valid_for_qinstance(u_long32 transition,
                                            lList **answer_list)

FUNCTION
          Checks if the given transition is valid for a qinstance object.
          If the transition is valid, than true will be returned by this function.

INPUTS
          u_long32 transition - transition id
          lList **answer_list - AN_Type list

RESULT
          bool - test result
             true  - transition is valid
             false - transition is invalid

NOTES
          MT-NOTE: transition_is_valid_for_qinstance() is MT safe


38.32 qref


38.32.1 qref_list_add

NAME
          qref_list_add() -- Add a queue reference to the list

SYNOPSIS
          bool
          qref_list_add(lList **this_list,
                        lList **answer_list,
                        const char *qref_string)

FUNCTION
          Add the queue reference "qref_string" to the QR_type list "this_list".
          Errors will be reported via return value and "answer_list".

INPUTS
          lList **this_list       - QR_Type
          lList **answer_list     - AN_Type
          const char *qref_string - queue reference

RESULT
          bool - error state
             true  - success
             false - error


38.32.2 qref_list_is_valid

NAME
          qref_list_is_valid() -- check queue reference list

SYNOPSIS
          bool
          qref_list_is_valid(const lList *this_list, lList **answer_list)

FUNCTION
          This function will be used to check the hard and soft queue list.
          which will be defined during job submittion or redefined via
          qalter and qmon.
          
          This function will return successfull when:
             - queues are requestable and
             - if the contained queue-pattern matches at least one
               queue instance

INPUTS
          const lList *this_list - QR_Type
          lList **answer_list    - AN_Type

RESULT
          bool - error state
             true  - success
             false - error


38.32.3 qref_list_resolve

NAME
          qref_list_resolve() -- resolves a list of queue reference patterns

SYNOPSIS
          bool
          qref_list_resolve(const lList *src_qref_list,
                            lList **answer_list,
                            lList **qref_list,
                            bool *found_something,
                            const lList *cqueue_list,
                            const lList *hgroup_list,
                            bool resolve_cqueue,
                            bool resolve_qdomain)

FUNCTION
          Resolves a list of queue reference patterns. "src_qref_list"
          is the list of input patterns to be resolved. "qref_list" contains
          all resolved names which matched at least one of the given
          patterns. The master lists "cqueue_list" and "hgroup_list" are
          needed to resolve the pattern. "resolve_cqueue" and
          "resolve_qdomain" can be used to define how qreferenes are
          resolved.
          
          Examples:
          
             <CQ-pattern> (e.g. "*")
                resolve_cqueue == false
                   => cq1 cq2
                resolve_cqueue == true
                   => cq1@hostA1 cq1@hostA2 cq1@hostB1 cq1@hostB2
                      cq2@hostA1 cq2@hostA2 cq2@hostB1 cq2@hostB2
          
             <QD-pattern> (e.q "*@@hgrp*")
                resolve_qdomain == false
                   => cq1@@hgrpA cq1@@hgrpB cq2@@hgrpA cq2@@hgrpB
                resolve_qdomain == true
                   => cq1@hostA1 cq1@hostA2 cq1@hostB1 cq1@hostB2
                      cq2@hostA1 cq2@hostA2 cq2@hostB1 cq2@hostB2
          
             <QI-pattern> (e.g "cq*@host?1")
                   => cq1@hostA1 cq1@hostB1
                      cq2@hostA1 cq2@hostB1

INPUTS
          const lList *src_qref_list - QR_Type list (input: pattern)
          lList **answer_list        - AN_Type list
          lList **qref_list          - QR_Type list (output: resolved qrefs)
          bool *found_something      - a pattern matched? (output)
          const lList *cqueue_list   - master CQ_Type list
          const lList *hgroup_list   - master HGRP_Type list
          bool resolve_cqueue        - resolve cqueue pattern?
          bool resolve_qdomain       - resolve qdomain pattern?

RESULT
          bool - error state
             true  - success
             false - error


38.32.4 qref_list_trash_some_elemts

NAME
          qref_list_trash_some_elemts() -- Remove some elements from list

SYNOPSIS
          bool
          qref_list_trash_some_elemts(lList **this_list,
                                      const char *full_name)

FUNCTION
          Remove all elements from "this_list" where either the cluster
          queue name is equivalent with the cluster queue part of "fullname"
          or if the hostname is different from the hostname part of
          "fullname"

INPUTS
          lList **this_list     - QR_Type
          const char *full_name - queue instance name

RESULT
          bool - error state
             true  - success
             false - error


38.33 range


38.33.1 –RN_Type

NAME
          RN_Type -- CULL range element

ELEMENTS
          SGE_ULONG(RN_min)
             minimum or start value of an id range (e.g. 1)
          
          SGE_ULONG(RN_max)
             maximum or end value of an id range (e.g. 9)
          
          SGE_ULONG(RN_step)
             stepsize (e.g. 2)

FUNCTION
          CULL element holding values which define a id range
          (e.g. 1-9:2 => 1, 3, 5, 7, 9).
          Lists of this CULL element are held within a CULL job element
          (JB_Type) to hold job array task ids.
          Several functions may be used to access/modify/delete range
          elements and range lists. You may find them in the 'SEE ALSO'
          section. It is highly advised to use these access functions
          because they assure and require a defined structure of
          elements and lists.
          
          Range elements and lists stored in other CULL elements fulfil
          following conditions:
          
             - min <= max
             - step >= 1
             - real range elements (e.g. 1-9:2 instead of 1-10:2)
             - min-ids within range elements part of the same
               list are in ascending order: min_id(n) < min_id(n+1)
               (e.g. NOT 11-20:1; 1-9:2)
             - ids within range elements part of the same
               list are non-overlapping: max_id(n) < min_id(n+1)
               (e.g. 1-9:2; 11-20:1; 25-28:3)

SEE ALSO


38.33.2 range_containes_id_less_than

NAME
          range_containes_id_less_than() -- is one id less than given id

SYNOPSIS
          bool
          range_containes_id_less_than(const lListElem *range, u_long32 id)

FUNCTION
          This function tests if at least one id in "range" is less
          than "id"

INPUTS
          const lListElem *range - RN_Type element
          u_long32 id            - number

RESULT
          bool - true or false


38.33.3 range_correct_end

NAME
          range_correct_end() -- correct end of a range element

SYNOPSIS
          static void range_correct_end(lListElem *this_range)

FUNCTION
          This function modifies the the 'end' id of the 'this_range'
          element if it is not correct. After the modification the
          'end' id is the last valid id which is part of the range.

INPUTS
          lListElem *this_range - RN_Type

RESULT
          'this_range' will be modified

EXAMPLE
          1-6:2 (1,3,5) will be modified to 1-5:2

SEE ALSO


38.33.4 range_get_all_ids

NAME
          range_get_all_ids() -- reads 'start', 'end' and 'step'

SYNOPSIS
          void range_get_all_ids(const lListElem *range, u_long32 *min,
                                 u_long32 *max, u_long32 *step)

FUNCTION
          Reads 'min' (start), 'max' (end) and 'step' from a range element.
          If 'range' is NULL then 'min', 'max' and 'step' will be set to 0.

INPUTS
          const lListElem *range - range element of type RN_Type
          u_long32 *min          - start value
          u_long32 *max          - end value
          u_long32 *step         - step size

SEE ALSO

NOTES
          MT-NOTE: range_get_all_ids() is MT safe


38.33.5 range_get_number_of_ids

NAME
          range_get_number_of_ids() -- Number of ids within a range

SYNOPSIS
          u_long32 range_get_number_of_ids(const lList *this_elem)

FUNCTION
          This function determines the number of ids contained
          in 'this_elem'

INPUTS
          const lList *this_elem - RN_Type element

RESULT
          u_long32 - number of ids

EXAMPLE
          1-5:2 (1, 3, 5)   => 3

SEE ALSO


38.33.6 range_is_id_within

NAME
          range_is_id_within() -- Is id contained in range?

SYNOPSIS
          bool range_is_id_within(const lListElem *range, u_long32 id)

FUNCTION
          True is returned by this function if 'id' is part of 'range'

INPUTS
          const lListElem *range - RN_Type element
          u_long32 id            - id

RESULT
          bool - true or false

SEE ALSO

NOTES
          MT-NOTE: range_is_id_within() is MT safe


38.33.7 range_is_overlapping

NAME
          range_is_overlapping() -- Do two ranges interleave?

SYNOPSIS
          static bool range_is_overlapping(const lListElem *this_elem,
                                           const lListElem *range)

FUNCTION
          True will be returned when the given ranges interleave. This
          does not necessaryly mean that certain ids exist in both ranges.

INPUTS
          const lListElem *this_elem - RN_Type
          const lListElem *range - RN_Type

RESULT
          static bool - false or true

EXAMPLE
          1-5:3    4-10:7      => true
          1-5:3    5-10:6      => true
          1-5:3    6-10:4      => false

SEE ALSO

NOTES
          MT-NOTE: range_is_overlapping() is MT safe


38.33.8 range_list_calculate_difference_set

NAME
          range_list_calculate_difference_set() -- Difference set list

SYNOPSIS
          void range_list_calculate_difference_set(lList **range_list,
                                                   lList **answer_list,
                                                   const lList *range_list1,
                                                   const lList *range_list2)

FUNCTION
          'range_list' will contain all ids part of 'range_list1' but not
          contained in 'range_list2'

INPUTS
          lList **range_list       - pointer to result RN_Type list
          lList **answer_list      - pointer to AN_Type list
          const lList *range_list1 - first source RN_Type list
          const lList *range_list2 - second source RN_Type list

SEE ALSO


38.33.9 range_list_calculate_intersection_set

NAME
          range_list_calculate_intersection_set() -- Intersection set

SYNOPSIS
          void range_list_calculate_intersection_set(lList **range_list,
                                               lList **answer_list,
                                               const lList *range_list1,
                                               const lList *range_list2)

FUNCTION
          'range_list' will contain all ids which are contained in
          'range_list1' and also in 'range_list2'.

INPUTS
          lList **range_list       - pointer to result RN_Type list
          lList **answer_list      - pointer to AN_Type list
          const lList *range_list1 - first source RN_Type list
          const lList *range_list2 - second source RN_Type list

SEE ALSO


38.33.10 range_list_calculate_union_set

NAME
          range_list_calculate_union_set() -- Union set of two range lists

SYNOPSIS
          void range_list_calculate_union_set(lList **range_list,
                                              lList **answer_list,
                                              const lList *range_list1,
                                              const lList *range_list2)

FUNCTION
          All ids contained in 'range_list1' and 'range_list2' will be
          contained in 'range_list' after a call of this function.
          

INPUTS
          lList **range_list       - pointer to union set RN_Type list
          lList **answer_list      - pointer to AN_Type list
          const lList *range_list1 - first source RN_Type list
          const lList *range_list2 - second source RN_Type list

RESULT
          range_list and answer_list may be modified

SEE ALSO


38.33.11 range_list_compress

NAME
          range_list_compress() -- Joins sequenced ranges within a list

SYNOPSIS
          void range_list_compress(lList *range_list)

FUNCTION
          Consecutive ranges within the list will be joined by this
          function. Following pre-conditions have to be fulfilled, so
          that this function works correctly:
             (1) ids have to be in ascending order
             (2) Only the first/last id of a range may be contained
                 in the predecessor/successor range

INPUTS
          lList *range_list - RN_Type list

RESULT
          'range_list' will be modified

EXAMPLE
          1-3:1,4-5:1,6-8:2,8-10:2   => 1-5:1,6-10:2

SEE ALSO

NOTES
          MT-NOTE: range_list_compress() is MT safe


38.33.12 range_list_containes_id_less_than

NAME
          range_list_containes_id_less_than() -- has id less than x

SYNOPSIS
          bool range_list_containes_id_less_than(const lList *range_list,
                                                 u_long32 id)

FUNCTION
          Is at least one id in the "range_list" less than "id"

INPUTS
          const lList *range_list - RN_Type list
          u_long32 id             - number

RESULT
          bool - true or false


38.33.13 range_list_get_average

NAME
          range_list_get_average() -- Return average of all numbers in range.

SYNOPSIS
          double range_list_get_average(const lList *this_list)

FUNCTION
          The average of all numbers in the range is returned. For an empty
          range 0 is returned.

INPUTS
          const lList *this_list - RN_Type list
          u_long32 upperbound    - This is used as range upperbound if non-0

RESULT
          double - the average

NOTES
          MT-NOTES: range_list_get_average() is MT safe


38.33.14 range_list_get_first_id

NAME
          range_list_get_first_id() -- First id contained in the list

SYNOPSIS
          u_long32 range_list_get_first_id(const lList *range_list,
                                           lList **answer_list)

FUNCTION
          The first id of the first range element of the list will
          be returned. If 'range_list' is NULL or empty 0 will be
          returned and 'answer_list' will be filled with an error
          message.

INPUTS
          const lList *range_list - RN_Type list
          lList **answer_list     - Pointer to an AN_Type list

RESULT
          u_long32 - First id or 0

SEE ALSO

NOTES
          MT-NOTE: range_list_get_first_id() is MT safe


38.33.15 range_list_get_last_id

NAME
          range_list_get_last_id() -- Returns last id contained in the list

SYNOPSIS
          u_long32 range_list_get_last_id(const lList *range_list,
                                         lList **answer_list)

FUNCTION
          The last id of the last range element of the list will be
          returned. If 'range_list' is NULL or empty 0 will be
          returned and 'answer_list' will be filled with an error
          message.

INPUTS
          const lList *range_list - RN_Type list
          lList **answer_list     - Pointer to an AN_Type list

RESULT
          u_long32 - Last id or 0

SEE ALSO


38.33.16 range_list_get_number_of_ids

NAME
          range_list_get_number_of_ids() -- Determines the number of ids

SYNOPSIS
          u_long32 range_list_get_number_of_ids(const lList *this_list)

FUNCTION
          This function determines the number of ids contained
          in 'this_list'. If 'this_list' is NULL then 0 will be returned.

INPUTS
          const lList *this_list - RN_Type list

RESULT
          u_long32 - number of ids

EXAMPLE
          1-5:2, 7-10:3, 20-23:1 (1, 3, 5, 7, 10, 20, 21, 22, 23) => 9

SEE ALSO

NOTE
          MT-NOTE: range_list_get_number_of_ids() is MT safe


38.33.17 range_list_initialize

NAME
          range_list_initialize() -- (Re)initialize a range list

SYNOPSIS
          void range_list_initialize(lList **this_list,
                                     lList **answer_list)

FUNCTION
          'this_list' will be created if it does not exist. If it already
          exists all elements contained in this list will be removed.

INPUTS
          lList **this_list  - Pointer to a RN_Type-list
          lList **answer_list - Pointer to a AN_Type-list or NULL

RESULT
          *this_list will be an empty RN_Type list
          *answer_list may contain error messages

SEE ALSO


38.33.18 range_list_insert_id

NAME
          range_list_insert_id() -- insert an id into a range list

SYNOPSIS
          void range_list_insert_id(lList **range_list, lList **answer_list,
                                    u_long32 id)

FUNCTION
          'id' will be inserted into 'range_list'.

INPUTS
          lList **range_list  - pointer to a RN_Type list
          lList **answer_list - pointer to a AN_Type list
          u_long32 id         - new id

NOTES
          It may be possible that 'id' is multiply contained in 'range_list'
          after using this function. Use range_list_compress() or
          range_list_sort_uniq_compress() to eliminate them.

RESULT
          range_list and answer_list may be modified

SEE ALSO

NOTES
          It may be possible that 'id' is multiply contained in 'range_list'
          after using this function. Use range_list_compress() or
          range_list_sort_uniq_compress() to eliminate them.


38.33.19 range_list_is_empty

NAME
          range_list_is_empty() -- check if id lists containes ids

SYNOPSIS
          bool range_list_is_empty(const lList *range_list)

FUNCTION
          Returns true if "range_list" containes no ids.

INPUTS
          const lList *range_list - RN_Type list

RESULT
          bool - true or false

SEE ALSO


38.33.20 range_list_is_id_within

NAME
          range_list_is_id_within() -- Is id contained in range list?

SYNOPSIS
          bool
          range_list_is_id_within(const lList *range_list, u_long32 id)

FUNCTION
          True is returned by this function if 'id' is part of at least
          one range element of 'range_list'

INPUTS
          const lList *range_list - RN_Type list
          u_long32 id             - id

RESULT
          bool - true or false

SEE ALSO

NOTES
          MT-NOTE: range_list_is_id_within() is MT safe


38.33.21 range_list_move_first_n_ids

NAME
          range_list_move_first_n_ids() -- split a range list

SYNOPSIS
          void range_list_move_first_n_ids(lList **range_list,
                                           lList **answer_list,
                                           lList **range_list2,
                                           u_long32 n)

FUNCTION
          The first 'n' ids within 'range_list' will be moved into
          'range_list2'. Error messages may be found in 'answer_list'

INPUTS
          lList **range_list  - pointer to a RN_Type list (source)
          lList **answer_list - pointer to an AN_Type list
          lList **range_list2 - pointer to a RN_Type list (destination)
          u_long32 n          - number of ids

RESULT
          range_list, range_list2, answer_list may be modified

SEE ALSO


38.33.22 range_list_print_to_string

NAME
          range_list_print_to_string() -- Print range list into the string

SYNOPSIS
          void range_list_print_to_string(const lList *this_list,
                                          dstring *string, bool ignore_step,
                                          bool comma_as_separator)

FUNCTION
          Print all ranges given in 'this_list' into the dynamic 'string'.
          If 'this_list' is NULL then the word "UNDEFINED" will be added
          to 'string'. If 'ignore_step' is 'true' then the stepsize of all
          ranges will be suppressed.

INPUTS
          const lList *this_list     - RN_Type
          dstring *string            - dynamic string
          bool ignore_step           - ignore step for printing
          bool comma_as_separator    - use the format 1,2,3 instead of 1-2:
          bool print_always_as_range - even if the range has only one id

RESULT
          string will be modified

SEE ALSO


38.33.23 range_list_remove_id

NAME
          range_list_remove_id() -- remove an id from a range list

SYNOPSIS
          void
          range_list_remove_id(lList **range_list, lList **answer_list,
                               u_long32 id)

FUNCTION
          'id' will be removed from 'range_list'.

INPUTS
          lList **range_list  - pointer to a RN_Type list
          lList **answer_list - pointer to a AN_Type list
          u_long32 id         - new id

RESULT
          range_list and answer_list may be modified

SEE ALSO


38.33.24 range_set_all_ids

NAME
          range_set_all_ids() -- writes 'start', 'end' and 'step'

SYNOPSIS
          void range_set_all_ids(lListElem *range, u_long32 min,
                                 u_long32 max, u_long32 step)

FUNCTION
          Writes 'min' (start), 'max' (end) and 'step' into a range element

INPUTS
          lListElem *range - range element of type RN_Type
          u_long32 min     - start value
          u_long32 max     - end value
          u_long32 step    - step size

NOTES
          Step values will be nomalized. (e.g. 1-1:3 => 1-1:1)

SEE ALSO

NOTES
          Step values will be nomalized. (e.g. 1-1:3 => 1-1:1)


38.33.25 range_to_dstring

NAME
          range_to_dstring() -- Appends a range to a dynamic string

SYNOPSIS
          void range_to_dstring(u_long32 start,
                                        u_long32 end,
                                        int step,
                                        dstring *dyn_taskrange_str)

FUNCTION
          Appends a range to a dynamic string.

INPUTS
          u_long32 start              - min id
          u_long32 end                - max id
          int step                    - step size
          dstring *dyn_taskrange_str  - dynamic string
          int ignore_step             - ignore step for output
          bool use_comma_as_separator - use a comma instead of '-' and ':' for separation
          bool print_always_as_range - even if the range has only one id

SEE ALSO


38.34 report


38.34.1 job_report_init_from_job

NAME
          job_report_init_from_job() -- initialize job report

SYNOPSIS
          void job_report_init_from_job(lListElem *job_report,
                                        const lListElem *job,
                                        const lListElem *ja_task,
                                        const lListElem *pe_task)

FUNCTION
          Initialize "job_report" from the attributes obtained from
          "job", "ja_task" and "pe_task".

INPUTS
          lListElem *job_report    - JR_Type object
          const lListElem *job     - JB_Type object
          const lListElem *ja_task - JAT_Type object
          const lListElem *pe_task - PET_Type object


38.34.2 job_report_print_usage

NAME
          job_report_print_usage() -- Print usage contained in job report

SYNOPSIS
          void job_report_print_usage(const lListElem *job_report,
                                      FILE *fp)

FUNCTION
          Print usage information conatines in "job_report". Print the
          information to the given file stream "fp" or as debug messages.

INPUTS
          const lListElem *job_report - JR_Type element
          FILE *fp                    - file stream or NULL


38.35 sge_eval_expression


38.35.1 sge_eval_expression

NAME
          sge_eval_expression() -- boolean expression extension

SYNOPSIS
          int sge_eval_expression(u_long32 type,
                                  const char *expr,
                                  const char *value)

FUNCTION
          boolean expression extension of regular expression evaluation function
          fnmatch()

INPUTS
          u_long32 type - type of resource
          const char *expr - expression string to be evaluated
          const char *value - value string to be compared for
          lList **answer_list - answer list to pass back error messages

RESULT
          int - result if expression is true or
              0 - strings are the same or both NULL
              1 - if is false
             -1 - for empty expression, null, or other error

SEE ALSO


38.36 str


38.36.1 str_list_append_to_dstring

NAME
          str_list_append_to_dstring() -- append strings to dstring

SYNOPSIS
          const char *
          str_list_append_to_dstring(const lList *this_list,
                                     dstring *string,
                                     const char delimiter)

FUNCTION
          Append the strings contained in "this_list" to the dstring
          "string". Separate them by the character contained in
          "delimiter".
          If "this_list" is NULL or conaines no elements, "NONE" will
          be added to the dstring.

INPUTS
          const lList *this_list - ST_Type list
          dstring *string        - dynamic string
          const char delimiter   - delimiter

RESULT
          const char * - pointer to the given "string"-buffer

SEE ALSO


38.36.2 str_list_is_valid

NAME
          str_list_is_valid() -- Are all strings valid

SYNOPSIS
          bool
          str_list_is_valid(const lList *this_list, lList **answer_list)

FUNCTION
          Does each element in "this_list" contain a valid string (!= NULL).

INPUTS
          const lList *this_list - ST_Type list
          lList **answer_list    - AN_Type list

RESULT
          bool - result
             true  - all strings are != NULL
             false - at least one entry is NULL


38.36.3 str_list_parse_from_string

NAME
          str_list_parse_from_string() -- Parse a list of strings

SYNOPSIS
          bool
          str_list_parse_from_string(lList **this_list,
                                     const char *string,
                                     const char *delimitor)

FUNCTION
          Parse a list of strings from "string". The strings have to be
          separated by a token contained in "delimitor". for each string
          an element of type ST_Type will be added to "this_list".

INPUTS
          lList **this_list     - ST_Type list
          const char *string    - string to be parsed
          const char *delimitor - delimitor string

RESULT
          bool - error state
             true  - success
             false - error

SEE ALSO

NOTES
          MT-NOTE: str_list_parse_from_string() is MT safe


38.37 subordinate


38.37.1 so_list_resolve

NAME
          so_list_resolve() -- Resolve a generic list of subordinates into their
                               full names.

SYNOPSIS
          bool so_list_resolve(const lList *so_list, lList **answer_list,
                               lList **resolved_so_list, const char *cq_name,
                               const char *hostname)

FUNCTION
          Goes through every entry in the so_list, retrieves the corresponding
          cqueue, gets the qinstance for hostname from the cqueue, and adds the
          qinstance's full name to the resolved_so_list.  If qi_name is given, the
          subordinate list will be checked to make sure that it doesn't contain the
          queue to which the list is subordinate.

INPUTS
          const lList *so_list     - the list of subordinates to resolve
          lList **answer_list      - answer list for errors
          lList **resolved_so_list - the destination list for resolved subordinates
          const char *cq_name      - the queue name of the qinstance to which the
                                     subordinate list is subordinate
          const char *hostname     - the hostname for the queue to which the
                                     subordinate list is subordinate

RESULT
          bool - error state
             true  - success
             false - error


38.38 suser


38.38.1 Master_SUser_List

NAME
          Master_SUser_List -- list of submit users

SYNOPSIS
          lList *Master_SUser_List;

FUNCTION
          The global variable 'Master_SUser_List' is held within the master
          daemon. It containes one CULL element of type 'SU_Type' for each
          user who submitted a job.
          Enties within this list have to be updated when a new job
          enters/leaves the SGE system

SEE ALSO


38.38.2 SU_Type

NAME
          SU_Type - CULL submit users element

SYNOPSIS
          SU_Type
          +--- SU_name: username of a user submittet a job
          +--- SU_jobs: currently active jobs for this user
                        (Jobs in system which are in the 'finished'
                         state are also accounted here)

FUNCTION
          CULL element which holds information for a user which is able to
          submit jobs into an SGE system.
          The variable 'Master_SUser_List' is used to hold multiple
          'SU_Type' elements within the master deamon. Use the functions
          mentioned in the 'see also' section to access, modify, delete
          'SU_Type' elements and the 'Master_SUser_List'.

SEE ALSO


38.38.3 suser_check_new_job

NAME
          suser_check_new_job() -- checks, if a job can be registered

SYNOPSIS
          int suser_check_new_job(const lListElem *job, u_long32 max_u_jobs,
                                     int force_registration)

FUNCTION
          This function checks whether a new "job" would exceed the maxium
          number of allowed jobs per user ("max_u_jobs"). JB_owner of "job"
          is the username which will be used by this function to compare
          the current number of registered jobs with "max_u_jobs". If the
          limit would be exceeded than the function will return 1 otherwise 0.

INPUTS
          const lListElem *job   - JB_Type element
          u_long32 max_u_jobs    - maximum number of allowed jobs per user
          int force_registration - force job registration

RESULT
          int - 1 => limit would be exceeded
                0 => otherwise


38.38.4 suser_decrease_job_counter

NAME
          suser_decrease_job_counter() -- decrease the users job counter

SYNOPSIS
          void suser_decrease_job_counter(lListElem *suser)

FUNCTION
          The job counter within "suser" will be decreased by one

INPUTS
          lListElem *suser - SU_Type list

RESULT
          void - NONE

SEE ALSO


38.38.5 suser_get_job_count

NAME
          suser_job_count() - number of jobs for a given user

SYNOPSIS
          void suser_job_count(const lListElem *job)

FUNCTION
          number of jobs for a given user

INPUTS
          const lListElem *job - JB_Type element

RESULT
          number of jobs in the system


38.38.6 suser_get_job_counter

NAME
          suser_get_job_counter() -- return the users job counter

SYNOPSIS
          u_long32 suser_get_job_counter(lListElem *suser)

FUNCTION
          Returns the current number of jobs registed for "suser"

INPUTS
          lListElem *suser - SU_Type element

RESULT
          u_long32 - number of jobs

SEE ALSO


38.38.7 suser_increase_job_counter

NAME
          suser_increase_job_counter() -- increase the users job counter

SYNOPSIS
          void suser_increase_job_counter(lListElem *suser)

FUNCTION
          The job counter within "suser" will be increased by one

INPUTS
          lListElem *suser - SU_Type list

RESULT
          void - NONE

SEE ALSO


38.38.8 suser_list_add

NAME
          suser_list_add() -- Add a new entry (uniq) entry into a list

SYNOPSIS
          lListElem* suser_list_add(lList **suser_list, lList **answer_list,
                                    const char *suser_name)

FUNCTION
          This function creates a new CULL element for the user "susername"
          into the "suser_list". The newly created element will be returned.
          If an element for this user already exists than this element will
          be returned.

INPUTS
          lList **suser_list     - SU_Type list
          lList **answer_list    - AN_Type list
          const char *suser_name - username

RESULT
          lListElem* - SU_Type element or NULL

SEE ALSO


38.38.9 suser_list_find

NAME
          suser_list_find() -- find a user entry in a list

SYNOPSIS
          lListElem* suser_list_find(lList *suser_list,
                                     const char *suser_name)

FUNCTION
          This function tries to find the first entry for user "suser_name"
          in the list "suser_list".

INPUTS
          lList *suser_list      - SU_Type list
          const char *suser_name - username

RESULT
          lListElem* - SU_Type element pointer or NULL

SEE ALSO


38.38.10 suser_register_new_job

NAME
          suser_register_new_job() -- try to register a new job

SYNOPSIS
          int suser_register_new_job(const lListElem *job,
                                     u_long32 max_u_jobs,
                                     int force_registration)

FUNCTION
          This function checks whether a new "job" would exceed the maximum
          number of allowed jobs per user ("max_u_jobs"). JB_owner of "job"
          is the username which will be used by this function to compare
          the current number of registered jobs with "max_u_jobs". If the
          limit would be exceeded than the function will return 1, otherwise
          it will increase the jobcounter of the job owner and return 0.
          In some situations it may be necessary to force the incrementating
          of the jobcounter (reading jobs from spool area). This may be done
          with "force_registration".

INPUTS
          const lListElem *job   - JB_Type element
          u_long32 max_u_jobs    - maximum number of allowed jobs per user
          int force_registration - force job registration

RESULT
          int - 1 => limit would be exceeded
                0 => otherwise

SEE ALSO


38.38.11 suser_unregister_job

NAME
          suser_unregister_job() -- unregister a job

SYNOPSIS
          void suser_unregister_job(const lListElem *job)

FUNCTION
          Decrease the jobcounter for the job owner of "job".

INPUTS
          const lListElem *job - JB_Type element

RESULT
          void - NONE

SEE ALSO


38.39 usage


38.39.1 usage_list_get_double_usage

NAME
          usage_list_get_double_usage() -- return double usage value

SYNOPSIS
          double
          usage_list_get_double_usage(const lList *usage_list, const char *name,
                                      double def)

FUNCTION
          Searches a usage object with the given name in the given usage
          list. If such an element is found, returns the value of the
          usage object as double value.
          If no such element is found, return the given default value.

INPUTS
          const lList *usage_list - the usage list
          const char *name        - name of the element to search
          double def              - default value

RESULT
          double - value of found object or default

SEE ALSO


38.39.2 usage_list_get_ulong_usage

NAME
          usage_list_get_ulong_usage() -- return ulong usage value

SYNOPSIS
          u_long64
          usage_list_get_ulong_usage(const lList *usage_list, const char *name,
                                     u_long64 def)

FUNCTION
          Searches for a usage object with the given name in the given usage
          list. If such an element is found, returns the value of the
          usage object as u_long64 value.
          If no such element is found, return the given default value.

INPUTS
          const lList *usage_list - the usage list
          const char *name        - name of the element to search
          u_long64 def            - default value

RESULT
          u_long64 - value of found object or default

SEE ALSO


38.39.3 usage_list_set_double_usage

NAME
          usage_list_set_double_usage() -- create/update a usage record

SYNOPSIS
          void
          usage_list_set_double_usage(lList *usage_list, const char *name,
                                      double value)

FUNCTION
          Updates the value of a usage record. If no usage record exists with the
          given name in usage_list, a new record is created.

INPUTS
          lList *usage_list - list containing the usage record to update
          const char *name  - name of the usage record to update
          double value      - the new value

NOTES
          MT-NOTE: usage_list_set_double_usage() is MT safe

SEE ALSO


38.39.4 usage_list_set_ulong_usage

NAME
          usage_list_set_ulong_usage() -- create/update a usage record

SYNOPSIS
          void
          usage_list_set_ulong_usage(lList *usage_list, const char *name,
                                     u_long64 value)

FUNCTION
          Updates the value of a usage record. If no usage record exists with the
          given name in usage_list, a new record is created.

INPUTS
          lList *usage_list - list containing the usage record to update
          const char *name  - name of the usage record to update
          u_long64 value    - the new value

NOTES
          MT-NOTE: usage_list_set_ulong_usage() is MT safe

SEE ALSO


38.40 userprj


38.40.1 prj_list_append_to_dstring

NAME
          prj_list_append_to_dstring() -- append prj from list to dstring

SYNOPSIS
          const char* prj_list_append_to_dstring(lList *lp, dstring *string)

FUNCTION
          Append all projects in list lp to dstring string.

INPUTS
          lList *lp        - PR_Type list
          dstring *string  - dstring to append to

RESULT
          const char* - NULL or resulting string of dstring


38.40.2 prj_list_locate

NAME
          prj_list_locate() -- Find project in list

SYNOPSIS
          lListElem* prj_list_locate(lList *lp, const char *name)

FUNCTION
          Find project in list.

INPUTS
          lList *lp        - PR_Type list
          const char *name - project name

RESULT
          lListElem* - NULL or element pointer


38.40.3 user_list_locate

NAME
          user_list_locate() -- Find user in list

SYNOPSIS
          lListElem* user_list_locate(lList *lp, const char *name)

FUNCTION
          Find user in list.

INPUTS
          lList *lp        - UU_Type list
          const char *name - user name

RESULT
          lListElem* - NULL or element pointer


38.41 userset


38.41.1 userset_get_type_string

NAME
          userset_get_type_string() -- get readable type definition

SYNOPSIS
          const char*
          userset_get_type_string(const lListElem *userset, lList **answer_list,
                                dstring *buffer)

FUNCTION
          Returns a readable string of the userset type bitfield.

INPUTS
          const lListElem *userset - the userset containing the requested
                                     information
          dstring *buffer          - string buffer to hold the result string

RESULT
          const char* - resulting string

SEE ALSO


38.41.2 userset_is_deadline_user

NAME
          userset_is_deadline_user() -- may user submit deadline jobs.

SYNOPSIS
          bool userset_is_deadline_user(lList *lp, const char *username)

FUNCTION
          Ask whether a given user is allowed to sumbit deadline jobs.

INPUTS
          lList *lp            - US_Type
          const char *username - user name

RESULT
          bool - result


38.41.3 userset_list_locate

NAME
          userset_list_locate() -- Find user in list

SYNOPSIS
          lListElem* userset_list_locate(lList *lp, const char *name)

FUNCTION
          Find user in list.

INPUTS
          lList *lp        - US_Type list
          const char *name - name

RESULT
          lListElem* - NULL or element pointer


38.41.4 userset_list_validate_acl_list

NAME
          userset_list_validate_acl_list() -- validate an acl list

SYNOPSIS
          int
          userset_list_validate_acl_list(lList *acl_list, lList **alpp)

FUNCTION
          Checks if all entries of an acl list (e.g. user list of a pe)
          are contained in the master userset list.

INPUTS
          lList *acl_list       - the acl list to check
          lList **alpp          - answer list pointer

RESULT
          int - STATUS_OK, if everything is OK


38.41.5 userset_set_type_string

NAME
          userset_set_type_string() -- set userset type from string

SYNOPSIS
          bool
          userset_set_type_string(lListElem *userset, lList **answer_list,
                                const char *value)

FUNCTION
          Takes a string representation for the userset type,

INPUTS
          lListElem *userset    - the userset to change
          lList **answer_list - errors will be reported here
          const char *value   - new value for userset type

RESULT
          bool - true on success,
                 false on error, error message will be in answer_list

SEE ALSO


38.41.6 userset_validate_entries

NAME
          userset_validate_entries() -- verify entries of a user set

SYNOPSIS
          int userset_validate_entries(lListElem *userset, lList **alpp,
                                       int start_up)

FUNCTION
          Validates all entries of a userset.

INPUTS
          lListElem *userset - the userset to check
          lList **alpp       - answer list pointer, if answer is expected.
                               In any case, errors are output using the
                               ERROR macro.
          int start_up       - are we in the qmaster startup phase?

RESULT
          int - STATUS_OK, if everything is OK


38.42 var


38.42.1 –VA_Type

NAME
          VA_Type - CULL variable element

ELEMENTS
          SGE_STRING(VA_variable)
             name of variable
          
          SGE_STRING(VA_value)
             value of variable

FUNCTION
          CULL element holding a variable/value pair (variable[=value])

SEE ALSO


38.42.2 -VariableList

NAME
          VariableList - Object to store variable name/value pairs

FUNCTION
          In several places within SGE/EE it is necessary to store
          variables and their values (e.g. job environment variable,
          job context, ...) of following form:
          
             variable[=value][,variable[=value],...]
          
          The VA_Type CULL element is used to hold such data.
          Funktions in the SEE ALSO section might be used to
          work with VA_Type lists and elements.

SEE ALSO


38.42.3 var_get_sharedlib_path_name

NAME
          var_get_sharedlib_path_name -- name of sharedlib path variable

SYNOPSIS
          static const char *var_get_sharedlib_path_name(void);

FUNCTION
          Returns the operating dependent name of the shared library path
          (e.g. LIBPATH, SHLIB_PATH, LD_LIBRARY_PATH).
          If the name of the sharedlib path is not known for an operating
          system (the port has not yet been done), a compile time error
          is raised.

RESULT
          Name of the shared lib path variable

NOTES
          Raising a compile time error (instead of e.g. just returning NULL
          or LD_LIBRARY_PATH as default) has the following reason:
          Setting the shared lib path is a very sensible operation
          concerning security.
          Example: If a shared linked rshd (called for qrsh execution) is
          executed with a faked shared lib path, operations defined in
          a non sge library libgdi.so might be executed as user root.


38.42.4 var_list_add_as_set

NAME
          var_list_add_as_set() -- Concatenate two lists as sets

SYNOPSIS
          int var_list_add_as_set(lList *lp0, lList *lp1)

FUNCTION
          Concatenate two lists of equal type throwing away the second list.
          Elements in the second list will replace elements with the same key in the
          the first list.  If the first list contains duplicate element keys, only
          the first element with a given key will be replaced by an element from the
          second list with the same key.

INPUTS
          lList *lp0 - first list
          lList *lp1 - second list

RESULT
          int - error state
              0 - OK
             -1 - Error


38.42.5 var_list_copy_env_vars_and_value

NAME
          var_list_copy_env_vars_and_value() -- Copy env. vars

SYNOPSIS
          void
          var_list_copy_env_vars_and_value(lList **varl,
                                           const lList *src_varl,
                                           const char *ignore_prefix)

FUNCTION
          Copy all variables from "src_varl" into "varl". Ignore
          all variables beginning with "ignore_prefix".

INPUTS
          lList **varl              - VA_Type list
          const lList *src_varl     - source VA_Type list
          const char *ignore_prefix - prefix

RESULT
          void - none


38.42.6 var_list_copy_prefix_vars

NAME
          var_list_copy_prefix_vars() -- copy vars with certain prefix

SYNOPSIS
          void var_list_copy_prefix_vars(lList **varl,
                                         const lList *src_varl,
                                         const char *prefix,
                                         const char *new_prefix)

FUNCTION
          Make a copy of all entries in "src_varl"
          beginning with "prefix". "prefix" is replaced by "new_prefix"
          for all created elements. The new elements will be added to
          "varl".

INPUTS
          lList **varl           - VA_Type list
          const char *prefix     - prefix string (e.g. VAR_PREFIX)
          const char *new_prefix - new prefix string (e.g. "SGE_")

EXAMPLE
          "__SGE_PREFIX__O_HOME" ===> "SGE_O_HOME

SEE ALSO


38.42.7 var_list_copy_prefix_vars_undef

NAME
          var_list_copy_prefix_vars_undef() -- copy vars with certain prefix

SYNOPSIS
          void
          var_list_copy_prefix_vars_undef(lList **varl,
                                          const lList *src_varl,
                                          const char *prefix,
                                          const char *new_prefix)

FUNCTION
          Make a copy of all entries in "src_varl"
          beginning with "prefix". "prefix" is replaced by "new_prefix"
          for all created elements. The new elements will be added to
          "varl" if it is undefined in "varl".

INPUTS
          lList **varl           - VA_Type list
          const char *prefix     - prefix string (e.g. VAR_PREFIX_NR)
          const char *new_prefix - new prefix string (e.g. "SGE_")

EXAMPLE
          "__SGE_PREFIX2__TASK_ID" ===> "SGE_TASK_ID

SEE ALSO


38.42.8 var_list_delete_string

NAME
          var_list_delete_string -- delete a variable

SYNOPSIS
          void var_list_delete_string(lList **varl,
                                      const char *name);

FUNCTION
          Deletes the variable <name> from the list <varl> if it exists.

INPUTS
          lList **varl      - VA_Type list
          const char *name  - the name of the variable

SEE ALSO


38.42.9 var_list_dump_to_file

NAME
          var_list_dump_to_file -- dump variables from list to file

SYNOPSIS
          void var_list_dump_to_file(const lList *varl, FILE *file);

FUNCTION
          Parses the list of type VA_Type <varl> containing the
          description of variables.
          Dumps all list elements to <file> in the format:
          <name>=<value>
          <name> is read from VA_variable, <value> from VA_value.
          Any backslashes and newlines in <value> are backslash-escaped
          so that values may be printed on one line with un-escaping on read.

INPUTS
          varl - list of variables
          file - filehandle of a previously opened (for writing) file


38.42.10 var_list_get_string

NAME
          var_list_get_string() -- get value of certain variable

SYNOPSIS
          const char* var_list_get_string(lList *varl,
                                          const char *variable)

FUNCTION
          Return the string value of a variable
          with the name "variable" which is stored in "varl".

INPUTS
          lList *varl          - VA_Type list
          const char *variable - variable name

RESULT
          const char* - value or NULL

SEE ALSO


38.42.11 var_list_remove_prefix_vars

NAME
          var_list_remove_prefix_vars() -- remove vars with certain prefix

SYNOPSIS
          void var_list_remove_prefix_vars(lList **varl,
                                           const char *prefix)

FUNCTION
          Remove all entries from "varl" where the name
          begins with "prefix"

INPUTS
          lList **varl       - VA_Type list
          const char *prefix - prefix string (e.g. VAR_PREFIX)

SEE ALSO


38.42.12 var_list_set_int

NAME
          var_list_set_int -- add/change an variable

SYNOPSIS
          void var_list_set_int(lList *varl,
                                const char *name,
                                int value);

FUNCTION
          If the variable <name> does not already exist in <varl>,
          it is created and initialized with <value>.
          Otherwise, its value is overwritten with <value>

INPUTS
          varl  - VA_Type list
          name  - the name of the variable
          value - the (new) value of the variable

SEE ALSO


38.42.13 var_list_set_sge_u32

NAME
          var_list_set_sge_u32 -- add/change a variable

SYNOPSIS
          void var_list_set_sge_u32(lList **varl,
                                const char *name,
                                u_long32 value);

FUNCTION
          If the variable <name> does not already exist in <varl>,
          it is created and initialized with <value>.
          Otherwise, its value is overwritten with <value>

INPUTS
          lList **varl      - VA_Type list
          const char *name  - the name of the variable
          u_long32 value    - the (new) value of the variable

SEE ALSO


38.42.14 var_list_set_sharedlib_path

NAME
          var_list_set_sharedlib_path -- set shared lib path

SYNOPSIS
          void var_list_set_sharedlib_path(lList **varl);

FUNCTION
          Sets or replaces the shared lib path in the list of variables.
          The SGE shared lib path is always set to the beginning of the
          resulting shared lib path
          (security, see var_get_sharedlib_path_name())

INPUTS
          lList **varl - list of environment variables

SEE ALSO


38.42.15 var_list_set_string

NAME
          var_list_set_string -- add/change an variable

SYNOPSIS
          void var_list_set_string(lList **varl,
                                   const char *name,
                                   const char *value);

FUNCTION
          If the variable <name> does not already exist in <varl>,
          it is created and initialized with <value>.
          Otherwise, its value is overwritten with <value>

INPUTS
          lList **varl      - VA_Type list
          const char *name  - the name of the variable
          const char *value - the (new) value of the variable

SEE ALSO


38.42.16 var_list_split_prefix_vars

NAME
          var_list_split_prefix_vars() -- split a list of variables

SYNOPSIS
          void var_list_split_prefix_vars(lList **varl,
                                          lList **pefix_vars,
                                          const char *prefix)

FUNCTION
          Move all variable elements form "varl" to "pefix_vars" which
          begin with "prefix". *pefix_vars will be created if is does not
          exist.

INPUTS
          lList **varl        - VA_Type list
          lList **pefix_vars - pointer to VA_Type list
          const char *prefix - string (e.g. VAR_PREFIX)

RESULT
          void - None

SEE ALSO


39 spool


39.1 –LDR_Type

NAME
          LDR_Type -- is a high level structure to monitor changes
                      in consumables, which are used as load threasholds.

ELEMENTS
          SGE_REF(LDR_global,CULL_ANY_SUBTYPE, CULL_DEFAULT)
            Reference to a global cunsumable object
          
          SGE_REF(LDR_host,CULL_ANY_SUBTYPE, CULL_DEFAULT)
            Reference to a host consumable object
          
          SGE_REF(LDR_queue,CULL_ANY_SUBTYPE, CULL_DEFAULT)
            Reference to a queue consumable object
          
          SGE_LIST(LDR_queue_ref_list, QR_Type, CULL_DEFAULT)
            A list of queues instances, which are using all these
            consumables as load thresholds.

FUNCTION
          All three consumables form a kind of queue_consumable_category.
          All queues which are listed in here are using the same consumables
          to compute the load alarm. The whole list is using references because
          it is easier to monitor changes in one of the consumable objects and
          the function calculation the load alarm for each queue knows exactly
          which queues need to be recalculated.
          

IMPORTANT
          This list a fixed position list. Do not use what filtering on the
          elements or the code will break!


39.2 –QR_Type

NAME
          QR_Type -- sub list of queue references

ELEMENTS
          SGE_REF(QR_Queue,CULL_ANY_SUBTYPE, CULL_DEFAULT
             References a queue instance object

FUNCTION
          Lists all queue instance objects in the same
          queue_consumable_category


39.3 –SPC_Type

NAME
          SPC_Type -- Spooling context

ELEMENTS
          SGE_STRING(SPC_name, CULL_HASH | CULL_UNIQUE)
             Unique name of the spooling context
          
          SGE_LIST(SPC_rules, SPR_Type, CULL_DEFAULT)
             List of spooling rules
          
          SGE_LIST(SPC_types, SPT_Type, CULL_DEFAULT)
             List of spoolable object types with references to
             rules.

FUNCTION
          A spooling context describes the way how objects
          are spooled (read and written).
          
          A spooling context contains one or multiple rules for
          spooling. A rule can for example describe a database
          connection.
          
          It also contains a list of types that can be spooled.
          A default entry for all types can be created; if type entries
          for individual types exist, these entries will be used for spooling.
          A type references one or multiple rules which will
          be executed for writing or deleting data.
          Exactly one rule can be defined to be the default rule
          for reading objects.
          
          +----------+       1:n       +----------+
          | SPC_Type |----------------<| SPT_Type |
          +----------+                 +----------+
               |                             |
               |                             |
               |                             |
               | 1                           |
               | :                           |
               | n                           |
               |                             |
               ^                             |
          +----------+   1:n, one is default |
          | SPR_Type |>----------------------+
          +----------+
          

SEE ALSO


39.4 –SPR_Type

NAME
          SPR_Type -- Spooling rule

ELEMENTS
          SGE_STRING(SPR_name, CULL_HASH | CULL_UNIQUE)
             Unique name of the rule.
          
          SGE_STRING(SPR_url, CULL_DEFAULT)
             An url, e.g. a spool directory, a database url etc.
          
          SGE_REF(SPR_option_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             function pointer to a function to set any database specific options,
             e.g. whether to do database recovery at startup or not.
          
          SGE_REF(SPR_startup_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             function pointer to a startup function,
             e.g. establishing a connection to a database.
          
          SGE_REF(SPR_shutdown_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             function pointer to a shutdown function,
             e.g. disconnecting from a database or closing file handles.
          
          SGE_REF(SPR_maintenance_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             function pointer to a maintenance function for
                - creating the database tables / directories in case of
                  filebased spooling
                - switching between spooling with/without history
                - backup
                - cleaning up / compressing database
                - etc.
          
          SGE_REF(SPR_trigger_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             function pointer to a trigger function.
             A trigger function is used to trigger regular actions, e.g.
             checkpointing and cleaning the transaction log in case of the
             Berkeley DB or vacuuming in case of PostgreSQL.
          
          SGE_REF(SPR_transaction_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             function pointer to a function beginning and ending transactions.
          
          SGE_REF(SPR_list_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             pointer to a function reading complete lists (master lists)
             from the spooling data source.
          
          SGE_REF(SPR_read_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             pointer to a function reading a single object from the
             spooling data source.
          
          SGE_REF(SPR_write_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             pointer to a function writing a single object.
          
          SGE_REF(SPR_delete_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             pointer to a function deleting a single object.
          
          SGE_REF(SPR_validate_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             pointer to a function validating a single object.
          
          SGE_REF(SPR_validate_list_func, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             pointer to a function validating a list of objects.
          
          SGE_REF(SPR_clientdata, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             clientdata; any pointer, can be used to store and
             reference rule specific data, e.g. file or database handles.

FUNCTION
          A spooling rule describes a certain way to store and retrieve
          data from a defined storage facility.
          
          Spooling rules can implement spooling to files in a certain
          directory or spooling into a database, to an LDAP repository
          etc.
          
          A spooling context can contain multiple spooling rules.

SEE ALSO


39.5 –SPTR_Type

NAME
          SPTR_Type -- references to rules for certain object types

ELEMENTS
          SGE_BOOL(SPTR_default, CULL_DEFAULT)
             Defines whether the referenced rule is the default rule
             for reading the defined object type.
          
          SGE_STRING(SPTR_rule_name, CULL_UNIQUE)
             Name of the referenced rule.
          
          SGE_REF(SPTR_rule, CULL_ANY_SUBTYPE, CULL_DEFAULT)
             Pointer/reference to the rule to be used with the
             defined object type.
          

FUNCTION
          Elements of SPTR_Type define a mapping between object type (SPT_Type)
          and spooling rules (SPR_Type).
          One object type can be spooled (written) using multiple spooling rules.
          One object type will be read using one (the default) spooling rule.
          One spooling rule can be referenced by multiple object types.

SEE ALSO


39.6 –SPT_Type

NAME
          SPT_Type -- Spooling object types

ELEMENTS
          SGE_ULONG(SPT_type, CULL_HASH | CULL_UNIQUE)
             Unique type identifier.
             See enum sge_object_type in libs/gdi/sge_mirror.h
             SGE_TYPE_ALL describes a default type entry for all
             object types.
          
          SGE_STRING(SPT_name, CULL_DEFAULT)
             Name of the type - used for informational messages etc.
          
          SGE_LIST(SPT_rules, SPTR_Type, CULL_DEFAULT)
             List of rules that can be applied for a certain object type.
             Does not reference the rules themselves, but contains mapping
             objects mapping between type and rule.
          

FUNCTION
          Objects to be spooled have a certain type that can be identified
          by the sge_object_type enum.
          A spooling context can contain information about individual
          types and/or define a default behaviour for all (not individually
          handled) types.
          
          The spooling behaviour for a type is defined by a list of references
          to rules in the spooling context.
          One of the referenced spooling rules has to be made default rule
          for reading objects.

NOTES
          The type identifiers should not come from the mirroring interface,
          but be part of a more general type information handling in libgdi.

SEE ALSO


40 src


40.1 sge_generic_ckpt

NAME
          sge_generic_ckpt -- build up a generic ckpt object

SYNOPSIS
          lListElem* sge_generic_ckpt(
             char *ckpt_name
          );

FUNCTION
          build up a generic ckpt object

INPUTS
          ckpt_name - name used for the CK_name attribute of the generic
                    pe object. If NULL then "template" is the default name.

RESULT
          !NULL - Pointer to a new CULL object of type CK_Type
          NULL - Error


41 test_sge_calendar


41.1 main

NAME
          main() -- calendar test

SYNOPSIS
          int main(int argc, char* argv[])

FUNCTION
          calendar test

INPUTS
          int argc     - nr. of args
          char* argv[] - args

RESULT
          int -  nr of failed tests


Function Index

Table of Contents