ExternalLibraris/pthreads does not provide CCTK_PTHREADS define

Create issue
Issue #1840 closed
Roland Haas created an issue

This means it is not a drop in replacement for the old mechanism and eg HTTPD complains at runtime with:

WARNING level 1 from host comet-ln3.sdsc.edu process 0
  while executing schedule bin HTTP_Startup, routine HTTPD::HTTP_StartServer
  in thorn HTTPD, file /home/rhaas/cactus/ET_trunk/arrangements/CactusConnect/HTTPD/src/Startup.c:97:
  -> Parameter 'HTTPD::use_pthreads' is set to "yes" but you didn't configure with PTHREADS. Setting will be ignored.

Keyword: pthreads

Comments (12)

  1. Roland Haas reporter
    • removed comment

    pthreads itself seems to still provide the define, yet the define is not visible to httpd since the thorn does not required the PTHREADS capability.

  2. Bruno Mundim
    • removed comment

    The same issue happens for Watchdog. I have just required pthreads there as a solution:


    Shouldn't this work here as well?

  3. Roland Haas reporter
    • removed comment

    Add the requirement (optional in the case of HTTPD) works, but that still does not make ExternalLibraries/pthreads a drop in replacement for the old PTHREADS setting since one has to do more than just change the option list and config options, one has to also change the client thorn.

  4. Frank Löffler
    • removed comment

    That is still ok for me. Roland: can you please test the patch for HTTPD, and if it works (requiring optionally pthreads) push both to master and ET_2015_11 ?

  5. Erik Schnetter
    • removed comment

    There shouldn't be any define with this name; this is now called CCTK_CAPABILITY_PTHREADS, and is set automatically. The old name exists only for backward compatibility.

  6. Roland Haas reporter
    • removed comment

    The old name exists only for backward compatibility. That is true. Yet the change required is small and we usually want ExternalLibraries to be as close to a drop in replacement to the old "external" interface as possible. This is the reason MPI for example provides such a define. So in order to keep backwards compatibility I would include the define.

    New ExternalLibraries won't do this of course, only ones that replace existing facilities.

  7. Roland Haas reporter
    • removed comment

    Replying to [comment:7 dradice@…]:

    As it is now, WatchDog will not even compile. Cherry-picking 9fc3e3d from master into ET_2015_11 would fix it.

    If WatchDog fails to compile, this is a bug and should be backported if possible. Though: which repository is 9fc3e3d in?

  8. David Radice
    • removed comment

    Sorry, I was not very clear before. I was asking to merge the patch that Bruno Mundim made for the WatchDog thorn also to the release branch of CactusUtils. It has been merged only into master. If I am not mistaken its hash should be 9fc3e3d. Also, apologies if this is not the right ticket, but I haven't found any other discussion related to that merge request on the bug tracker.

  9. Roland Haas reporter
    • changed status to resolved
    • removed comment

    I backported 9fc3e3d onto ET_2015_11_v0 of cactusutils in git hash 87fbb7a. I added the OPTIONAL dependency on pthreads to HTTPD in git hash 06887ce of cactusconnect and made HTTPD look for HAVE_CAPABILITY_PTHREADS in ed05d31.

  10. Log in to comment