Skip to content
Snippets Groups Projects
Commit a846f080 authored by tewk's avatar tewk
Browse files

Fixed elan compile errors

parent a3f47485
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
* *
* Copyright (C) 2001-2002 Regents of the University of California * Copyright (C) 2001-2002 Regents of the University of California
*/ */
#include <sys/types.h>
#include <src/common/bitstring.h>
#ifndef _QSW_INCLUDED #ifndef _QSW_INCLUDED
#define _QSW_INCLUDED #define _QSW_INCLUDED
......
...@@ -86,7 +86,9 @@ enum part_shared { ...@@ -86,7 +86,9 @@ enum part_shared {
SHARED_YES, /* Nodes possible to share in partition */ SHARED_YES, /* Nodes possible to share in partition */
SHARED_FORCE /* Nodes always shares in partition */ SHARED_FORCE /* Nodes always shares in partition */
}; };
#ifdef HAVE_LIBELAN3
#include <src/common/qsw.h>
#endif
#include <src/common/macros.h> #include <src/common/macros.h>
#include <src/common/slurm_protocol_common.h> #include <src/common/slurm_protocol_common.h>
...@@ -371,7 +373,7 @@ typedef struct job_step_create_response_msg ...@@ -371,7 +373,7 @@ typedef struct job_step_create_response_msg
char* node_list; char* node_list;
slurm_job_credential_t* credentials; slurm_job_credential_t* credentials;
#ifdef HAVE_LIBELAN3 #ifdef HAVE_LIBELAN3
qsw_jobinfo_t qsw_job; /* Elan3 switch context, opaque data structure */ qsw_jobinfo_t qsw_job; /* Elan3 switch context, opaque data structure */
#endif #endif
} job_step_create_response_msg_t; } job_step_create_response_msg_t;
......
...@@ -537,7 +537,7 @@ int unpack_resource_allocation_and_run_response_msg ( resource_allocation_and_ru ...@@ -537,7 +537,7 @@ int unpack_resource_allocation_and_run_response_msg ( resource_allocation_and_ru
unpack_job_credential( &tmp_ptr->credentials, ( void ** ) buffer , length ) ; unpack_job_credential( &tmp_ptr->credentials, ( void ** ) buffer , length ) ;
#ifdef HAVE_LIBELAN3 #ifdef HAVE_LIBELAN3
/* put the elan3 stuff here */ /* put the elan3 stuff here */
slurm_qsw_unpack_jobinfo(& msg -> qsw_job , (void **) data, length ) ; slurm_qsw_unpack_jobinfo(& tmp_ptr -> qsw_job , (void **) buffer , length ) ;
#endif #endif
*msg = tmp_ptr ; *msg = tmp_ptr ;
...@@ -783,7 +783,7 @@ void slurm_qsw_pack_jobinfo(qsw_jobinfo_t j, void **data, int * len) ...@@ -783,7 +783,7 @@ void slurm_qsw_pack_jobinfo(qsw_jobinfo_t j, void **data, int * len)
if ( packlen > 0 ) if ( packlen > 0 )
{ {
*len -= packlen ; *len -= packlen ;
*data += packlen ; ((char *) *data) += packlen ;
} }
} }
...@@ -791,20 +791,21 @@ int slurm_qsw_unpack_jobinfo(qsw_jobinfo_t * j, void **data, int *len) ...@@ -791,20 +791,21 @@ int slurm_qsw_unpack_jobinfo(qsw_jobinfo_t * j, void **data, int *len)
{ {
int packlen ; int packlen ;
/* *j = xmalloc ( sizeof ( struct qsw_jobinfo ) ) ; */ /* *j = xmalloc ( sizeof ( struct qsw_jobinfo ) ) ; */
qsw_alloc_jobinfo( *j ) ; qsw_alloc_jobinfo( j ) ;
packlen = qsw_unpack_jobinfo ( *j , *data , * len ) ; packlen = qsw_unpack_jobinfo ( *j , *data , * len ) ;
if ( packlen > 0 ) if ( packlen > 0 )
{ {
*len -= packlen ; *len -= packlen ;
*data += packlen ; ((char *) *data) += packlen ;
} }
return 0 ; return 0 ;
} }
/* Need to explicitly advance pointer and index here */
/*
void pack_qsw_jobinfo( qsw_jobinfo *msg, void ** buffer , uint32_t * length ) void pack_qsw_jobinfo( qsw_jobinfo *msg, void ** buffer , uint32_t * length )
{ {
int len = qsw_pack_jobinfo ( msg , *buf_ptr, *buf_len); int len = qsw_pack_jobinfo ( msg , *buf_ptr, *buf_len);
if (len > 0) { /* Need to explicitly advance pointer and index here */ if (len > 0) {
*buffer = (void *) ((char *)*buf_ptr + len); *buffer = (void *) ((char *)*buf_ptr + len);
*length += len; *length += len;
} }
...@@ -819,11 +820,12 @@ void unpack_qsw_jobinfo( qsw_jobinfo ** msg, void ** buffer , uint32_t * length ...@@ -819,11 +820,12 @@ void unpack_qsw_jobinfo( qsw_jobinfo ** msg, void ** buffer , uint32_t * length
qsw_alloc_jobinfo( temp ) ; qsw_alloc_jobinfo( temp ) ;
len = qsw_unpack_jobinfo ( *msg, *buf_ptr, *buf_len); len = qsw_unpack_jobinfo ( *msg, *buf_ptr, *buf_len);
if (len > 0) { /* Need to explicitly advance pointer and index here */ if (len > 0) {
*buffer = (void *) ((char *)*buf_ptr - len); *buffer = (void *) ((char *)*buf_ptr - len);
*length -= len; *length -= len;
} }
} }
*/
#endif #endif
void pack_job_step_create_response_msg ( job_step_create_response_msg_t* msg , void ** buffer , uint32_t * length ) void pack_job_step_create_response_msg ( job_step_create_response_msg_t* msg , void ** buffer , uint32_t * length )
...@@ -856,7 +858,7 @@ int unpack_job_step_create_response_msg (job_step_create_response_msg_t** msg , ...@@ -856,7 +858,7 @@ int unpack_job_step_create_response_msg (job_step_create_response_msg_t** msg ,
*msg = tmp_ptr; *msg = tmp_ptr;
#ifdef HAVE_LIBELAN3 #ifdef HAVE_LIBELAN3
/* put the elan3 stuff here */ /* put the elan3 stuff here */
slurm_qsw_unpack_jobinfo(& msg -> qsw_job , (void **) data, length ) ; slurm_qsw_unpack_jobinfo(& tmp_ptr -> qsw_job , (void **) buffer , length ) ;
#endif #endif
return 0; return 0;
} }
...@@ -1409,7 +1411,7 @@ int unpack_launch_tasks_request_msg ( launch_tasks_request_msg_t ** msg_ptr , vo ...@@ -1409,7 +1411,7 @@ int unpack_launch_tasks_request_msg ( launch_tasks_request_msg_t ** msg_ptr , vo
unpack32_array ( & msg -> global_task_ids , & uint16_tmp , buffer , length ) ; unpack32_array ( & msg -> global_task_ids , & uint16_tmp , buffer , length ) ;
#ifdef HAVE_LIBELAN3 #ifdef HAVE_LIBELAN3
/* put the elan3 stuff here */ /* put the elan3 stuff here */
slurm_qsw_unpack_jobinfo(& msg -> qsw_job , (void **) data, length ) ; slurm_qsw_unpack_jobinfo(& msg -> qsw_job , (void **) buffer , length ) ;
#endif #endif
*msg_ptr = msg ; *msg_ptr = msg ;
return 0 ; return 0 ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment