whizard is hosted by Hepforge, IPPP Durham

Opened 14 years ago

Closed 12 years ago

#136 closed enhancement (fixed)

Refine dlopen wrapper

Reported by: Christian Speckner Owned by: Christian Speckner
Priority: P5 Milestone: v2.2.0
Component: core Version: 2.0.0beta
Severity: minor Keywords:
Cc:

Description

I think it would be useful if some more control over dlopen would be available. specifically RTLD_GLOBAL would be useful for external model libraries as it is not unreasonable for those to depend on the same code as parameter.xxx.f90. At the moment, the behavior is unspecified which defaults to RTLD_LOCAL at least on linux systems. E.g., in case of the Three-Site Model, this means that both the external library _and_ the O'Mega library have to include the actual model library, and as this code is localized, both have to initialize their own copy, which is somehow awkward and might produce weird results if the default would turn out to be RTLD_GLOBAL on some other system.

As a side note: currently 1 is used as dlopen flag: is this really portable? Even if it works on linux and OSX, it might be wiser to determine this in the configure phase.

Change History (14)

comment:1 Changed 14 years ago by Christian Speckner

Priority: P5P4
Type: enhancementdefect
After some investigation, it turns out that the default behavior already is different on OSX, as are the values of the different flags - on linux, 1 means(RTLD_LAZY
RTLD_LOCAL), while it is (RTLD_LAZY UNDEFINED) with UNDEFINED defaulting to RTLD_GLOBAL on OSX. I think this should definitely be done properly in order to avoid trouble, e.g. by compiling a small C program which writes a module source containing the proper values to stdout.

comment:2 Changed 14 years ago by Juergen Reuter

Version: 2.0rc12.0beta

comment:3 Changed 14 years ago by Juergen Reuter

Milestone: v2.1v2.0.2

comment:4 Changed 14 years ago by Juergen Reuter

Owner: changed from kilian to Christian Speckner

comment:5 Changed 14 years ago by Juergen Reuter

Milestone: v2.0.2v2.0.3

comment:6 Changed 14 years ago by Juergen Reuter

Milestone: v2.0.3v2.0.4

comment:7 Changed 14 years ago by Juergen Reuter

Milestone: v2.0.4v2.1

comment:8 Changed 12 years ago by Juergen Reuter

Type: defectenhancement

comment:9 Changed 12 years ago by Juergen Reuter

CS has implemented not the original scope of the ticket, but the functionality described here, in the NLO branch. After this branch has been merged back to the trunk (scheduled for mid-June) this ticket can be closed.

comment:10 Changed 12 years ago by Juergen Reuter

Milestone: v2.2.0v2.1.0

comment:11 Changed 12 years ago by Juergen Reuter

Priority: P4P5

comment:12 Changed 12 years ago by Juergen Reuter

Milestone: v2.1.0v2.2.0

comment:13 Changed 12 years ago by Juergen Reuter

Milestone: v2.2.0v2.1.2

All to be done is done in the NLO branch. As soon as this is merged back to the trunk, this ticket will definitely be closed.

comment:14 Changed 12 years ago by Juergen Reuter

Resolution: fixed
Status: newclosed

We merged. All that is needed, is now in the trunk. Closing.

Note: See TracTickets for help on using tickets.