|[eigen] OpenMP support in the default branch|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] OpenMP support in the default branch
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 5 Mar 2010 11:06:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=5BytnLROj7a5S4l1Qs+C7SW3uDMMa6v+/gaEF4n2Ee4=; b=YKoLThqib/witBV41xTKOvxcQLKPb2huMTOeO7FTie5J6DYVSNCUSDhfuH5opJ1RaQ UkbzIy4tc6OKfhU14s7NzqKgZxUHoktdFCJiPGz14+w0F2n0+vOZ7vH7vBfauHaQNn7c iW86y6Yc90/IKA1FUL1cw0t+pE47qiEl4VP24=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=BGUQO3k/AeqQrFuGLFQGXm9nUUrBvLGySzVMhOaJJtk6VXx3+KN0feyL5U4UrDHYWv Ipq8T4Syn+QDRJyveYm/l/V7AQkj/P6LymNqX1f9jg+pHQ5ftECqv7FSlbJ6SuJtYPf6 WF7Rs/tsCXliaS5au/+erVXsEjX4tpUR45IKY=
The SMP branch has been merged in the default one. Here is a short summary of what is new and how to use it:
- improved matrix products, even for non SMP code.
- to enable SMP support, simply enable openmp with your compiler (-fopenmp for gcc, -openmp for ICC, etc.)
- currently you can control it via the openmp API:
e.g., omp_set_num_threads(1) to disable it at runtime
In the future we should add our own API.
- to enable it in the unit tests there is a EIGEN_TEST_OPENMP option (currently only for gcc since I don't know what is the option for MSVC)
- only the general matrix-matrix product is parallelized, not the triangular or selfadjoint variants...
- ..but since partial pivoting LU is heavily based on general matrix-matrix products, solving large linear problems using PartialPivLu is already significantly boosted :) So I guess ~70% of use cases are already covered.
- if the user code is already parallelized using OpenMP, then eigen won't try to parallelize inside an openmp parallel session.
That's all for now.