Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org starting 2 March 2020 at approximately 8am MST. It is expected to take around 10 minutes and will include a short period of downtime towards the end of the maintenance window. Please direct any comments, concerns, or questions to computing-help@igwn.org.

Commit 35992485 authored by John Douglas Veitch's avatar John Douglas Veitch

Add execution timing to LALInferenceNest

parent f841bf3f
......@@ -172,9 +172,9 @@ static int ReadNSCheckPointH5(char *filename, LALInferenceRunState *runState, NS
XLALH5DatasetFree(outputGroup);
}
double execution_time = 0.0;
if ( ( execution_time = XLALH5FileQueryScalarAttributeValue(&execution_time, group, "cpu_time") ) )
if ( ( execution_time = XLALH5FileQueryScalarAttributeValue(&execution_time, group, "execution_time") ) )
{
LALInferenceAddVariable(runState->algorithmParams, "cpu_time", &execution_time, LALINFERENCE_REAL8_t, LALINFERENCE_PARAM_OUTPUT);
LALInferenceAddVariable(runState->algorithmParams, "execution_time", &execution_time, LALINFERENCE_REAL8_t, LALINFERENCE_PARAM_OUTPUT);
}
XLALH5FileClose(group);
......@@ -795,7 +795,7 @@ void LALInferenceNestedSamplingAlgorithmInit(LALInferenceRunState *runState)
LALINFERENCE_PARAM_FIXED);
}
double zero=0.0;
LALInferenceAddVariable(runState->algorithmParams,"cpu_time",&zero,LALINFERENCE_REAL8_t, LALINFERENCE_PARAM_OUTPUT);
LALInferenceAddVariable(runState->algorithmParams,"execution_time",&zero,LALINFERENCE_REAL8_t, LALINFERENCE_PARAM_OUTPUT);
return;
......@@ -1206,7 +1206,7 @@ void LALInferenceNestedSamplingAlgorithm(LALInferenceRunState *runState)
struct tms tms_buffer;
if(times(&tms_buffer))
{
REAL8 execution_time = (REAL8)tms_buffer.tms_utime / (REAL8) sysconf (_SC_CLK_TCK) + LALInferenceGetREAL8Variable(runState->algorithmParams,"cpu_time");
REAL8 execution_time = (REAL8)tms_buffer.tms_utime / (REAL8) sysconf (_SC_CLK_TCK) + LALInferenceGetREAL8Variable(runState->algorithmParams,"execution_time");
XLALH5FileAddScalarAttribute(groupPtr, "cpu_time", &execution_time, LAL_D_TYPE_CODE);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment