~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to contribs/perlapi/libslurm-perl/Slurm.xs

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
        slurm_xfree((void **)&(__p), __FILE__, __LINE__, "")
21
21
extern void slurm_xfree(void **, const char *, int, const char *);
22
22
 
23
 
extern int slurm_hostlist_count(hostlist_t hl);
24
 
extern int slurm_hostlist_push(hostlist_t hl, const char *hosts);
25
 
extern int slurm_hostlist_push_host(hostlist_t hl, const char *host);
26
 
extern int slurm_hostlist_find(hostlist_t hl, const char *hostname);
27
 
extern size_t slurm_hostlist_ranged_string(hostlist_t hl, size_t n, char *buf);
28
 
extern void slurm_hostlist_uniq(hostlist_t hl);
29
 
 
30
23
struct slurm {
31
24
        node_info_msg_t *node_info_msg;
32
25
        partition_info_msg_t *part_info_msg;
675
668
                jobid, stepid
676
669
 
677
670
int
678
 
slurm_checkpoint_create(slurm_t self, U32 jobid, U32 stepid, U16 max_wait)
679
 
        C_ARGS:
680
 
                jobid, stepid, max_wait
681
 
 
682
 
int
683
 
slurm_checkpoint_vacate(slurm_t self, U32 jobid, U32 stepid, U16 max_wait)
684
 
        C_ARGS:
685
 
                jobid, stepid, max_wait
686
 
 
687
 
int
688
 
slurm_checkpoint_restart(slurm_t self, U32 jobid, U32 stepid)
689
 
        C_ARGS:
690
 
                jobid, stepid
 
671
slurm_checkpoint_create(slurm_t self, U32 jobid, U32 stepid, U16 max_wait, char* image_dir)
 
672
        C_ARGS:
 
673
                jobid, stepid, max_wait, image_dir
 
674
 
 
675
int
 
676
slurm_checkpoint_vacate(slurm_t self, U32 jobid, U32 stepid, U16 max_wait, char* image_dir)
 
677
        C_ARGS:
 
678
                jobid, stepid, max_wait, image_dir
 
679
 
 
680
int
 
681
slurm_checkpoint_restart(slurm_t self, U32 jobid, U32 stepid, U16 stick, char *image_dir)
 
682
        C_ARGS:
 
683
                jobid, stepid, stick, image_dir
691
684
 
692
685
int
693
686
slurm_checkpoint_complete(slurm_t self, U32 jobid, U32 stepid, time_t begin_time, U32 error_code, char* error_msg)
753
746
##################################################################
754
747
MODULE=Slurm PACKAGE=Slurm::Hostlist PREFIX=slurm_hostlist_
755
748
 
 
749
int
 
750
slurm_hostlist_count(hostlist_t hl = NULL)
 
751
        OUTPUT:
 
752
                RETVAL
 
753
        
756
754
hostlist_t
757
755
slurm_hostlist_create(char* hostlist)
758
756
 
759
757
int
760
 
slurm_hostlist_count(hostlist_t hl = NULL)
 
758
slurm_hostlist_find(hostlist_t hl = NULL, char* hostname)
761
759
        OUTPUT:
762
760
                RETVAL
763
 
        
 
761
 
764
762
int
765
763
slurm_hostlist_push(hostlist_t hl = NULL, char* hosts)
766
764
        OUTPUT:
771
769
        OUTPUT:
772
770
                RETVAL
773
771
 
774
 
int
775
 
slurm_hostlist_find(hostlist_t hl = NULL, char* hostname)
 
772
char*
 
773
slurm_hostlist_ranged_string(hostlist_t hl = NULL)
 
774
        PREINIT:
 
775
                size_t size = 1024;
 
776
                int rc = 0;
 
777
        CODE:
 
778
                Newz(0, RETVAL, size, char);
 
779
                while((rc = slurm_hostlist_ranged_string(hl, size, RETVAL)) == -1) {
 
780
                        size *= 2;
 
781
                        Renew(RETVAL, size, char);
 
782
                }
776
783
        OUTPUT:
777
784
                RETVAL
778
785
 
791
798
        OUTPUT:
792
799
                RETVAL
793
800
 
794
 
char*
795
 
slurm_hostlist_ranged_string(hostlist_t hl = NULL)
796
 
        PREINIT:
797
 
                size_t size = 1024;
798
 
                int rc = 0;
799
 
        CODE:
800
 
                Newz(0, RETVAL, size, char);
801
 
                while((rc = slurm_hostlist_ranged_string(hl, size, RETVAL)) == -1) {
802
 
                        size *= 2;
803
 
                        Renew(RETVAL, size, char);
804
 
                }
805
 
        OUTPUT:
806
 
                RETVAL
807
 
 
808
801
void
809
802
slurm_hostlist_uniq(hostlist_t hl = NULL)
810
803
        CODE:
1007
1000
                if(hv_to_slurm_step_launch_params(hv, &params) < 0) {
1008
1001
                        RETVAL = SLURM_ERROR;
1009
1002
                } else {
1010
 
                        char *dot_ptr, launcher_host[1024];
1011
 
                        gethostname(launcher_host, sizeof(launcher_host));
1012
 
                        dot_ptr = strchr(launcher_host, '.');
1013
 
                        if (dot_ptr)
1014
 
                                dot_ptr[0] = '\0';
1015
 
                        RETVAL = slurm_step_launch(ctx, launcher_host,
1016
 
                                                   &params, &callbacks);
 
1003
                        RETVAL = slurm_step_launch(ctx, &params, &callbacks);
1017
1004
                }
1018
1005
        OUTPUT:
1019
1006
                RETVAL