public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Thomas Schwinge <thomas@codesourcery.com>, gcc-patches@gcc.gnu.org
Subject: Re: [committed] openmp: Add support for HBW or large capacity or interleaved memory through the libmemkind.so library
Date: Fri, 10 Jun 2022 21:23:29 +0200	[thread overview]
Message-ID: <YqOaMc8QwEyCWILg@tucnak> (raw)
In-Reply-To: <YqHgQGbKHOWI2tRP@tucnak>

On Thu, Jun 09, 2022 at 01:57:52PM +0200, Jakub Jelinek via Gcc-patches wrote:
> On Thu, Jun 09, 2022 at 12:11:28PM +0200, Thomas Schwinge wrote:
> > On 2022-06-09T10:19:03+0200, Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> > > This patch adds support for dlopening libmemkind.so
> > 
> > Instead of 'dlopen'ing literally 'libmemkind.so':
> > 
> > > --- libgomp/allocator.c.jj    2022-06-08 08:21:03.099446883 +0200
> > > +++ libgomp/allocator.c       2022-06-08 13:41:45.647133610 +0200
> > 
> > > +  void *handle = dlopen ("libmemkind.so", RTLD_LAZY);
> > 
> > ..., shouldn't this instead 'dlopen' 'libmemkind.so.0'?  At least for
> > Debian/Ubuntu, the latter ('libmemkind.so.0') is shipped in the "library"
> > package:
> 
> I agree and I've actually noticed it too right before committing, but I thought
> I'll investigate and tweak incrementally because "libmemkind.so"
> is what I've actually tested (it is what llvm libomp uses).

And here is what I've committed after bootstrapping/regtesting it on
x86_64-linux and i686-linux.

2022-06-10  Jakub Jelinek  <jakub@redhat.com>

	* allocator.c (gomp_init_memkind): Call dlopen with "libmemkind.so.0"
	rather than "libmemkind.so".

--- libgomp/allocator.c.jj	2022-06-09 10:14:33.470973961 +0200
+++ libgomp/allocator.c	2022-06-09 14:05:33.665803457 +0200
@@ -99,7 +99,7 @@ static pthread_once_t memkind_data_once
 static void
 gomp_init_memkind (void)
 {
-  void *handle = dlopen ("libmemkind.so", RTLD_LAZY);
+  void *handle = dlopen ("libmemkind.so.0", RTLD_LAZY);
   struct gomp_memkind_data *data;
   int i;
   static const char *kinds[] = {


	Jakub


  reply	other threads:[~2022-06-10 19:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09  8:19 Jakub Jelinek
2022-06-09 10:11 ` Thomas Schwinge
2022-06-09 11:57   ` Jakub Jelinek
2022-06-10 19:23     ` Jakub Jelinek [this message]
2022-06-09 17:07 ` Richard Sandiford
2022-06-09 17:48   ` Jakub Jelinek
2022-06-28 21:29 ` Andrew Stubbs
2022-06-29 10:45   ` Jakub Jelinek
2022-06-29 12:24     ` Andrew Stubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqOaMc8QwEyCWILg@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).