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

Add g_slurmctld_jobacct_fini() to insure no memory leaks.

parent 4967e16e
No related branches found
No related tags found
No related merge requests found
This file describes changes in recent versions of SLURM. It primarily This file describes changes in recent versions of SLURM. It primarily
documents those changes that are of interest to users and admins. documents those changes that are of interest to users and admins.
* Changes in SLURM 0.5.0-pre18
==============================
-- elan switch plugin memory leak plugged
-- added g_slurmctld_jobacct_fini() to release all memory (useful
to confirm no memory leaks)
* Changes in SLURM 0.5.0-pre17 * Changes in SLURM 0.5.0-pre17
============================== ==============================
-- slurmd calls the proctrack destroy function at job step completion -- slurmd calls the proctrack destroy function at job step completion
......
...@@ -210,6 +210,14 @@ g_slurmctld_jobacct_init(char *job_acct_loc, char *job_acct_parameters) ...@@ -210,6 +210,14 @@ g_slurmctld_jobacct_init(char *job_acct_loc, char *job_acct_parameters)
return retval; return retval;
} }
extern int
g_slurmctld_jobacct_fini(void)
{
if ( g_context )
return _slurm_jobacct_context_destroy(g_context);
return SLURM_SUCCESS;
}
extern int extern int
g_slurmctld_jobacct_job_complete(struct job_record *job_ptr) g_slurmctld_jobacct_job_complete(struct job_record *job_ptr)
{ {
...@@ -323,9 +331,10 @@ g_slurmd_jobacct_task_exit(slurmd_job_t *job, pid_t pid, int status, ...@@ -323,9 +331,10 @@ g_slurmd_jobacct_task_exit(slurmd_job_t *job, pid_t pid, int status,
{ {
int retval = SLURM_SUCCESS; int retval = SLURM_SUCCESS;
if ( g_context ) if ( g_context ) {
retval = (*(g_context->ops.slurmd_jobacct_task_exit))(job, pid, status, rusage); retval = (*(g_context->ops.slurmd_jobacct_task_exit))
else { (job, pid, status, rusage);
} else {
error ("slurm_jobacct plugin context not initialized"); error ("slurm_jobacct plugin context not initialized");
retval = ENOENT; retval = ENOENT;
} }
......
...@@ -61,6 +61,8 @@ extern int g_slurm_jobacct_process_message(struct slurm_msg *msg); ...@@ -61,6 +61,8 @@ extern int g_slurm_jobacct_process_message(struct slurm_msg *msg);
extern int g_slurmctld_jobacct_init(char *job_acct_loc, extern int g_slurmctld_jobacct_init(char *job_acct_loc,
char *job_acct_parameters); char *job_acct_parameters);
extern int g_slurmctld_jobacct_fini(void);
extern int g_slurmctld_jobacct_job_complete(struct job_record *job_ptr); extern int g_slurmctld_jobacct_job_complete(struct job_record *job_ptr);
extern int g_slurmctld_jobacct_job_start(struct job_record *job_ptr); extern int g_slurmctld_jobacct_job_start(struct job_record *job_ptr);
......
/*****************************************************************************\ /*****************************************************************************\
* controller.c - main control machine daemon for slurm * controller.c - main control machine daemon for slurm
* $Id$
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 The Regents of the University of California. * Copyright (C) 2002 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
...@@ -348,6 +349,7 @@ int main(int argc, char *argv[]) ...@@ -348,6 +349,7 @@ int main(int argc, char *argv[])
/* Plugins are needed to purge job/node data structures, /* Plugins are needed to purge job/node data structures,
* unplug after other data structures are purged */ * unplug after other data structures are purged */
g_slurmctld_jobacct_fini();
g_slurm_jobcomp_fini(); g_slurm_jobcomp_fini();
slurm_sched_fini(); slurm_sched_fini();
slurm_select_fini(); slurm_select_fini();
......
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