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

Error in program being profiled: Function Not Found, function 'nvmlDeviceGetComputeRunningProcesses_v2' not found #730

Open
NNrico opened this issue Nov 26, 2023 · 2 comments

Comments

@NNrico
Copy link

NNrico commented Nov 26, 2023

Hello,

I just installed scalene=1.5.31.1 in a conda environment as (Tesienv) and I want to test it on a simple file ee.py.

The error seems to be in the pynvml library (version=11.4.1)

I runned the command line as administrator and this is the error

(Tesienvv) C:\Users\enric\myproject\scalene ee.py
Error in program being profiled:
 Function Not Found
Traceback (most recent call last):
  File "C:\Users\enric\.conda\envs\Tesienvv\Lib\site-packages\pynvml\nvml.py", line 782, in _nvmlGetFunctionPointer
    _nvmlGetFunctionPointer_cache[name] = getattr(nvmlLib, name)
                                          ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\enric\.conda\envs\Tesienvv\Lib\ctypes\__init__.py", line 389, in __getattr__
    func = self.__getitem__(name)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\enric\.conda\envs\Tesienvv\Lib\ctypes\__init__.py", line 394, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: function 'nvmlDeviceGetComputeRunningProcesses_v2' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\enric\.conda\envs\Tesienvv\Lib\site-packages\scalene\scalene_profiler.py", line 1894, in profile_code
    exec(code, the_globals, the_locals)
  File "C:\Users\enric\myproject\ee.py", line 2, in <module>
    import numpy as np
  File "C:\Users\enric\.conda\envs\Tesienvv\Lib\site-packages\numpy\__init__.py", line 130, in <module>
    from numpy.__config__ import show as show_config
  File "C:\Users\enric\.conda\envs\Tesienvv\Lib\site-packages\numpy\__config__.py", line 4, in <module>
    from numpy.core._multiarray_umath import (
Scalene: Program did not run for long enough to profile.
NOTE: The GPU is currently running in a mode that can reduce Scalene's accuracy when reporting GPU utilization.
Run once as Administrator or root (i.e., prefixed with `sudo`) to enable per-process GPU accounting.'

The ee.py file that I run is very simple and it takes about 10 seconds to execute using
(Tesienvv) C:\Users\enric\myproject>python ee.py in the command line

import numpy as np

def rosen(x):
    """The Rosenbrock function"""
    return sum(100.0*(x[1:]-x[:-1]**2.0)**2.0 + (1-x[:-1])**2.0)
    
x0 = np.array([1.3, 0.7, 0.8, 1.9, 1.2])

for i in range(1000000):
    rosen(x0+i)

For completeness i have numpy=1.26.2 although I don't think it is the problem.

@NNrico
Copy link
Author

NNrico commented Nov 27, 2023

using scalene=1.5.15 with pynvml=1.5.0
python -m scalene ee.py it produces a profilation

@sstandre
Copy link

I am experiencing the same issue on windows

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

No branches or pull requests

2 participants