mirror of https://github.com/BOINC/boinc.git
- API: in boinc_exit(), release the lockfile only if
we're the main program (otherwise we didn't lock it in the first place, and a crash results). From Artyom Sharov. - scheduler: add support for the GCL simulator, which uses special versions of backend programs that use virtual time, and that wait for signals instead of sleep()ing. To compile: make clean configure CXXFLAGS="-DGCL_SIMULATOR" make svn path=/trunk/boinc/; revision=16038
This commit is contained in:
parent
0f8f9f3dab
commit
f17a800807
|
@ -444,12 +444,15 @@ int boinc_finish(int status) {
|
|||
// Win: called from the worker or timer thread.
|
||||
//
|
||||
// make static eventually
|
||||
//
|
||||
void boinc_exit(int status) {
|
||||
if (options.backwards_compatible_graphics) {
|
||||
graphics_cleanup();
|
||||
}
|
||||
|
||||
file_lock.unlock(LOCKFILE);
|
||||
if (options.main_program) {
|
||||
file_lock.unlock(LOCKFILE);
|
||||
}
|
||||
|
||||
fflush(NULL);
|
||||
|
||||
|
@ -461,7 +464,7 @@ void boinc_exit(int status) {
|
|||
//
|
||||
BOINCINFO("Exit Status: %d", status);
|
||||
#if defined(_WIN32)
|
||||
// Halts all the threads and then cleans up.
|
||||
// Halt all the threads and cleans up.
|
||||
TerminateProcess(GetCurrentProcess(), status);
|
||||
#elif defined(__APPLE_CC__)
|
||||
// stops endless exit()/atexit() loops.
|
||||
|
|
|
@ -7638,3 +7638,34 @@ David 22 Sept 2008
|
|||
update_profile_pages.php
|
||||
user/
|
||||
language_select.php
|
||||
|
||||
David 22 Sept 2008
|
||||
- API: in boinc_exit(), release the lockfile only if
|
||||
we're the main program (otherwise we didn't lock it in
|
||||
the first place, and a crash results). From Artyom Sharov.
|
||||
- scheduler: add support for the GCL simulator,
|
||||
which uses special versions of backend programs
|
||||
that use virtual time,
|
||||
and that wait for signals instead of sleep()ing.
|
||||
|
||||
To compile:
|
||||
make clean
|
||||
configure CXXFLAGS="-DGCL_SIMULATOR"
|
||||
make
|
||||
|
||||
api/
|
||||
boinc_api.C
|
||||
db/
|
||||
boinc_db.C,h
|
||||
lib/
|
||||
util.C,h
|
||||
sched/
|
||||
feeder.C
|
||||
hr_info.C
|
||||
pymw_assimilator.C
|
||||
sched_util.C,h
|
||||
transitioner.C
|
||||
trickle_handler.C
|
||||
validator.C
|
||||
tools/
|
||||
backend_lib.C
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#endif
|
||||
|
||||
#include "str_util.h"
|
||||
#include "util.h"
|
||||
#include "error_numbers.h"
|
||||
#include "boinc_db.h"
|
||||
|
||||
|
@ -921,7 +922,7 @@ void DB_CREDIT_MULTIPLIER::db_print(char* buf) {
|
|||
"time=%d, "
|
||||
"multiplier=%f ",
|
||||
appid,
|
||||
time,
|
||||
_time,
|
||||
multiplier
|
||||
);
|
||||
}
|
||||
|
@ -931,7 +932,7 @@ void DB_CREDIT_MULTIPLIER::db_parse(MYSQL_ROW& r) {
|
|||
clear();
|
||||
id = atoi(r[i++]);
|
||||
appid = atoi(r[i++]);
|
||||
time = atoi(r[i++]);
|
||||
_time = atoi(r[i++]);
|
||||
multiplier = atof(r[i++]);
|
||||
}
|
||||
|
||||
|
@ -943,7 +944,7 @@ void DB_CREDIT_MULTIPLIER::get_nearest(int _appid, int t) {
|
|||
// set default values.
|
||||
clear();
|
||||
multiplier = 1;
|
||||
time = ::time(NULL);
|
||||
_time = time(0);
|
||||
appid = _appid;
|
||||
|
||||
snprintf(query,MAX_QUERY_LEN,
|
||||
|
|
|
@ -566,7 +566,7 @@ struct TRANSITIONER_ITEM {
|
|||
struct CREDIT_MULTIPLIER {
|
||||
int id;
|
||||
int appid;
|
||||
int time;
|
||||
int _time;
|
||||
double multiplier;
|
||||
|
||||
void clear();
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?
|
||||
|
||||
$project_news = array(
|
||||
array("September 20, 2008",
|
||||
"Welcome back to <a href=http://docking.cis.udel.edu/>Docking@Home</a>,
|
||||
a project at the University of Delaware that studies
|
||||
protein-ligand interactions (and BOINC itself)."
|
||||
),
|
||||
array("September 15, 2008",
|
||||
"<a href=http://forja.unex.es/projects/ogm>OGM (Organizational Grid Manager)</a>
|
||||
has been released by the University of Extremadura.
|
||||
|
|
|
@ -3,6 +3,14 @@
|
|||
$biomed = array(
|
||||
"Biology and Medicine",
|
||||
array(
|
||||
array(
|
||||
"Docking@Home",
|
||||
"http://docking.cis.udel.edu/",
|
||||
"University of Delaware",
|
||||
"Study of protein - ligand interactions",
|
||||
"Docking@Home has both bioscience and computer science goals. The project aims to further knowledge of the atomic details of protein-ligand interactions and, by doing so, will search for insights into the discovery of novel pharmaceuticals.",
|
||||
"docking.png"
|
||||
),
|
||||
array(
|
||||
"GPU Grid - PS3 Grid",
|
||||
"http://www.ps3grid.net/",
|
||||
|
@ -194,14 +202,14 @@ $math = array(
|
|||
"Find all the generalized binary number systems (in which bases are matrices and digits are vectors) up to dimension 11.",
|
||||
"szdg1_small.jpg"
|
||||
),
|
||||
array(
|
||||
"Riesel Sieve",
|
||||
"http://boinc.rieselsieve.com/",
|
||||
"Riesel Sieve community",
|
||||
"Mathematics",
|
||||
"Find prime numbers of the form k*2<sup>n</sup>-1",
|
||||
""
|
||||
),
|
||||
// array(
|
||||
// "Riesel Sieve",
|
||||
// "http://boinc.rieselsieve.com/",
|
||||
// "Riesel Sieve community",
|
||||
// "Mathematics",
|
||||
// "Find prime numbers of the form k*2<sup>n</sup>-1",
|
||||
// ""
|
||||
// ),
|
||||
array(
|
||||
"Rectilinear Crossing Number",
|
||||
"http://dist.ist.tugraz.at/cape5/",
|
||||
|
|
|
@ -62,9 +62,16 @@ using std::vector;
|
|||
#define EPOCHFILETIME_SEC (11644473600.)
|
||||
#define TEN_MILLION 10000000.
|
||||
|
||||
#ifdef GCL_SIMULATOR
|
||||
double simtime;
|
||||
#endif
|
||||
|
||||
// return time of day (seconds since 1970) as a double
|
||||
//
|
||||
double dtime() {
|
||||
#ifdef GCL_SIMULATOR
|
||||
return simtime;
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
LARGE_INTEGER time;
|
||||
FILETIME sysTime;
|
||||
|
@ -81,6 +88,7 @@ double dtime() {
|
|||
gettimeofday(&tv, 0);
|
||||
return tv.tv_sec + (tv.tv_usec/1.e6);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
// return time today 0:00 in seconds since 1970 as a double
|
||||
|
|
|
@ -93,4 +93,10 @@ extern bool process_exists(int);
|
|||
#endif
|
||||
|
||||
extern int wait_client_mutex(const char* dir, double timeout);
|
||||
|
||||
#ifdef GCL_SIMULATOR
|
||||
extern double simtime;
|
||||
#define time(x) ((int)simtime)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "common_defs.h"
|
||||
#include "filesys.h"
|
||||
#include "sched_util.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "backend_lib.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue