diff --git a/dcapi/condor/tm.c b/dcapi/condor/tm.c index c43a467b3f..b61097284b 100644 --- a/dcapi/condor/tm.c +++ b/dcapi/condor/tm.c @@ -252,7 +252,7 @@ static void callbackResult(DC_Workunit *wu_result, DC_Result *result) if (testlevel != TEST_LOW_LVL) { - outfile = DC_getResultOutput(result, DC_RESULT_STDOUT); + outfile = DC_getResultOutput(result, DC_LABEL_STDOUT); if (!outfile) { printf("callbackResult: DC_getResultOutput returned with NULL for stdout. Exit application.\n"); diff --git a/dcapi/doc/common/dc-common-sections.txt b/dcapi/doc/common/dc-common-sections.txt index 680bd7df5e..13de6b2326 100644 --- a/dcapi/doc/common/dc-common-sections.txt +++ b/dcapi/doc/common/dc-common-sections.txt @@ -7,6 +7,9 @@ DC_ErrorCode DC_GridCapabilities DC_FileMode DC_CONFIG_FILE +DC_LABEL_STDOUT +DC_LABEL_STDERR +DC_LABEL_CLIENTLOG DC_getCfgStr DC_getCfgInt DC_log diff --git a/dcapi/doc/common/tmpl/dc_common.sgml b/dcapi/doc/common/tmpl/dc_common.sgml index f2b48a05f0..7829ea48b6 100644 --- a/dcapi/doc/common/tmpl/dc_common.sgml +++ b/dcapi/doc/common/tmpl/dc_common.sgml @@ -67,6 +67,27 @@ Default name of the DC-API configuration file. + + +Logical name of the client's standard output used with DC_getResultOutput(). + + + + + + +Logical name of the client's standard error used with DC_getResultOutput(). + + + + + + +Logical name of the client's ifrastructure log used with DC_getResultOutput(). + + + + Returns the value belonging to the specified key @name in the configuration file. diff --git a/dcapi/doc/master/dc-master-sections.txt b/dcapi/doc/master/dc-master-sections.txt index a9dfc0ee9b..abab4a35be 100644 --- a/dcapi/doc/master/dc-master-sections.txt +++ b/dcapi/doc/master/dc-master-sections.txt @@ -5,9 +5,6 @@ DC_WUState DC_EventType -DC_RESULT_STDOUT -DC_RESULT_STDERR -DC_RESULT_LOG DC_Workunit DC_Result DC_PhysicalFile @@ -47,6 +44,7 @@ DC_sendWUMessage DC_getClientCfgStr DC_getClientCfgInt +DC_getClientCfgDouble DC_getResultCapabilities diff --git a/dcapi/doc/master/tmpl/dc.sgml b/dcapi/doc/master/tmpl/dc.sgml index 55cccfdf5a..516e2958eb 100644 --- a/dcapi/doc/master/tmpl/dc.sgml +++ b/dcapi/doc/master/tmpl/dc.sgml @@ -41,27 +41,6 @@ Types of events the master application may receive. @DC_EVENT_SUBRESULT: a subresult has arrived. @DC_EVENT_MESSAGE: a message has arrived. - - -Logical name of the client's standard output used with DC_getResultOutput(). - - - - - - -Logical name of the client's standard error used with DC_getResultOutput(). - - - - - - -Logical name of the client's ifrastructure log used with DC_getResultOutput(). - - - - Opaque type representing a work unit. A work unit consists of an executable @@ -94,10 +73,10 @@ Describes an event received by the master application. @type: the type of the event. -@wu: +@wu: the work unit that generated the event. @result: the received #DC_Result if @type is %DC_EVENT_RESULT. @subresult: the received subresult if @type is %DC_EVENT_SUBRESULT. -@message: +@message: the received message if @type is %DC_EVENT_MESSAGE. @@ -475,6 +454,23 @@ file. Unit suffixes like 'KB', 'GB' or 'hour' are also allowed. config file. + + +Returns the double precision floating point value belonging to the specified +key @key for the specific client application @clientName in the configuration +file. Unit suffixes like 'KB', 'GB' or 'hour' are also allowed. + + +@clientName: the name of the client application. +@key: the key to look up. +@defaultValue: the default value to return if the key is not defined or its value + cannot be interpreted as a number. +@fallbackGlobal: if %TRUE and the key is not defined in the client configuration, + it will be looked up in the master configuration as well. +@Returns: the value belonging to the key or @defaultValue if it is not defined in the + config file. + + Determines what kind of information is present in the received result. diff --git a/dcapi/include/dc.h b/dcapi/include/dc.h index de2b9fa25e..d5d0d52e22 100644 --- a/dcapi/include/dc.h +++ b/dcapi/include/dc.h @@ -50,13 +50,6 @@ typedef enum { DC_EVENT_MESSAGE /* A message has arrived */ } DC_EventType; -/* Special result files, used by DC_getResultOutput() */ -#define DC_RESULT_STDOUT "__DC_STDOUT_" /* The client's standard - output */ -#define DC_RESULT_STDERR "__DC_STDERR_" /* The client's standard - error */ -#define DC_RESULT_LOG "__DC_LOG_" /* The system's log */ - /******************************************************************** * Data types diff --git a/dcapi/include/dc_common.h b/dcapi/include/dc_common.h index 4146359597..5373f9d12e 100644 --- a/dcapi/include/dc_common.h +++ b/dcapi/include/dc_common.h @@ -64,6 +64,11 @@ typedef enum { /* Default name of the configuration file */ #define DC_CONFIG_FILE "dc-api.conf" +/* Logical names for special files */ +#define DC_LABEL_STDOUT "dc_stdout.txt" +#define DC_LABEL_STDERR "dc_stderr.txt" +#define DC_LABEL_CLIENTLOG "dc_clientlog.txt" + /******************************************************************** * Function prototypes diff --git a/dcapi/local/result.c b/dcapi/local/result.c index bf4dc21572..36fd36d2e1 100644 --- a/dcapi/local/result.c +++ b/dcapi/local/result.c @@ -110,7 +110,7 @@ char *DC_getResultOutput(const DC_Result *result, const char *logicalFileName) } } - if (!strcmp(logicalFileName, DC_RESULT_STDOUT)) + if (!strcmp(logicalFileName, DC_LABEL_STDOUT)) { char *tmp = g_strdup_printf("%s%c%s", result->wu->workdir, G_DIR_SEPARATOR, STDOUT_LABEL); physicalFileName = strdup(tmp); @@ -118,7 +118,7 @@ char *DC_getResultOutput(const DC_Result *result, const char *logicalFileName) return physicalFileName; } - if (!strcmp(logicalFileName, DC_RESULT_STDERR)) + if (!strcmp(logicalFileName, DC_LABEL_STDERR)) { char *tmp = g_strdup_printf("%s%c%s", result->wu->workdir, G_DIR_SEPARATOR, STDERR_LABEL); physicalFileName = strdup(tmp);