[eigen] tests taking forever when run with -j8 and OpenMP is enabled |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] tests taking forever when run with -j8 and OpenMP is enabled
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 3 Jul 2010 11:44:05 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=WLO3FLT/AVW3gfHGMr46lCJ/DY4H3VPd6OhxxXhfAaw=; b=QCnGq8/0Meovj810R4R1zZM34nYqfudlrFRyyC3eKUxQLBFju2f7yZp/uF+c47ARvY Lgj6Gt15jPR8tKkL0vOmTFrJPGJgkpArLfItrAcyJleBtnbXWCyX3HttYz4grWgc9doH TELX0OJhQ4VWEHk5MSjuQHUXu3AoOpuMnWSNw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=jlon0eHbwu7mPqIPEWVR4ZTl9oxJygtcBkRRs2g4zW82RsBqxBnBQT8sLDKDg9z2DI jxv3yeE5hvltIQmenNSBNDqG0lgomBe/5/uJ2pmBfmPpKmYTiqJnB8zLbyvwgpMzNGOW YLImdyQBQEczYZcoTuQDJMGJMYSVwxp3buKvA=
No, I'm not reporting about a bug here!
But I just stumbled across something interesting. With OpenMP enabled,
when I run
ctest -j8
that is, 8 tests run simultaneously, the tests using large matrix
product take above of 2 minutes each to complete.
When I run only 1 test at a time (which is the default for ctest),
they complete very quickly.
Of course the reason is that running 8 tests at a time on my 4-core
Core i7 is a recipe for making them fight for the CPU's cache memory.
This is an illustration that setting cache sizes is ultimately
something that only the user can do; the defaults we're using can only
rely on rather unsafe assumptions about competing processes.
Benoit