change directory name
This commit is contained in:
parent
eb2e6166c0
commit
5fe90fefb4
|
@ -1,4 +1,5 @@
|
|||
package partition_info
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -lslurm
|
||||
#include<stdlib.h>
|
||||
|
@ -74,41 +75,42 @@ import "C"
|
|||
import "fmt"
|
||||
|
||||
type Partition_info struct {
|
||||
Allow_alloc_nodes string;
|
||||
Allow_accounts string;
|
||||
Allow_groups string;
|
||||
Allow_qos string;
|
||||
Alternate string;
|
||||
Billing_weights_str string;
|
||||
Cluster_name string;
|
||||
Cr_type uint16;
|
||||
Cpu_bind uint32;
|
||||
Def_mem_per_cpu uint64;
|
||||
Default_time uint32;
|
||||
Deny_accounts string;
|
||||
Deny_qos string;
|
||||
Flags uint16;
|
||||
Grace_time uint32;
|
||||
Job_defaults_str string;
|
||||
Max_cpus_per_node uint32;
|
||||
Max_mem_per_cpu uint64;
|
||||
Max_nodes uint32;
|
||||
Max_share uint16;
|
||||
Max_time uint32;
|
||||
Min_nodes uint32;
|
||||
Name string;
|
||||
Node_inx[] int32;
|
||||
Nodes string;
|
||||
Over_time_limit uint16;
|
||||
Preempt_mode uint16;
|
||||
Priority_job_factor uint16;
|
||||
Priority_tier uint16;
|
||||
Qos_char string;
|
||||
State_up uint16;
|
||||
Total_cpus uint32;
|
||||
Total_nodes uint32;
|
||||
Tres_fmt_str string;
|
||||
Allow_alloc_nodes string
|
||||
Allow_accounts string
|
||||
Allow_groups string
|
||||
Allow_qos string
|
||||
Alternate string
|
||||
Billing_weights_str string
|
||||
Cluster_name string
|
||||
Cr_type uint16
|
||||
Cpu_bind uint32
|
||||
Def_mem_per_cpu uint64
|
||||
Default_time uint32
|
||||
Deny_accounts string
|
||||
Deny_qos string
|
||||
Flags uint16
|
||||
Grace_time uint32
|
||||
Job_defaults_str string
|
||||
Max_cpus_per_node uint32
|
||||
Max_mem_per_cpu uint64
|
||||
Max_nodes uint32
|
||||
Max_share uint16
|
||||
Max_time uint32
|
||||
Min_nodes uint32
|
||||
Name string
|
||||
Node_inx []int32
|
||||
Nodes string
|
||||
Over_time_limit uint16
|
||||
Preempt_mode uint16
|
||||
Priority_job_factor uint16
|
||||
Priority_tier uint16
|
||||
Qos_char string
|
||||
State_up uint16
|
||||
Total_cpus uint32
|
||||
Total_nodes uint32
|
||||
Tres_fmt_str string
|
||||
}
|
||||
|
||||
func Partition_info_convert_c_to_go(c_struct *C.struct_partition_info) Partition_info {
|
||||
var go_struct Partition_info
|
||||
|
||||
|
@ -193,17 +195,18 @@ func Partition_info_convert_c_to_go(c_struct *C.struct_partition_info) Partition
|
|||
}
|
||||
|
||||
type Partition_info_msg struct {
|
||||
Last_update int64;
|
||||
Record_count uint32;
|
||||
Partition_list []Partition_info;
|
||||
Last_update int64
|
||||
Record_count uint32
|
||||
Partition_list []Partition_info
|
||||
}
|
||||
|
||||
func Get_partitions() Partition_info_msg {
|
||||
var go_partition_buffer Partition_info_msg
|
||||
c_partition_buffer := C.get_partition_info()
|
||||
if c_partition_buffer == nil {
|
||||
go_partition_buffer.Last_update = int64(0)
|
||||
go_partition_buffer.Record_count = uint32(0)
|
||||
return go_partition_buffer;
|
||||
return go_partition_buffer
|
||||
}
|
||||
go_partition_buffer.Last_update = int64(c_partition_buffer.last_update)
|
||||
go_partition_buffer.Record_count = uint32(c_partition_buffer.record_count)
|
||||
|
@ -213,7 +216,7 @@ func Get_partitions() Partition_info_msg {
|
|||
go_partition := Partition_info_convert_c_to_go(partition)
|
||||
go_partition_buffer.Partition_list[i] = go_partition
|
||||
}
|
||||
C.slurm_free_partition_info_msg (c_partition_buffer);
|
||||
C.slurm_free_partition_info_msg(c_partition_buffer)
|
||||
|
||||
return go_partition_buffer
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue