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

OMP: Error #15 during Getting Started #391

Closed
mparent3 opened this issue Mar 3, 2023 · 7 comments · Fixed by weecology/deepforestr#7
Closed

OMP: Error #15 during Getting Started #391

mparent3 opened this issue Mar 3, 2023 · 7 comments · Fixed by weecology/deepforestr#7

Comments

@mparent3
Copy link

mparent3 commented Mar 3, 2023

Describe the bug
A clear and concise description of what the bug is.
When loading the current release model after DeepForest installation in R, model = df_model() causes OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

To Reproduce
Steps to reproduce the behavior:
Complete Basic Installation of Using DeepForest from R
Load the current release model
Input
`library(deepforestr)

model = df_model()
model$use_release()`
OMP: Error #15 occurs at model = df_model()

Environment (please complete the following information):

  • OS: Windows 10
  • Python version and environment : Python in R installed from DeepForest Basic Installation

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
I am an undergraduate student in Dr. Swenson's lab at the University of Notre Dame and I am setting up DeepForest for the first time to work with his group.

@ethanwhite
Copy link
Member

Hi @mparent3 - thanks for reporting this. Keeping the R-wrapper up and running has been tricky due to changes in the package that we use for running the core Python package from R. I'm going to spend a bit of time seeing if I can fix it again this weekend, and I'll let you know if I get anywhere, but the easiest thing to do is to use the Python package directly to do the tree detection and then move to R for everything else.

@mparent3
Copy link
Author

mparent3 commented Mar 4, 2023

Ok, thank you for the info and for trying to fix it.

@ethanwhite
Copy link
Member

ethanwhite commented Mar 4, 2023

Notes from work so far:

@ethanwhite
Copy link
Member

@mparent3 - I have a solution for you to try (at least a partial one). Steps 2-4 are just to get rid of the installation that R did for you which is having issues.

  1. Install miniconda by downloading and running the executable here https://docs.conda.io/en/latest/miniconda.html Miniconda is a same thing R uses to install Python packages, you're just going to install it yourself. All of the defaults are fine during installation.
  2. Launch Anaconda Prompt from your start menu
  3. Type conda env list. This should show one of more environments named r-miniconda or R-MINI... along with the directories they are created in. The directory is probably something like `C:\Users\yourusername\AppData\Local\r-miniconda.
  4. Delete that directory/directories. It may look like multiple but actually just be one. You can do this from the command line while staying in the Anaconda Prompt window or from the File Explorer. In the File Explorer you will probably have to type the path into the bar since the AppData directory is hidden. Then rerun conda env list. The only thing left should be c:\Users\yourusername\miniconda3.
  5. Now, in the Anaconda Prompt window, run pip install deepforest
  6. Restart R and try the Getting Started commands again

This worked for me on the same machine that I used to replicate the issue you encountered, so hopefully this will get you up and running while I figure out how to get R to handle that install in a way that doesn't break things.

@mparent3
Copy link
Author

mparent3 commented Mar 4, 2023

Hi @ethanwhite,
It worked! Following those steps exactly got past model = df_model() and I was able to run the predictions for the single image and tile in Getting Started.
Thank you for your help!

@mparent3 mparent3 closed this as completed Mar 4, 2023
@ethanwhite ethanwhite reopened this Mar 4, 2023
@ethanwhite
Copy link
Member

Awesome! Glad it worked.

Reopening since I'm hoping to create a fix that can be done entirely from R.

ethanwhite added a commit to weecology/deepforestr that referenced this issue Mar 4, 2023
The mkl package was causing an issue with trying to load OMP more than
once.

See weecology/DeepForest#391 for details

Fixes #391
@ethanwhite
Copy link
Member

I just merged a fix to the R-based install instructions that also works:
weecology/deepforestr@e10c158

Thanks for reporting the bug @mparent3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants