Skip to content
Snippets Groups Projects
Commit f0a0ef58 authored by Moe Jette's avatar Moe Jette
Browse files

Resync tests with API updates.

parent bcffeb18
No related branches found
No related tags found
No related merge requests found
......@@ -48,28 +48,25 @@ main (int argc, char *argv[])
slurm_init_job_desc_msg( &job_mesg );
job_mesg. contiguous = 1;
job_mesg. groups = ("students,employee\0");
job_mesg. name = ("job01\0");
job_mesg. partition_key = "1234";
job_mesg. min_procs = 4;
job_mesg. min_memory = 1024;
job_mesg. min_tmp_disk = 2034;
job_mesg. partition = "batch\0";
job_mesg. priority = 100;
job_mesg. req_nodes = "lx[3000-3003]\0";
job_mesg. shared = 0;
job_mesg. time_limit = 200;
job_mesg. num_procs = 1000;
job_mesg. num_nodes = 400;
job_mesg. num_nodes = 1;
job_mesg. user_id = 1500;
error_code = slurm_allocate_resources ( &job_mesg , &resp_msg , false );
if (error_code)
printf ("allocate error %d\n", errno);
else
else {
report_results(resp_msg);
slurm_free_resource_allocation_response_msg ( resp_msg );
slurm_free_resource_allocation_response_msg ( resp_msg );
}
for (job_count = 1 ; job_count <max_jobs; job_count++) {
slurm_init_job_desc_msg( &job_mesg );
......@@ -93,9 +90,10 @@ main (int argc, char *argv[])
printf ("allocate error %d\n", errno);
break;
}
else
else {
report_results(resp_msg);
slurm_free_resource_allocation_response_msg ( resp_msg );
slurm_free_resource_allocation_response_msg ( resp_msg );
}
}
for ( ; job_count <max_jobs; job_count++) {
......@@ -109,9 +107,10 @@ main (int argc, char *argv[])
printf ("allocate error %d\n", errno);
break;
}
else
else {
report_results(resp_msg);
slurm_free_resource_allocation_response_msg ( resp_msg );
slurm_free_resource_allocation_response_msg ( resp_msg );
}
}
for ( ; job_count <max_jobs; job_count++) {
......@@ -125,9 +124,10 @@ main (int argc, char *argv[])
printf ("allocate error %d\n", errno);
break;
}
else
else {
report_results(resp_msg);
slurm_free_resource_allocation_response_msg ( resp_msg );
slurm_free_resource_allocation_response_msg ( resp_msg );
}
}
return (0);
......
......@@ -13,7 +13,6 @@ main (int argc, char *argv[])
static time_t last_update_time = (time_t) NULL;
int error_code, i;
node_info_msg_t * node_info_msg_ptr = NULL;
node_info_t * node_ptr ;
error_code = slurm_load_node (last_update_time, &node_info_msg_ptr);
if (error_code) {
......@@ -21,9 +20,8 @@ main (int argc, char *argv[])
return (error_code);
}
printf("Nodes updated at %d, record count %d\n",
node_info_msg_ptr ->last_update, node_info_msg_ptr->record_count);
node_ptr = node_info_msg_ptr -> node_array ;
printf("Nodes updated at %ld, record count %d\n",
(long)node_info_msg_ptr ->last_update, node_info_msg_ptr->record_count);
for (i = 0; i < node_info_msg_ptr-> record_count; i++)
{
......@@ -31,7 +29,7 @@ main (int argc, char *argv[])
* last 1 entry, and every 200th entry */
if ((i < 10) || (i % 200 == 0) ||
((i + 1) == node_info_msg_ptr-> record_count)) {
slurm_print_node_table ( stdout, & node_ptr[i] ) ;
slurm_print_node_table ( stdout, & node_info_msg_ptr -> node_array[i] ) ;
}
else if ((i==10) || (i % 200 == 1))
printf ("skipping...\n");
......
......@@ -20,10 +20,10 @@ main (int argc, char *argv[])
return (error_code);
}
note("Updated at %lx, record count %d\n",
note("Updated at %ld, record count %d\n",
(time_t) part_info_ptr->last_update, part_info_ptr->record_count);
slurm_print_partition_info ( stdout, part_info_ptr );
slurm_free_partition_info (part_info_ptr);
slurm_print_partition_info_msg ( stdout, part_info_ptr );
slurm_free_partition_info_msg (part_info_ptr);
return (0);
}
......@@ -10,7 +10,7 @@
int
main (int argc, char *argv[])
{
/* int error_code, i, count;
int error_code, i, count;
job_desc_msg_t job_mesg;
submit_response_msg_t *resp_msg;
char *env[2];
......@@ -46,9 +46,10 @@ main (int argc, char *argv[])
printf ("submit error %d\n", errno);
return (error_code);
}
else
else {
printf ("job %u submitted\n", resp_msg->job_id);
slurm_free_submit_response_msg ( resp_msg );
slurm_free_submit_response_response_msg ( resp_msg );
}
if (argc > 1)
count = atoi (argv[1]);
......@@ -79,9 +80,9 @@ main (int argc, char *argv[])
}
else {
printf ("job %u submitted\n", resp_msg->job_id);
slurm_free_submit_response_response_msg ( resp_msg );
}
slurm_free_submit_response_msg ( resp_msg );
}
exit (error_code);
*/
}
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