rdkit icon indicating copy to clipboard operation
rdkit copied to clipboard

Add osx pthread_barrier so osx gets the LeadPicker optimizations

Open bp-kelley opened this issue 4 years ago • 8 comments

Adds a BSD-2 pthread_barrier from:

https://github.com/ademakov/DarwinPthreadBarrier.git

So osx can get the optimizations for the LeadPicker.

bp-kelley avatar Feb 25 '22 19:02 bp-kelley

@bp-kelley in most other parts of the RDKit we incorporate third-party code by having cmake grab the code at configure time. Is there a particular reason to add this directly instead of following that route (which would make staying on top of updates/bug fixes easier)?

greglandrum avatar Mar 01 '22 04:03 greglandrum

@greglandrum feels a bit overkill for two files, but if we decide to do this at configure time, should they be in RDGeneral or the SimPicker?

bp-kelley avatar Mar 01 '22 18:03 bp-kelley

@greglandrum feels a bit overkill for two files, but if we decide to do this at configure time, should they be in RDGeneral or the SimPicker?

I'm not insisting, so if you don't think it makes more sense this way we can definitely leave it as is. It'd be good to keep an eye on the parent repo and pull in bug fixes if/when any appear. I think this really belongs in External, but if it's going to land elsewhere then I guess RDGeneral?

greglandrum avatar Mar 02 '22 16:03 greglandrum

It's a good question. I'll try a version with External and see what it looks like.

bp-kelley avatar Mar 02 '22 20:03 bp-kelley

@greglandrum I've noticed that the CI isn't running here, any idea why?

bp-kelley avatar Mar 23 '22 17:03 bp-kelley

@greglandrum I've noticed that the CI isn't running here, any idea why?

It’s running now; might have been blocked behind a other run. We only get 10 (I think) executors, so it’s not that uncommon to have to wait for it to start

greglandrum avatar Mar 23 '22 17:03 greglandrum

Let me know if you want me to actually put this in external, it seemed silly to have a separate library for this functionality but I could make it work if we need to.

Also the external library isn't tagged in anyway, so I might need to fix the download to a commit if I can figure that one out.

bp-kelley avatar Mar 24 '22 13:03 bp-kelley

Let me know if you want me to actually put this in external, it seemed silly to have a separate library for this functionality but I could make it work if we need to.

Na, it's fine as is.

Also the external library isn't tagged in anyway, so I might need to fix the download to a commit if I can figure that one out.

Given what's been going on with "supply-chain attacks" on open-source code, I think we definitely should be locking to a particularly release (if available) or commit (otherwise) and checking the MD5.

Since I think you just need the .h file, can't you just use this direct URL? https://github.com/ademakov/DarwinPthreadBarrier/blob/dabcb1a7d45e9431c6d0b946e9cd4e18bb32107a/src/pthread_barrier.h

greglandrum avatar Mar 24 '22 14:03 greglandrum

@greglandrum I'll revisit this in a new PR.

bp-kelley avatar Feb 22 '23 16:02 bp-kelley