Hi Greg,

great. Thanks for these commands. This leads to below yml (edited to include 
pip) which I came up with through looking at the conda package meta.yml file.

name: rdkit_openblas
channels:
  - defaults
dependencies:
  - python=3.7
  - libboost
  - py-boost
  - pillow
  - cairo
  - freetype
  - eigen
  - rdkit
  - ipykernel
  - pip:
    - pandas

I suspect just installing from this yml won't work as some of these libs have 
unlisted dependencies while for rdkit you want no deps. So below the exact 
non-optimized order of commands used:

conda create -n rdkit_openblas python=3.7
conda activate rdkit_openblas
pip install pandas
conda install --no-deps libboost py-boost
conda install cairo freetype pillow
conda install eigen
conda install --no-deps -c rdkit rdkit
conda install ipykernel

(pandas also installs numpy from pypi as dependency)

Further testing to be done but a quick sanity checks looks like it works (I 
attached a notebook, not sure how mailing list deals with that). The notebook 
also checks that numpy really isn't using mkl and checks the speed (A 6-core 
ryzen3600 should for sure be below 100 seconds in this test or else something 
is wrong).

This kind of works but installing any additional package will have similar 
issues. So scipy and scikit-learn most likely must also be installed via pip 
and for any other install or updates one must check the install list to check 
if mkl doesn't want to sneak back in. And if you want to add tensorflow-gpu on 
top not sure how that will work. Plus updating this env is probably also big 
problem.

So for me this is temporary workaround but not really a permanent long term 
solution (and as far as I can tell mostly an issue of conda and windows and not 
rdkit)

Best regards,

Thomas

________________________________
Von: Greg Landrum <greg.land...@gmail.com>
Gesendet: Dienstag, 12. November 2019 11:06
An: Thomas Strunz <beginn...@hotmail.de>
Cc: rdkit-discuss@lists.sourceforge.net <rdkit-discuss@lists.sourceforge.net>
Betreff: Re: [Rdkit-discuss] Anaconda installation without hard dependency on 
Intel MKl (windows)


Sorry I missed that you were on windows.

It looks like you can probably carefully construct an environment manually 
using the '--no-deps' argument to "conda install"

I created and activated a python 3.7 environment on windows, installed pandas 
and numpy from pip, and then did:

conda install --no-deps libboost py-boost
conda install --no-deps -c rdkit rdkit

That got me to the point that I can at least import the rdkit and rdkit.Chem, 
but there are almost certainly some missing dependencies that you'll have to 
install (either from conda if possible or from pip if not).

Note that once you've gone through the dance of making this work, you should be 
able to can easily re-create the environment 
http://rdkit.blogspot.com/2019/10/sharing-conda-environments.html

-greg

On Tue, Nov 12, 2019 at 10:43 AM Thomas Strunz 
<beginn...@hotmail.de<mailto:beginn...@hotmail.de>> wrote:
Hi Greg,

thanks for your quick reply.

The main problem is windows. This doesn't work on windows (one needs to add -c 
anaconda to your command so that nomkl is found) but then this is the result:

[cid:16e5f0d84c5cb971f161]

eg. it still wants to install mkl together with nomkl.

best regards,

Thomas



________________________________
Von: Greg Landrum <greg.land...@gmail.com<mailto:greg.land...@gmail.com>>
Gesendet: Dienstag, 12. November 2019 10:13
An: Thomas Strunz <beginn...@hotmail.de<mailto:beginn...@hotmail.de>>
Cc: 
rdkit-discuss@lists.sourceforge.net<mailto:rdkit-discuss@lists.sourceforge.net> 
<rdkit-discuss@lists.sourceforge.net<mailto:rdkit-discuss@lists.sourceforge.net>>
Betreff: Re: [Rdkit-discuss] Anaconda installation without hard dependency on 
Intel MKl (windows)

Hi Thomas,

I'm not sure how to configure conda so that a pip-installed version of numpy 
and/or pandas is used, but you can use conda versions without MKL by installing 
the nomkl package.

This conda command creates a functioning environment that does not have the MKL 
installed:
conda create -n no_mkl python=3.7 nomkl numpy pandas scikit-learn rdkit::rdkit

(no_mkl) glandrum@otter:~$ python -c 'import rdkit;print(rdkit.__version__)'
2019.09.1

Does that help?
-greg


On Tue, Nov 12, 2019 at 9:53 AM Thomas Strunz 
<beginn...@hotmail.de<mailto:beginn...@hotmail.de>> wrote:
Dear all,

would it be possible to make RDKit package not depend on mkl (probably via 
numpy, pandas) and that it accepts pre-installed numpy and pandas for example 
from pip as sufficient?

The background to this is simple. Intel MKL cripples performance on any AMD 
bases processor (4-5 times slower, SSE vs AVX2). Since these AMD CPUs are now 
actually competitive again, this poses an issue. On Linux it's simple to just 
link to openblas and it works as far as I can tell just fine.

On Windows the issue is that some tools for example scipy and pandas are only 
available as openblas builds via pypi (pip). I'm not sure where the issue is 
but when I then want to install rdkit into such an environment it doesn't 
"accept" the preinstalled numpy and pandas from pip and wants to install the 
conda version based on mkl again maybe due to the package dependencies.

Can this be changed so that when installing rdkit it accepts numpy and pandas 
install from pypi?

thanks for any help.

Best regards,

Thomas



_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Attachment: rdkit_openblas_quick_test.ipynb
Description: rdkit_openblas_quick_test.ipynb

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to