Danny! You're a genius!
It turned out that there were about 10 functions needing the extern
keyword before it would compile. I've attached patches for the four
files I had to modify in case anyone else runs into this issue down the
road.
Many thanks!
Tyler
On 05/12/2011 09:25 PM, Danny Auble wrote:
Tyler, have you tried putting 'extern' in front of the function declaration? I
know that fixed the issue in the priority plugin. It is a complete stab in the
dark, but it might work.
extern should probably be put in front of all those function declarations.
Let us know if that makes any difference.
Danny
On Thursday, May 12, 2011 05:43:41 PM Tyler Strickland wrote:
On 05/12/2011 04:25 PM, Jette, Moe wrote:
The function _slurm_destroy_association_shares_object() is declared,
although several header files are used in the path:
/g/g0/jette/slurm.chaos/src/common/slurm_protocol_defs.h included
from /g/g0/jette/slurm.chaos/src/common/checkpoint.h:47,
from /g/g0/jette/slurm.chaos/src/slurmctld/slurmctld.h:70
from /g/g0/jette/slurm.chaos/src/common/slurm_accounting_
from /g/g0/jette/slurm.chaos/src/common/assoc_mgr.h:48,
from /g/g0/jette/slurm.chaos/src/common/assoc_mgr.c:39:
Just out of curiosity, can anyone tell me why there has been a lot of
recent interest in SLURM on OSX? Are people building Mac clusters?
________________________________________
btw, is the function _slurm_destroy_association_shares_object() declared
in any header that gets included while building assoc_mgr.c? (might
help, however, the behaviour you're seeing here is still plain *wrong*
for gcc, prototype declared or not)
regards,
jaKa
As to why the use of OS X is increasing in general, I can't say, but in
my specific case I'm working for a group of biomedical researchers
(working with DNA sequencing) at a university who have an 8-unit xserve
cluster. From what I understand, several of the programs they use only
work on macs, so they tend to use it for much of their number crunching.
I've tried including the slurm_protocol_defs.h header file straight into
assoc_mgr.c with the same result, so I've pretty much concluded it's a
compiler bug as well. Now if I could just figure out how to work around
it...
In the mean time I'm trying to see if cross-compiling SLURM on my linux
box might be a viable way of getting this working, but that's proving to
be no small challenge in and of itself - just getting the compiler to
compile is a hassle.
Thanks,
Tyler
--- slurm-2.2.5a/src/common/slurmdbd_defs.c 2011-04-28 17:13:11.000000000 -0400
+++ slurm-2.2.5/src/common/slurmdbd_defs.c 2011-05-12 21:44:01.000000000 -0400
@@ -2530,7 +2530,7 @@
}
}
-inline void slurmdbd_free_id_rc_msg(void *in)
+extern void slurmdbd_free_id_rc_msg(void *in)
{
dbd_id_rc_msg_t *msg = (dbd_id_rc_msg_t *)in;
xfree(msg);
--- slurm-2.2.5a/src/common/slurmdbd_defs.h 2011-04-28 17:22:54.000000000 -0400
+++ slurm-2.2.5/src/common/slurmdbd_defs.h 2011-05-12 21:44:17.000000000 -0400
@@ -444,7 +444,7 @@
inline void slurmdbd_free_fini_msg(dbd_fini_msg_t *msg);
inline void slurmdbd_free_job_complete_msg(dbd_job_comp_msg_t *msg);
inline void slurmdbd_free_job_start_msg(void *in);
-inline void slurmdbd_free_id_rc_msg(void *in);
+extern void slurmdbd_free_id_rc_msg(void *in);
inline void slurmdbd_free_job_suspend_msg(dbd_job_suspend_msg_t *msg);
inline void slurmdbd_free_list_msg(dbd_list_msg_t *msg);
inline void slurmdbd_free_modify_msg(dbd_modify_msg_t *msg,
--- slurm-2.2.5a/src/common/slurm_protocol_defs.c 2011-04-28 17:22:54.000000000 -0400
+++ slurm-2.2.5/src/common/slurm_protocol_defs.c 2011-05-12 21:49:08.000000000 -0400
@@ -2013,7 +2013,7 @@
xfree(msg);
}
-inline void slurm_destroy_association_shares_object(void *object)
+extern void slurm_destroy_association_shares_object(void *object)
{
association_shares_object_t *obj_ptr =
(association_shares_object_t *)object;
@@ -2046,7 +2046,7 @@
}
}
-inline void slurm_destroy_priority_factors_object(void *object)
+extern void slurm_destroy_priority_factors_object(void *object)
{
priority_factors_object_t *obj_ptr =
(priority_factors_object_t *)object;
--- slurm-2.2.5a/src/common/slurm_protocol_defs.h 2011-04-28 17:22:54.000000000 -0400
+++ slurm-2.2.5/src/common/slurm_protocol_defs.h 2011-05-12 21:48:56.000000000 -0400
@@ -949,10 +949,10 @@
inline void slurm_free_part_info_request_msg(part_info_request_msg_t *msg);
inline void slurm_free_resv_info_request_msg(resv_info_request_msg_t *msg);
inline void slurm_free_set_debug_level_msg(set_debug_level_msg_t *msg);
-inline void slurm_destroy_association_shares_object(void *object);
+extern void slurm_destroy_association_shares_object(void *object);
inline void slurm_free_shares_request_msg(shares_request_msg_t *msg);
inline void slurm_free_shares_response_msg(shares_response_msg_t *msg);
-inline void slurm_destroy_priority_factors_object(void *object);
+extern void slurm_destroy_priority_factors_object(void *object);
inline void slurm_free_priority_factors_request_msg(
priority_factors_request_msg_t *msg);
inline void slurm_free_priority_factors_response_msg(
@@ -1044,14 +1044,14 @@
void slurm_free_get_kvs_msg(kvs_get_msg_t *msg);
void slurm_free_will_run_response_msg(will_run_response_msg_t *msg);
void slurm_free_reserve_info_members(reserve_info_t * resv);
-void slurm_free_topo_info_msg(topo_info_response_msg_t *msg);
-inline void slurm_free_file_bcast_msg(file_bcast_msg_t *msg);
-inline void slurm_free_step_complete_msg(step_complete_msg_t *msg);
-inline void slurm_free_job_step_stat(void *object);
-inline void slurm_free_job_step_pids(void *object);
-void slurm_free_block_info_members(block_info_t *block_info);
-void slurm_free_block_info(block_info_t *block_info);
-void slurm_free_block_info_msg(block_info_msg_t *block_info_msg);
+extern void slurm_free_topo_info_msg(topo_info_response_msg_t *msg);
+extern void slurm_free_file_bcast_msg(file_bcast_msg_t *msg);
+extern void slurm_free_step_complete_msg(step_complete_msg_t *msg);
+extern void slurm_free_job_step_stat(void *object);
+extern void slurm_free_job_step_pids(void *object);
+extern void slurm_free_block_info_members(block_info_t *block_info);
+extern void slurm_free_block_info(block_info_t *block_info);
+extern void slurm_free_block_info_msg(block_info_msg_t *block_info_msg);
inline void slurm_free_block_info_request_msg(
block_info_request_msg_t *msg);
inline void slurm_free_job_notify_msg(job_notify_msg_t * msg);