All of lore.kernel.org
 help / color / mirror / Atom feed
* libnuma: Problem with static library
@ 2011-11-11 10:35 Almaz Mirgasimov
  2011-12-14 20:37 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Almaz Mirgasimov @ 2011-11-11 10:35 UTC (permalink / raw)
  To: linux-numa

Hi all,

I have some problem when running my program statically linked with libnuma.
When I try to run it I get following error message

 request to allocate mask for invalid number; abort

I think the reason for such behavior is not initialized 'cpumask_sz',
because 'numa_init' was not called automatically.

To solve this problem I slightly patched numactl sources and called
'numa_init' in my program manually.
But is there any better way?

To link statically I passed '-Wl,-Bstatic -lnuma' to 'ld' linker.
My numactl version is 2.0.7

Best regards

Almaz Mirgasimov

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libnuma: Problem with static library
  2011-11-11 10:35 libnuma: Problem with static library Almaz Mirgasimov
@ 2011-12-14 20:37 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2011-12-14 20:37 UTC (permalink / raw)
  To: Almaz Mirgasimov; +Cc: linux-numa

Almaz Mirgasimov <mirgasimov.almaz@gmail.com> writes:

> I have some problem when running my program statically linked with libnuma.
> When I try to run it I get following error message
>
>  request to allocate mask for invalid number; abort
>
> I think the reason for such behavior is not initialized 'cpumask_sz',
> because 'numa_init' was not called automatically.
>
> To solve this problem I slightly patched numactl sources and called
> 'numa_init' in my program manually.
> But is there any better way?

That's a long standing regression from the 2.x changes.

Should be fixed with
http://permalink.gmane.org/gmane.linux.kernel.numa/688

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-14 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11 10:35 libnuma: Problem with static library Almaz Mirgasimov
2011-12-14 20:37 ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.