mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2370
This commit is contained in:
parent
117e836183
commit
d3dfa5771b
|
@ -53,6 +53,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -109,8 +109,8 @@ int boinc_init(bool standalone_ /* = false */) {
|
|||
if (!f) {
|
||||
if (standalone) {
|
||||
safe_strncpy(aid.app_preferences, "", sizeof(aid.app_preferences));
|
||||
safe_strncpy(aid.user_name, "John Smith", sizeof(aid.user_name));
|
||||
safe_strncpy(aid.team_name, "The A-Team", sizeof(aid.team_name));
|
||||
safe_strncpy(aid.user_name, "Unknown user", sizeof(aid.user_name));
|
||||
safe_strncpy(aid.team_name, "Unknown team", sizeof(aid.team_name));
|
||||
aid.wu_cpu_time = 1000;
|
||||
aid.user_total_credit = 1000;
|
||||
aid.user_expavg_credit = 500;
|
||||
|
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -6390,3 +6390,12 @@ David Sept 27 2003
|
|||
app.C
|
||||
lib/
|
||||
app_ipc.C,h
|
||||
|
||||
David Sept 27 2003
|
||||
- added a program "wu_check" that sees whether input files
|
||||
of unsent or in-progress results are actually on disk
|
||||
|
||||
sched/
|
||||
Makefile.am
|
||||
wu_check.C (new)
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# From configure.ac Revision: 1.45 .
|
||||
# From configure.ac Revision: 1.46 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.57 for BOINC 2.03.
|
||||
#
|
||||
|
|
|
@ -53,6 +53,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -313,9 +313,9 @@ struct WORKUNIT {
|
|||
void clear();
|
||||
};
|
||||
|
||||
// WARNING: be Very careful about changing any states, especially for a
|
||||
// project already running - these values are entered into the database and
|
||||
// must stay consistent.
|
||||
// WARNING: be Very careful about changing any values,
|
||||
// especially for a project already running -
|
||||
// the database will become inconsistent
|
||||
|
||||
#define RESULT_SERVER_STATE_INACTIVE 1
|
||||
#define RESULT_SERVER_STATE_UNSENT 2
|
||||
|
|
|
@ -29,7 +29,7 @@ struct CURSOR {
|
|||
|
||||
// represents a connection to a database
|
||||
//
|
||||
class DB_CONN{
|
||||
class DB_CONN {
|
||||
public:
|
||||
DB_CONN();
|
||||
int open(char* name, char* passwd);
|
||||
|
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -53,6 +53,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -5,7 +5,7 @@ include $(top_srcdir)/Makefile.incl
|
|||
noinst_PROGRAMS = \
|
||||
cgi feeder show_shmem file_upload_handler \
|
||||
validate_test validate_trivial make_work transitioner file_deleter \
|
||||
assimilator db_dump update_stats show_shmem
|
||||
assimilator db_dump update_stats show_shmem wu_check
|
||||
|
||||
noinst_LIBRARIES = libsched.a
|
||||
|
||||
|
@ -52,6 +52,9 @@ cgi_DEPEDENCIES = $(LIB_SCHED)
|
|||
feeder_SOURCES = feeder.C
|
||||
feeder_DEPENDENCIES = $(LIB_SCHED)
|
||||
|
||||
wu_check_SOURCES = wu_check.C
|
||||
wu_check_DEPENDENCIES = $(LIB_SCHED)
|
||||
|
||||
show_shmem_SOURCES = show_shmem.C
|
||||
show_shmem_DEPENDENCIES = $(LIB_SCHED)
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
@ -171,7 +172,7 @@ LIBRSA = $(top_builddir)/RSAEuro/source/librsaeuro.a
|
|||
noinst_PROGRAMS = \
|
||||
cgi feeder show_shmem file_upload_handler \
|
||||
validate_test validate_trivial make_work transitioner file_deleter \
|
||||
assimilator db_dump update_stats show_shmem
|
||||
assimilator db_dump update_stats show_shmem wu_check
|
||||
|
||||
|
||||
noinst_LIBRARIES = libsched.a
|
||||
|
@ -221,6 +222,9 @@ cgi_DEPEDENCIES = $(LIB_SCHED)
|
|||
feeder_SOURCES = feeder.C
|
||||
feeder_DEPENDENCIES = $(LIB_SCHED)
|
||||
|
||||
wu_check_SOURCES = wu_check.C
|
||||
wu_check_DEPENDENCIES = $(LIB_SCHED)
|
||||
|
||||
show_shmem_SOURCES = show_shmem.C
|
||||
show_shmem_DEPENDENCIES = $(LIB_SCHED)
|
||||
|
||||
|
@ -286,7 +290,7 @@ noinst_PROGRAMS = cgi$(EXEEXT) feeder$(EXEEXT) show_shmem$(EXEEXT) \
|
|||
validate_trivial$(EXEEXT) make_work$(EXEEXT) \
|
||||
transitioner$(EXEEXT) file_deleter$(EXEEXT) \
|
||||
assimilator$(EXEEXT) db_dump$(EXEEXT) update_stats$(EXEEXT) \
|
||||
show_shmem$(EXEEXT)
|
||||
show_shmem$(EXEEXT) wu_check$(EXEEXT)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
|
||||
am_assimilator_OBJECTS = assimilator.$(OBJEXT) \
|
||||
|
@ -343,6 +347,10 @@ am_validate_trivial_OBJECTS = validate.$(OBJEXT) \
|
|||
validate_trivial_OBJECTS = $(am_validate_trivial_OBJECTS)
|
||||
validate_trivial_LDADD = $(LDADD)
|
||||
validate_trivial_LDFLAGS =
|
||||
am_wu_check_OBJECTS = wu_check.$(OBJEXT)
|
||||
wu_check_OBJECTS = $(am_wu_check_OBJECTS)
|
||||
wu_check_LDADD = $(LDADD)
|
||||
wu_check_LDFLAGS =
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
|
||||
|
||||
|
@ -375,7 +383,8 @@ am__depfiles_maybe = depfiles
|
|||
@AMDEP_TRUE@ ./$(DEPDIR)/validate.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/validate_test.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/validate_trivial.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/validate_util.Po
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/validate_util.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/wu_check.Po
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
|
@ -391,9 +400,9 @@ DIST_SOURCES = $(libsched_a_SOURCES) $(assimilator_SOURCES) \
|
|||
$(file_upload_handler_SOURCES) $(make_work_SOURCES) \
|
||||
$(show_shmem_SOURCES) $(transitioner_SOURCES) \
|
||||
$(update_stats_SOURCES) $(validate_test_SOURCES) \
|
||||
$(validate_trivial_SOURCES)
|
||||
$(validate_trivial_SOURCES) $(wu_check_SOURCES)
|
||||
DIST_COMMON = $(top_srcdir)/Makefile.incl Makefile.am Makefile.in
|
||||
SOURCES = $(libsched_a_SOURCES) $(assimilator_SOURCES) $(cgi_SOURCES) $(db_dump_SOURCES) $(fcgi_SOURCES) $(feeder_SOURCES) $(file_deleter_SOURCES) $(file_upload_handler_SOURCES) $(make_work_SOURCES) $(show_shmem_SOURCES) $(transitioner_SOURCES) $(update_stats_SOURCES) $(validate_test_SOURCES) $(validate_trivial_SOURCES)
|
||||
SOURCES = $(libsched_a_SOURCES) $(assimilator_SOURCES) $(cgi_SOURCES) $(db_dump_SOURCES) $(fcgi_SOURCES) $(feeder_SOURCES) $(file_deleter_SOURCES) $(file_upload_handler_SOURCES) $(make_work_SOURCES) $(show_shmem_SOURCES) $(transitioner_SOURCES) $(update_stats_SOURCES) $(validate_test_SOURCES) $(validate_trivial_SOURCES) $(wu_check_SOURCES)
|
||||
|
||||
all: all-am
|
||||
|
||||
|
@ -471,6 +480,9 @@ validate_test$(EXEEXT): $(validate_test_OBJECTS) $(validate_test_DEPENDENCIES)
|
|||
validate_trivial$(EXEEXT): $(validate_trivial_OBJECTS) $(validate_trivial_DEPENDENCIES)
|
||||
@rm -f validate_trivial$(EXEEXT)
|
||||
$(CXXLINK) $(validate_trivial_LDFLAGS) $(validate_trivial_OBJECTS) $(validate_trivial_LDADD) $(LIBS)
|
||||
wu_check$(EXEEXT): $(wu_check_OBJECTS) $(wu_check_DEPENDENCIES)
|
||||
@rm -f wu_check$(EXEEXT)
|
||||
$(CXXLINK) $(wu_check_LDFLAGS) $(wu_check_OBJECTS) $(wu_check_LDADD) $(LIBS)
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
|
@ -533,6 +545,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/validate_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/validate_trivial.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/validate_util.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wu_check.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf ./$(DEPDIR)
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
// The contents of this file are subject to the BOINC Public License
|
||||
// Version 1.0 (the "License"); you may not use this file except in
|
||||
// compliance with the License. You may obtain a copy of the License at
|
||||
// http://boinc.berkeley.edu/license_1.0.txt
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS"
|
||||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing rights and limitations
|
||||
// under the License.
|
||||
//
|
||||
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
||||
//
|
||||
// The Initial Developer of the Original Code is the SETI@home project.
|
||||
// Portions created by the SETI@home project are Copyright (C) 2002
|
||||
// University of California at Berkeley. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
//
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "parse.h"
|
||||
#include "boinc_db.h"
|
||||
#include "sched_config.h"
|
||||
|
||||
// wu_checker
|
||||
// See whether input files that should be present, are
|
||||
|
||||
SCHED_CONFIG config;
|
||||
|
||||
// get the path a WU's input file
|
||||
//
|
||||
int get_file_path(WORKUNIT& wu, char* path) {
|
||||
char buf[256];
|
||||
bool flag;
|
||||
flag = parse_str(wu.xml_doc, "<name>", buf, sizeof(buf));
|
||||
if (!flag) return -1;
|
||||
sprintf(path, "%s/%s", config.upload_dir, buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void handle_result(DB_RESULT& result) {
|
||||
DB_WORKUNIT wu;
|
||||
int retval;
|
||||
char path[256];
|
||||
FILE* f;
|
||||
|
||||
retval = wu.lookup_id(result.workunitid);
|
||||
if (retval) {
|
||||
printf(
|
||||
"ERROR: can't find WU %d for result %d\n",
|
||||
result.workunitid, result.id
|
||||
);
|
||||
return;
|
||||
}
|
||||
get_file_path(wu, path);
|
||||
f = fopen(path, "r");
|
||||
if (f) {
|
||||
fclose(f);
|
||||
} else {
|
||||
printf("ERROR can't find file %s for result %d\n",
|
||||
path, result.id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
DB_RESULT result;
|
||||
char clause[256];
|
||||
|
||||
config.parse_file();
|
||||
|
||||
sprintf(clause, "where server_state=%d", RESULT_SERVER_STATE_UNSENT);
|
||||
while (!result.enumerate(clause)) {
|
||||
handle_result(result);
|
||||
}
|
||||
sprintf(clause, "where server_state=%d", RESULT_SERVER_STATE_IN_PROGRESS);
|
||||
while (!result.enumerate(clause)) {
|
||||
handle_result(result);
|
||||
}
|
||||
}
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -55,6 +55,7 @@ CLIENT_BIN_FILENAME = @CLIENT_BIN_FILENAME@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
Loading…
Reference in New Issue