Dear Cctbx community, thank you very much for the great library, full of wonderful algorithms. I'm writing a structure searching engine in C++ to be used as a high throughput method to do energy landscape sampling with a view to finding new ground state crystal structures. Key requirements of this project are efficiency and ease of development & deployment. Cctbx has many useful algorithms and data structures that I would like to avoid having to re-code if possible. Thus I've downloaded and played with the source as it is but have found it difficult to integrate with my project (for understandably reasons given the goals of cctbx). My main goals regarding ease of development & deployment mean that it would be very inconvenient to distribute the entire cctbx with my code. Ideally I'd like to achieve the following: * strip out everything python related (apart from maybe the build system) * strip out all modules (namespaces) that are unused by my code leaving a fairly bare-bones C++ library that is quick and easy to build. Is anyone able to comment on how feasible this might be? Is this even worth attempting? Many thanks, -Martin -- Martin Uhrin Tel: +44 207 679 3466 Department of Physics & Astronomy Fax:+44 207 679 0595 University College London [email protected] Gower St, London, WC1E 6BT, U.K. http://www.cmmp.ucl.ac.uk
Hi Martin, * strip out everything python related (apart from maybe the build system)
* strip out all modules (namespaces) that are unused by my code
leaving a fairly bare-bones C++ library that is quick and easy to build.
We have the libtbx/configure.py --build-boost-python-extensions=False option. I just tried this on my Mac laptop (4 cores + hyper-threading, compiles with -j 8): python $sources/cctbx_project/libtbx/configure.py iotbx --build-boost-python-extensions=False make It finished in 100 seconds. The same command finishes in 37 seconds on a 64-core AMD running Linux. Are these times OK for your purposes? We could streamline the cctbx module hierarchy for your needs to bring down the times further, if necessary. To reduce the size of the source code directories, you could probably have some quick gains by removing certain top-level directories. I'm not sure it is worth going into the directories below the top level. Networks are so fast these days and disks so big, developer time (for writing and maintaining the scripts to pick out just what you need) is usually the most scarce resource. Ralf
Thanks so much for getting back to me so quickly.
It finished in 100 seconds. The same command finishes in 37 seconds on a 64-core AMD running Linux. Are these times OK for your purposes? We could streamline the cctbx module hierarchy for your needs to bring down the times further, if necessary.
100 seconds is certainly fine, especially given that this will only be performed every once in a while.
To reduce the size of the source code directories, you could probably have some quick gains by removing certain top-level directories. I'm not sure it is worth going into the directories below the top level. Networks are so fast these days and disks so big, developer time (for writing and maintaining the scripts to pick out just what you need) is usually the most scarce resource.
I totally agree - if cherry picking is time consuming then it's not worth it. I just wondered if there was a quick way to strip out some of the top level namespaces completely from the build dependencies. The only real gain here would be to reduce the slightly daunting filesize of the source bundle itself - but as I say this isn't a big deal. One other quick question that's quite important to my project: is there a way to build a debug version cctbx? At the moment I'm having a lot of problems due to mixing of release/debug CRTs (when I build my code in debug). Regards, -Martin
Hi Martin,
I totally agree - if cherry picking is time consuming then it's not
worth it. I just wondered if there was a quick way to strip out some
of the top level namespaces completely from the build dependencies.
Yes. The libtbx/configure.py command lists all the top-level names of the modules used. You can simply rm -rf the rest.
One other quick question that's quite important to my project: is there a way to build a debug version cctbx? At the moment I'm having a lot of problems due to mixing of release/debug CRTs (when I build my code in debug).
We have libtbx/configure.py --build=debug option. I'm occasionally using this under Linux and Mac OS X. I don't remember if I ever tried this under Windows. Ralf
participants (2)
-
Martin Uhrin
-
Ralf Grosse-Kunstleve