Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM error on CPU #149

Open
Asif-Iqbal-Bhatti opened this issue Jun 19, 2023 · 15 comments
Open

LLVM error on CPU #149

Asif-Iqbal-Bhatti opened this issue Jun 19, 2023 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@Asif-Iqbal-Bhatti
Copy link

Asif-Iqbal-Bhatti commented Jun 19, 2023

Hello,

After running the and training on my data set I keep on getting this error on my machine:

 The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @jit(inline=inline)

Model architecture: out_dims, d_model, N, heads
3, 512, 3, 4
Running on compute device: cpu
Model size: 11987206 parameters

Generating EDM: 100%|██████████████████████| 598/598 [00:00<00:00, 197402.31formulae/s]
loading data with up to 7 elements in the formula
training with batchsize 128 (2**7.000)
stepping every 50 training passes, cycling lr every 10 epochs
checkin at 20 epochs to match lr scheduler
Epoch: 0/40 --- train mae: 0.0135 val mae: 0.0135
Epoch: 19/40 --- train mae: 0.00895 val mae: 0.00895
Epoch: 39/40 --- train mae: 0.00653 val mae: 0.00653
Saving network (test-property) to models/trained_models/test-property.pth
[train-CrabNet]
Elapsed: 104.44437

Generating EDM: 100%|██████████████████████| 598/598 [00:00<00:00, 161392.05formulae/s]
loading data with up to 7 elements in the formula
Generating EDM: 100%|██████████████████████| 205/205 [00:00<00:00, 123716.88formulae/s]
loading data with up to 7 elements in the formula
val RMSE:  0.017233173185924926
Fitting mod_petti kernel matrix
Constructing distances
LLVM ERROR: Symbol not found: __powidf2
Aborted

I don't have cuda. I am only using cpu version. I checked on Google but could not find a solution.

If you know how to resolve let me know. Thanks.

@Asif-Iqbal-Bhatti Asif-Iqbal-Bhatti added the bug Something isn't working label Jun 19, 2023
@sgbaird
Copy link
Member

sgbaird commented Jun 19, 2023

Hi @Asif-Iqbal-Bhatti, thanks for giving mat_discover a try, and thank you for including the output!

A few questions:

  • What OS are you using?
  • Which Python version are you using?
  • Which version of mat_discover do you have installed?

To find the mat_discover version:

import mat_discover
mat_discover.__version__

Btw, I checked the main Colab notebook, and it had installation issues with installing the latest release. It seems Colab has updated to Python 3.10, and chem_wasserstein had a requirement of less than Python 3.10. I relaxed this requirement and am pushing out a new version. In the meantime, I've made a "hot fix" to the Colab notebook by ignoring the Python requirement within the pip install. I also had to install a 1.* version of PyTorch (sparks-baird/CrabNet#70), and it seems to be working properly now.

Do you mind trying to run it with your data in the linked Colab notebook? This will help me to debug the LLVM error that you're getting. Lmk if you need any help.

@Asif-Iqbal-Bhatti
Copy link
Author

Asif-Iqbal-Bhatti commented Jun 19, 2023

I am using WSL ubuntu in windows 10
So I am using python 3.10 inside a conda environment.
About mat_discover I just install using the pip install mat_discover-2.0.1 version

Okay, I will try that in notebook

@sgbaird
Copy link
Member

sgbaird commented Jun 19, 2023

Thanks! Also, I just recently saved a new version of the notebook. Please make sure you're using the latest version of it (I was testing things out and didn't expect such a quick reply 😅)

@sgbaird
Copy link
Member

sgbaird commented Jun 19, 2023

Also, if you try it on your machine again, I recommend following the pip installation instructions in a fresh conda environment. I had trouble updating the conda package, but hopefully that should be resolved in ~30 minutes, assuming https://github.com/sparks-baird/mat_discover/actions/runs/5310831719 is successful. Whatever the install method, you can double-check by making sure that you're using mat_discover==2.2.9.

@sgbaird
Copy link
Member

sgbaird commented Jun 23, 2023

@Asif-Iqbal-Bhatti were you able to get this figured out? Any updates?

sgbaird added a commit that referenced this issue Jun 23, 2023
@Asif-Iqbal-Bhatti
Copy link
Author

Hello @sgbaird so I tried running on Google Colab and there was no error but when I run on my local WSL ubuntu machine it gives this LLVM error. I tried many way as you suggested but still I could not ignore that. I think some library linkage is not set for running mat_discover on cpu.

@sgbaird
Copy link
Member

sgbaird commented Jun 26, 2023

Hi @Asif-Iqbal-Bhatti, thanks for verifying the Google Colab script. This helps isolate the issue. I found a related issue numba/numba#6012. One of the quick-fix suggestions is to pin numba<=0.50. If you already have everything installed in a conda environment, I think you'd just run:

pip install numba<0.50

Can you give this a try and lmk?

@gmarkall
Copy link

Is it possible to try this with Numba 0.57 (if that wasn't already the version in use)? The llvmlite / LLVM versions with Numba 0.57 are quite different to those with earlier versions (14 vs 11, and a change to avoid generating some inappropriate library calls) so I'm wondering if the problem is resolved in the latest version already.

@Asif-Iqbal-Bhatti
Copy link
Author

Hallo @sgbaird, so I tried now and it is working perfectly. Thanks for pointing out. Numba was causing de probleem. Dank u.

@Asif-Iqbal-Bhatti
Copy link
Author

Asif-Iqbal-Bhatti commented Jun 27, 2023

I have
Name: numba
Version: 0.57.0
Summary: compiling Python code using LLVM
Home-page: https://numba.pydata.org
Author:
Author-email:
License: BSD
Location: /home/******/miniconda3/lib/python3.10/site-packages
Requires: llvmlite, numpy
Required-by: chem_wasserstein, dist_matrix, ElM2D, ElMD, gridrdf, hiphive, mat_discover, pgbm, pynndescent, pyxtal, umap-learn

so it works with this version.

@sgbaird
Copy link
Member

sgbaird commented Jun 27, 2023

@Asif-Iqbal-Bhatti glad to hear it! Lmk if you need help with anything else

@Asif-Iqbal-Bhatti
Copy link
Author

Hello, so running on Google colab there is now new error:

Screenshot 2023-06-29 115043

@sgbaird
Copy link
Member

sgbaird commented Jul 1, 2023

Ok, I'll give this a look. Thanks!

@sgbaird
Copy link
Member

sgbaird commented Jul 1, 2023

@Asif-Iqbal-Bhatti updating jaxlib seemed to fix it. I need to look into a more permanent fix #155. I think this is from adding m3gnet as a dependency #154. This should be working now:

https://colab.research.google.com/drive/1MgV_ZewS6gLm1a3Vyhg33pFHi5uTld_2?usp=sharing

@sgbaird
Copy link
Member

sgbaird commented Aug 7, 2023

@Asif-Iqbal-Bhatti were you able to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants