On Tue, Jul 22, 2008 at 03:07:06PM +0000, Niels Nes wrote:
> Update of /cvsroot/monetdb/MonetDB/src/gdk
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22418
>
> Modified Files:
> gdk_system.mx gdk_utils.mx
> Log Message:
> Switching from GDKcores to GDKnr_threads.
> As MTcheck_nr_cores() is to expensive on startup, so only use it
> when GDKnr_threads == 0.
> GDKnr_threads is set via the environment variable 'gdk_nr_threads'.
>
>
> U gdk_utils.mx
> Index: gdk_utils.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_utils.mx,v
> retrieving revision 1.211
> retrieving revision 1.212
> diff -u -d -r1.211 -r1.212
> --- gdk_utils.mx 19 Jul 2008 08:16:33 -0000 1.211
> +++ gdk_utils.mx 22 Jul 2008 15:07:01 -0000 1.212
> @@ -177,6 +177,21 @@
> }
>
> @h
> +gdk_export int GDKgetenv_int(const char *name, int def);
> +
> [EMAIL PROTECTED]
> +int
> +GDKgetenv_int(const char *name, int def)
> +{
> + char *val = GDKgetenv(name);
> +
> + if (val) {
> + int d = strtod(val, NULL);
^^^ ^
Niels,
should this be "atoi()" instead of "strtod()"?
The Microsoft compiler on Windows (IMHO correctly) warns about:
".\..\..\..\src\gdk\gdk_utils.mx(189) : warning C4244: 'initializing' :
conversion from 'double' to 'int', possible loss of data"
Stefan
> + return d;
> + }
> + return def;
> +}
> [EMAIL PROTECTED]
> gdk_export void GDKsetenv(str name, str value);
>
> @c
> @@ -1553,7 +1568,9 @@
> MT_create_thread(&t, GDKvmtrim, &GDK_mem_maxsize);
> }
> #endif
> - GDKcores = MT_check_nr_cores();
> + GDKnr_threads = GDKgetenv_int("gdk_nr_threads", 0);
> + if (GDKnr_threads == 0)
> + GDKnr_threads = MT_check_nr_cores();
> return 1;
> }
>
> @@ -1563,11 +1580,11 @@
> The buffer pool manager takes care of this.
> @h
> gdk_export int GDKstopped;
> -gdk_export int GDKcores;
> +gdk_export int GDKnr_threads;
>
> @c
> int GDKstopped = 1;
> -int GDKcores = 1;
> +int GDKnr_threads = 0;
>
> @h
> gdk_export void GDKexit(int status);
>
> U gdk_system.mx
> Index: gdk_system.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_system.mx,v
> retrieving revision 1.111
> retrieving revision 1.112
> diff -u -d -r1.111 -r1.112
> --- gdk_system.mx 19 Jul 2008 08:16:33 -0000 1.111
> +++ gdk_system.mx 22 Jul 2008 15:07:01 -0000 1.112
> @@ -521,7 +521,7 @@
> }
>
> #define SMP_TOLERANCE 0.40
> -#define SMP_ROUNDS 1024*1024*16
> +#define SMP_ROUNDS 1024*1024*128
>
> static void
> smp_thread(void *data)
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
--
| Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] |
| CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers