mirror of https://github.com/BOINC/boinc.git
Implementation of dc_local to Miskolc for the University.
Now the implementation level of the dc_local is the same as the boinc section. git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@338 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
b87ef14475
commit
c6114d38fc
|
@ -79,6 +79,16 @@ int DC_cancelWU (DC_Workunit wu)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int DC_suspendWU (DC_Workunit wu)
|
||||
{
|
||||
return dc_rm_suspendWU(wu);
|
||||
}
|
||||
|
||||
int DC_resubmitWU(DC_Workunit wu)
|
||||
{
|
||||
return dc_rm_resubmitWU(wu);
|
||||
}
|
||||
|
||||
int DC_destroyWU(DC_Workunit wu)
|
||||
{
|
||||
dc_rm_destroyWU(wu);
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <dc_client.h>
|
||||
|
||||
static time_t ckpt_start;
|
||||
static time_t ckpt_freq = 10; /* Checkpoint frequency in seconds */
|
||||
|
||||
int DC_init(void)
|
||||
{
|
||||
ckpt_start = time(NULL);
|
||||
return DC_OK;
|
||||
}
|
||||
|
||||
int DC_resolveFileName(DC_Filetype type, const char *requestedFileName, char *actualFileName, int maxlength)
|
||||
{
|
||||
snprintf(actualFileName, maxlength, requestedFileName);
|
||||
return DC_OK;
|
||||
}
|
||||
|
||||
int DC_sendResult(char **files, int nfiles)
|
||||
{
|
||||
// not implemented yet!!
|
||||
|
||||
return DC_OK;
|
||||
}
|
||||
|
||||
int DC_timeToCheckpoint(void)
|
||||
{
|
||||
time_t current;
|
||||
current = time(NULL);
|
||||
if (current - ckpt_start > ckpt_freq)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DC_checkpointMade(void)
|
||||
{
|
||||
ckpt_start = time(NULL);
|
||||
return DC_OK;
|
||||
}
|
||||
|
||||
int DC_continueWork(void)
|
||||
{
|
||||
// not implemented yet!!
|
||||
|
||||
return 1; // yes, continue work.
|
||||
}
|
||||
|
||||
int DC_fractionDone(double fraction)
|
||||
{
|
||||
return DC_OK;
|
||||
}
|
||||
|
||||
void DC_finish(int exitcode)
|
||||
{
|
||||
exit(exitcode);
|
||||
}
|
|
@ -205,6 +205,16 @@ int dc_rm_submitWU (DC_Workunit wu)
|
|||
return DC_OK;
|
||||
}
|
||||
|
||||
int dc_rm_suspendWU(DC_Workunit wu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dc_rm_resubmitWU(DC_Workunit wu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dc_rm_destroyWU(DC_Workunit wu)
|
||||
{
|
||||
int ndx = (int)wu;
|
||||
|
|
|
@ -17,6 +17,12 @@ int dc_rm_setInput(DC_Workunit wu, char * URL, char * localFileName);
|
|||
/** submit a wu */
|
||||
int dc_rm_submitWU(DC_Workunit wu);
|
||||
|
||||
/** suspend a wu */
|
||||
int dc_rm_suspendWU(DC_Workunit wu);
|
||||
|
||||
/** resubmit a wu */
|
||||
int dc_rm_resubmitWU(DC_Workunit wu);
|
||||
|
||||
/** free memory used by this wu */
|
||||
int dc_rm_destroyWU(DC_Workunit wu);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# Working directory
|
||||
#
|
||||
|
||||
WorkingDirectory = /home/pnorbert/DCAPI-LOCAL-TEST
|
||||
WorkingDirectory = .
|
||||
|
||||
#
|
||||
# Debugging level
|
||||
|
|
Loading…
Reference in New Issue