[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Threads vs. OpenMP in PSPP.
From: |
John Darrington |
Subject: |
Re: Threads vs. OpenMP in PSPP. |
Date: |
Tue, 3 Apr 2007 16:12:59 +0800 |
User-agent: |
Mutt/1.5.9i |
On Mon, Apr 02, 2007 at 10:22:24PM -0700, Ben Pfaff wrote:
John Darrington <address@hidden> writes:
> Regardless of whether OpenMP or something else is used, any use of
> underlying libraries have to be thread safe ... and our libpspp and data
> libraries are currently not. They could be made safe with a few
> synchronisations --- but the API you use for synchronisation has to be
> available on all platforms...
I don't think that src/libpspp or src/data use much in the way of
static data, at least not anymore, so they would be sequentially
thread-safe or at least close to it.
They're certainly much better than they once were. But a quick look
shows:
$ nm -l src/ui/terminal/pspp | grep ' [abcdefg] ' | grep libpspp
08144c24 b charset src/libpspp/i18n.c:35
08144c40 b command_name src/libpspp/message.c:38
08144c28 b convertor src/libpspp/i18n.c:38
08144c30 b file_loc src/libpspp/msg-locator.c:28
08144c20 b locale src/libpspp/i18n.c:34
08144c48 b messages_disabled src/libpspp/message.c:44
08144c38 b mfile_loc src/libpspp/msg-locator.c:30
08144c44 b msg_handler src/libpspp/message.c:41
08144c34 b nfile_loc src/libpspp/msg-locator.c:30
08144c3c b serial src/libpspp/pool.c:124
08144c4c b s_stream src/libpspp/message.c:65
08144c5c b verbosity src/libpspp/verbose-msg.c:30
and
$ nm -l src/ui/terminal/pspp | grep ' [abcdefg] ' | grep
src/data
0813bc5c d algorithm src/data/settings.c:70
0813ba80 d all_casefiles src/data/casefile.c:58
0813cc00 b atoms src/data/value-labels.c:433
0813bc30 d blanks src/data/settings.c:48
0813ca1c b case_bytes src/data/fastfile.c:184
0813cbec b cmd_algorithm src/data/settings.c:69
0813bc50 d default_format src/data/settings.c:64
0813ca24 b default_handle src/data/file-handle-def.c:74
0813cbe2 b echo src/data/settings.c:35
0813bc49 d endcmd src/data/settings.c:60
0813bc24 d epoch src/data/settings.c:38
0813cbe3 b errorbreak src/data/settings.c:40
0813ca20 b file_handles src/data/file-handle-def.c:70
0813cbe8 b global_algorithm src/data/settings.c:68
0813bc20 d include src/data/settings.c:36
0813ca28 b inline_file src/data/file-handle-def.c:77
0813baa4 d input_float_format src/data/data-in.c:72
0813baa0 d input_integer_format src/data/data-in.c:69
0813cbe0 b long_view src/data/settings.c:31
0813bc41 d mprint src/data/settings.c:54
0813bc3c d mxerrs src/data/settings.c:51
0813bc44 d mxloops src/data/settings.c:56
0813bc38 d mxwarns src/data/settings.c:50
0813bc48 d nulline src/data/settings.c:58
0813bb64 d output_float_format src/data/data-out.c:72
0813bb60 d output_integer_format src/data/data-out.c:69
0813cb20 b pow_tab src/data/por-file-writer.c:481
0813bc40 d printback src/data/settings.c:53
0813bc29 d route_errors_to_listing src/data/settings.c:43
0813bc28 d route_errors_to_terminal src/data/settings.c:42
0813cbe1 b safer_mode src/data/settings.c:33
0813bc2a d scompress src/data/settings.c:45
0813ca60 b styles src/data/format.c:63
0813cbf0 b syntax src/data/settings.c:72
0813cbe4 b testing_mode src/data/settings.c:66
0813bc2b d undefined src/data/settings.c:47
0813bc18 d viewlength src/data/settings.c:29
0813bc1c d viewwidth src/data/settings.c:30
0813bc4c d workspace src/data/settings.c:62
This list won't include static variables with local scope.
It might be easier to adapt PSPP to a threaded design after my
branch is merged: there's a certain amount of copy-on-write and
reference counting functionality in this branch already, and it
is possible that it could be made thread-safe pretty simply.
I'll have to look it over.
I look forward to it.
Gnulib also contains a number of functions that aren't
thread-safe, some of which we are using now, I think. All of it
will need review.
There's also the readline and libiconv. Both of which are inherently
non thread safe.
Anyway I think at the moment multithreading is an interesting problem,
but not something that is a priority.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature