[petsc-dev] PetscDLSym()
Barry Smith
bsmith at mcs.anl.gov
Mon Apr 25 17:01:59 CDT 2011
Did I break something? Do you want to change it back to not be broken? I cannot see the line number below where the problem was detected.
Is it because PetscDLSym() returns an error if it doesn't find the symbol from
#if defined(PETSC_HAVE_DLERROR)
{ const char *e = dlerror();
if (e) SETERRQ2(PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG,"Error obtaining symbol '%s' from dynamic library:\n Error message from dlsym(): '%s'\n", symbol, e);
}
#endif /* !PETSC_HAVE_DLSYM */
This was commented out, I blindly uncommented it based on something Jed wrote. But it is fine with me if you delete this check.
Barry
On Apr 25, 2011, at 4:10 PM, Lisandro Dalcin wrote:
> PetscDLSym() is broken, at least for the generic use cases I
> originally had for it. See below: (this is tutorials/python/ex1 -info)
>
> [0] PetscDLLibraryOpen(): Opening dynamic library /usr/lib64/libpython2.6
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Invalid argument!
> [0]PETSC ERROR: Error obtaining symbol
> 'PetscDLLibraryRegister_python2.6' from dynamic library:
> Error message from dlsym(): '/usr/lib64/libpython2.6.so: undefined
> symbol: PetscDLLibraryRegister_python2.6'
>
> Moreover, I think the current behavior will break other parts as well.
> The caller is supposed to handle the missing symbols.
>
> Barry, do you want me to add an extra arg to PetscDLSym() to return to
> the caller the output from dlerror() ? That way the caller would have
> some extra info to display error, etc. Or a boolean flag to suppress
> errors?
>
> --
> Lisandro Dalcin
> ---------------
> CIMEC (INTEC/CONICET-UNL)
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> 3000 Santa Fe, Argentina
> Tel: +54-342-4511594 (ext 1011)
> Tel/Fax: +54-342-4511169
More information about the petsc-dev
mailing list