From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA20292; Fri, 15 Jun 2001 19:10:49 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA20527 for ; Fri, 15 Jun 2001 19:10:48 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f5FHAk501701; Fri, 15 Jun 2001 19:10:46 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA19982; Fri, 15 Jun 2001 19:10:46 +0200 (MET DST) Date: Fri, 15 Jun 2001 19:10:46 +0200 From: Xavier Leroy To: Markus Mottl Cc: OCAML Subject: Re: [Caml-list] native threads not parallel? Message-ID: <20010615191046.A20258@pauillac.inria.fr> References: <20010615184931.A25835@miss.wu-wien.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20010615184931.A25835@miss.wu-wien.ac.at>; from mottl@miss.wu-wien.ac.at on Fri, Jun 15, 2001 at 06:49:32PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I am having problems using native threads (under Solaris; don't know > about other architectures): I can't get them to run in parallel on a > dual-processor machine even though I turn off the master lock on the > C-side around an external function that should execute in parallel. The default thread library under Solaris is odd in the sense that, by default, it doesn't take advantage of more than one processor. (More specifically, it creates only one "ligthweight process", i.e. kernel thread, unless more are required for I/O purposes.) Try to put the following incantation somewhere in your code: #include #include thr_setconcurrency(sysconf(_SC_NPROCESSORS_ONLN)); If that doesn't help, you might still want to look at how many LWPs (not user threads) are active in your program, using whatever tools Solaris provides for this purpose. - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr