Commit Graph

206 Commits

Author SHA1 Message Date
David Anderson a87d039f49 server: more 64-bit ID fixes
negative values are stored in app_version_id fields to represent
anonymous platform versions.
So need to use %ld rather than %lu for these fields.

Also there were a couple of more changes of int do DB_ID_TYPE
2015-07-29 17:32:57 -07:00
David Anderson 8cd8c8e7ee server software: handle 64-bit database IDs
The SETI@home result table is about to run out of 32-bit IDs,
so we need to move to 64-bit result IDs.
This will happen to the workunit table at some point too.

I changed the server C++ code to use the "long" type for all DB IDs
(and to use appropriate conversion codes like %lu).
"long" is 64 bit on 64-bit machines.
For uniformity I did this for all tables,
even ones (like app) that will never get big.

I chose NOT to change the DB schema for now.
The new code will work with 32-bit ID fields in the DB.
As projects approach the 32-bit limit on a table they can change
its ID field, and fields that reference this table, to BIGINT.
This is likely to happen only on the result and workunit tables.
I put functions in html/ops/db_update.php
to change the IDs of these tables.
2015-07-23 10:11:08 -07:00
David Anderson 9411118774 client: fix bug where GPU jobs non suspended
There was a bug where, when you suspend GPU activity,
GPU jobs show as suspended but are not actually suspended.
This was because of recent changes to distinguish GPU and non-GPU coprocs.
Change things so that coprocs are by default GPUs.
If you want to declare a non-GPU coproc in your cc_config.xml,
you much put <non_gpu/> in its <coproc> element.
2014-12-08 20:38:56 -08:00
David Anderson 526aff6e0d scheduler: fix msg typo.
Note: the "reliable" mechanism isn't yet implemented for
score-based scheduling, and it's not real clear how to do this.
2014-09-23 12:37:50 -07:00
David Anderson c2a0421074 scheduler: add support for miner_asic coprocessor type
I.e. treat miner ASICs as a distinct processor type;
send miner_asic jobs only if the client requests them.

Note: I was planning to do this in a more general way,
in which the scheduler wouldn't have a hard-wired list of processor types.
However, that would be a large code change,
so for now I just added miner_asic to the list of processor types
(nvidia, ati, intel_gpu),
and made various changes to get things to work.

Also: in the job dispatch logic, try to send coproc jobs
before CPU jobs.
That way if e.g. there's a limit on jobs in progress,
we'll preferentially send coproc jobs.
2014-09-21 21:08:09 -07:00
David Anderson 89b51ea43d scheduler: preliminary support for generic coprocessors
A "generic" coprocessor is one that's reported by the client,
but's not of a type that the scheduler knows about (NVIDIA, AMD, Intel).

With this commit the following works:
- On the client, define a <coproc> in your cc_config.xml
  with a custom name, say 'miner_asic'.
- define a plan class such as
  <plan_class>
    <name>foobar</name>
    <gpu_type>miner_asic</gpu_type>
    <cpu_frac>0.5</cpu_frac>
  <plan_class>
- App versions of this plan class will be sent only to hosts
  that report a coproc of type "miner_asic".
  The <app_version>s in the scheduler reply will include
  a <coproc> element with the given name and count=1.
  This will cause the client (at least the current client)
  to run only one of these jobs at a time,
  and to schedule the CPU appropriately.

Note: there's a lot missing from this;
- app version FLOPS will be those of a CPU app;
- jobs will be sent only if CPU work is requested
... and many other things.
Fixing these issues requires a significant re-architecture of the scheduler,
in particular getting rid of the PROC_TYPE_* constants
and the associated arrays,
which hard-wire the 3 fixed GPU types.
2014-07-25 12:40:35 -07:00
David Anderson 81faa12ff3 scheduler: make matchmaker scheduling the default
Remove <matchmaker> config option; add <sched_old> option.
2014-07-08 12:35:45 -07:00
David Anderson 2edfe0317d scheduler: don't send spurious "GPU needed" message 2014-07-04 09:42:28 -07:00
David Anderson 3c5edb1187 scheduler: send NCI jobs even if no work request 2014-06-28 08:47:25 -07:00
David Anderson 0b11b3f6e2 scheduler: don't send spurious "no tasks available" msgs w/ score scheduling 2014-06-16 16:53:49 -07:00
David Anderson 9829a5588a scheduler: msg tweak 2014-06-12 18:45:36 -07:00
David Anderson 7887e332d2 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2014-05-26 21:10:44 -07:00
David Anderson 52bd196c4f scheduler: fix bugs in sending non-compute-intensive jobs 2014-05-26 21:07:07 -07:00
Bernd Machenschalk 34c823a9ab Merge branch 'EinsteinAtHome' into 'master'
This is meant not to break anything, just add some
(optional) logging and features needed for Einstein@Home.
Please contact me before changing or removing any of this.

Conflicts:
	sched/db_dump.cpp
	sched/file_deleter.cpp
	sched/validator.cpp
2014-05-26 14:42:36 +02:00
Bernd Machenschalk 3fa00768ec scheduler:
fix disk space calculation and logging
2014-05-26 14:12:45 +02:00
Bernd Machenschalk e0e843a5a2 scheduler:
In 'mixed scheduling', save & reset 'insufficient' (resources) flags
    after calling the first scheduler, and after calling the second,
    recombine the resulting flags
2014-05-26 14:12:27 +02:00
Bernd Machenschalk 236dd40c6c scheduler:
log the estimated and max elapsed time of each result sent
    in human-readable format
2014-05-26 14:12:06 +02:00
Bernd Machenschalk c4369f16be scheduler:
indicate which 'locality condition' failed in the log message
2014-05-26 14:10:04 +02:00
David Anderson c2fd2b33e0 scheduler: fix bug that caused no jobs to be sent 2014-03-12 15:31:12 -07:00
David Anderson 9889ee8fb6 scheduler: enforce GPU job limits separately for each GPU type
Previously, if a project specified a limit on GPU jobs in progress,
it would be enforced across GPU types.
This could lead to starvation for hosts with multiple GPU types.
E.g. the limit is 10, and a host has 10 NVIDIA jobs and no AMD jobs.

Fix this by enforcing limits separately for each GPU type.
2014-03-08 11:17:16 -08:00
David Anderson 5381def663 server: use gpu_active_frac in scheduling decisions
On some hosts, gpu_active_frac may be much less than active_frac
(i.e., GPUs may be available much less than CPUs).
Use gpu_active_frac in the following places:

- scheduler: in estimating the elapsed time of jobs,
    to decide whether they can meet deadline
- scheduler: in computing the effective speed of a (host, app version),
    when deciding what size class it belongs to
- size_census: in computing effective speed of (host, app versions)

(Previously, we were just using active_frac in all these cases)
2014-03-06 21:23:02 -08:00
David Anderson 4b5a099f81 scheduler: create host_app_version records in NCI case 2014-02-04 15:58:01 -08:00
David Anderson d861862ca1 server: fix compile warnings and file descriptor leaks
Also, we were using memset() to zero WORK_REQ,
which contains several std::vector's.
This apparently works on Linux, but not in general.
2014-01-08 22:00:13 -08:00
David Anderson 5192fe2545 scheduler: assigned jobs should respect user app preferences 2013-10-06 21:23:28 -07:00
Eric J Korpela 244ba5bc85 SCHED: modified scheduled log output to use unsigned format for WU and RESULT
ids.  This allows IDs greater than 2^31 to be printed.
2013-06-19 10:15:08 -07:00
David Anderson 846b8c7757 all components: change strcpy() to strlcpy() when possible.
This commit should cover the client and manager code.
2013-06-03 20:24:48 -07:00
David Anderson 478900c321 - web/scheduler: add project preference for not getting Intel GPU jobs 2013-04-20 12:25:55 -07:00
David Anderson c9c9f2bae0 - scheduler: code shuffle; new file sched_check.cpp contains functions
that decide whether a job can be sent to a host
2013-04-09 12:19:00 -07:00
David Anderson 12319ca82b - scheduler: add code (commented out for now) for new implementation
of score-based scheduling.
2013-04-09 11:10:50 -07:00
David Anderson 7cdb3a7080 - web: add advisory text to "Export as Notice" balloon
- scheduler: make max # of CPUs a #define, default 4096
2013-03-04 17:24:18 +01:00
David Anderson 1174b00aba - client/manager: tweaks to Intel GPU code 2013-03-04 15:27:25 +01:00
David Anderson ca652519cf - scheduler: log message tweaks
- Some C++ files in client had execute permissions (??).  Clear them.
2013-03-01 16:26:08 +01:00
David Anderson 42756406f5 - example app: get the graphics app to build on Fedora Core 14
Note: this required installing various packages,
    and tweaking the Makefile in various ways,
    some of them FC14-specific ways
2013-03-01 16:23:13 +01:00
David Anderson b2f9e30570 - scheduler: fix bug that cause NCI to be sent even when
client is not requesting work
- client: parse the <vbox_window> option in cc_config.xml


svn path=/trunk/boinc/; revision=26127
2012-09-19 23:21:04 +00:00
David Anderson 6b81e2ffc3 - scheduler: fix sending of NCI jobs.
We were failing to mark the cache entries as free.
- API: initialize GPU device # to -1;
    If client doesn't give us a device number, something is wrong
    and it's better to not start computing.


svn path=/trunk/boinc/; revision=26079
2012-09-06 23:44:03 +00:00
David Anderson 11a6e85632 - scheduler: support for projects with some non-CPU-intensive apps
(but not all) wasn't finished.
    New logic: if the project has an NCI app then:
    - make a list of NCI apps for which the client doesn't have
        a job in progress.
    - try to send one job for each of these apps
    - do this even if no work is being requested.
    - don't send jobs for NCI apps by other mechanisms

NOTE: the client logic isn't quite right for mixed NCI projects.
    If there's no job for a given NCI app,
    the client should do a scheduler RPC.
    This isn't critical so we won't do this now.


svn path=/trunk/boinc/; revision=26068
2012-09-01 04:58:12 +00:00
David Anderson b1d1e21de4 - remote job submission: start writing a general-purpose
cmdline tool for remote job submission (not done)
- remote job submission: support the 4 file modes described
    in the documentation (not done)


svn path=/trunk/boinc/; revision=26067
2012-08-31 06:11:06 +00:00
David Anderson 6b7fb36056 - scheduler: msg tweaks
svn path=/trunk/boinc/; revision=26066
2012-08-29 18:08:15 +00:00
David Anderson 96b6e172f9 - scheduler: improved log messages for limited locality scheduling
svn path=/trunk/boinc/; revision=26065
2012-08-29 03:09:10 +00:00
David Anderson 9ccb8fa38d - scheduler: add support for limited locality scheduling
- API: remove support for PPM files


svn path=/trunk/boinc/; revision=26062
2012-08-27 17:00:43 +00:00
David Anderson 0483da30f4 - server: compile fix
- server: add nfiles_on_host(),
    a support function for "locality scheduling lite".


svn path=/trunk/boinc/; revision=26061
2012-08-26 21:24:18 +00:00
David Anderson 13b6aefbd7 - scheduler: fix message typo
svn path=/trunk/boinc/; revision=25985
2012-08-05 01:40:19 +00:00
David Anderson f8c1665722 - client: keep track of the fraction of time that
1) a network connection is available and
    2) network communication is allowed and
    3) CPU computation is allowed
- If an app version is marked as needs_network,
    use the above fraction in estimating its rate of progress
- replace "core client" with "client" in comments.
- scheduler: message tweaks


svn path=/trunk/boinc/; revision=25803
2012-06-26 20:30:56 +00:00
David Anderson 8c71f6d59a - scheduler: add support for Intel GPUs, and restructure things
to make it easier to add other GPU types in the future


svn path=/trunk/boinc/; revision=25792
2012-06-25 23:09:45 +00:00
David Anderson fd0983b991 - web: server status page should show elapsed time, not CPU time
svn path=/trunk/boinc/; revision=25785
2012-06-22 07:35:54 +00:00
David Anderson 0cc0370f02 - client, GUI RPC: detect and export the PCI bus, device, and domain #s.
- scheduler: increase #GPU limit from 8 to 64


svn path=/trunk/boinc/; revision=25761
2012-06-15 20:49:11 +00:00
David Anderson 6888468d6d - scheduler: call get_reliability_and_trust() and get_prefs_info()
in send_work_setup(), so that they run before lost jobs are resent.
    Otherwise lost jobs could get sent using an app version
    that's prohibited by prefs


svn path=/trunk/boinc/; revision=25604
2012-04-26 21:40:20 +00:00
Wenjing Wu ccad62b912 - wrapper: when reading fraction-done file, read the last line
(or at least the last double).
    This accommodates a particular application (LAMMPS)
    that can only append to this file.
- CAS@home stuff


svn path=/trunk/boinc/; revision=25557
2012-04-13 09:44:01 +00:00
David Anderson 759c23ed27 - server: create a harness for testing validator code.
If you link your functions (init_result(), compare_results(),
    cleanup_result()) with validate_test.cpp,
    you'll get a program that you can run as
        validate_test file1 file2
    and it will compare the two files
    (this works only for validators that expect 1 file per result).

    I added a makefile, sched/makefile_validator_test,
    that you can use for this.
- server: shuffle code so that the above doesn't need to
    link MySQL libraries
- client: if we fetch a master file and it contains no scheduler URLs,
    show a message of class INTERNAL_ERROR
- client/scheduler: make CUDA_DEVICE_PROP.totalGlobalMem a double,
    and remove dtotalGlobalMem.
    Although NVIDIA reports RAM size as a size_t,
    there's no reason to store it as an integer after that.


svn path=/trunk/boinc/; revision=25542
2012-04-10 00:32:35 +00:00
David Anderson c22ac04ad0 - scheduler: don't max with min_work_buffer() in estimating
job turnaround time.
    min_work_buffer doesn't necessarily reflect network disconnect periods
- client simulator: compile fixes


svn path=/trunk/boinc/; revision=25521
2012-03-30 21:39:22 +00:00