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

numpy version causing runtime error #5

Open
GYGyk2000 opened this issue Apr 16, 2024 · 3 comments
Open

numpy version causing runtime error #5

GYGyk2000 opened this issue Apr 16, 2024 · 3 comments

Comments

@GYGyk2000
Copy link

Hi,
I am testing the software on Ubuntu 22.04.4 with an Intel CPU and Nvidia 4090. Using the yml file provided to create a conda env using miniconda, I have encountered a runtime error while generating the 3DSFC map by saying:
~/spIsoNet_tutorial$ spisonet.py fsc3d emd_8731_half_map_1.mrc emd_8731_half_map_2.mrc emd_8731_msk_1.mrc --ncpus 16 --limit_res 3.5 04-16 15:34:42, INFO Limit resolution to 3.5 for spIsoNet 3D FSC calculation. You can also tune this paramerter with --limit_res . 04-16 15:34:42, INFO calculating fast 3DFSC, this will take few minutes 100%|███████████████████████████████████████████| 95/95 [00:03<00:00, 31.27it/s] 99%|██████████████████████████████████████████▌| 94/95 [00:06<00:00, 5.77it/s]Traceback (most recent call last): File "/home/ykgong/miniconda3/envs/spisonet/lib/python3.10/multiprocessing/pool.py", line 138, in worker task = job = result = func = args = kwds = None RuntimeError: Object of type <class 'numpy.ndarray'> appears to be C subclassed NumPy array, void scalar, or allocated in a non-standard way.NumPy reserves the right to change the size of these structures. Projects are required to take this into account by either recompiling against a specific NumPy version or padding the struct and enforcing a maximum NumPy version. Exception ignored in: 'PyDataMem_UserFREE' Traceback (most recent call last): File "/home/ykgong/miniconda3/envs/spisonet/lib/python3.10/multiprocessing/pool.py", line 138, in worker task = job = result = func = args = kwds = None ValueError: PyCapsule_GetPointer called with invalid PyCapsule object Traceback (most recent call last): File "/home/ykgong/miniconda3/envs/spisonet/lib/python3.10/multiprocessing/pool.py", line 138, in worker task = job = result = func = args = kwds = None RuntimeError: Object of type <class 'numpy.ndarray'> appears to be C subclassed NumPy array, void scalar, or allocated in a non-standard way.NumPy reserves the right to change the size of these structures. Projects are required to take this into account by either recompiling against a specific NumPy version or padding the struct and enforcing a maximum NumPy version. Exception ignored in: 'PyDataMem_UserFREE' Traceback (most recent call last): File "/home/ykgong/miniconda3/envs/spisonet/lib/python3.10/multiprocessing/pool.py", line 138, in worker task = job = result = func = args = kwds = None ValueError: PyCapsule_GetPointer called with invalid PyCapsule object Traceback (most recent call last): File "/home/ykgong/miniconda3/envs/spisonet/lib/python3.10/multiprocessing/pool.py", line 138, in worker task = job = result = func = args = kwds = None RuntimeError: Object of type <class 'numpy.ndarray'> appears to be C subclassed NumPy array, void scalar, or allocated in a non-standard way.NumPy reserves the right to change the size of these structures. Projects are required to take this into account by either recompiling against a specific NumPy version or padding the struct and enforcing a maximum NumPy version. Exception ignored in: 'PyDataMem_UserFREE' Traceback (most recent call last): File "/home/ykgong/miniconda3/envs/spisonet/lib/python3.10/multiprocessing/pool.py", line 138, in worker task = job = result = func = args = kwds = None ValueError: PyCapsule_GetPointer called with invalid PyCapsule object 100%|███████████████████████████████████████████| 95/95 [00:07<00:00, 12.31it/s]
I am not sure if the 3DFSC is generated correctly. I have attached the exact dependencies txt file from my conda env.
Do you have any suggestions?
req.txt

Thank you!
YK

@procyontao
Copy link
Collaborator

Hi Yk,

This it seems like a numpy problem, it is probably worthy to reinstall the newer numpy.

please see my conda list for your info:

Name Version Build Channel

_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
aiohttp 3.9.3 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
async-timeout 4.0.3 pypi_0 pypi
attrs 23.2.0 pypi_0 pypi
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
certifi 2022.12.7 pypi_0 pypi
charset-normalizer 2.1.1 pypi_0 pypi
contourpy 1.2.0 pypi_0 pypi
cycler 0.12.1 pypi_0 pypi
filelock 3.9.0 pypi_0 pypi
fire 0.5.0 pypi_0 pypi
fonttools 4.46.0 pypi_0 pypi
frozenlist 1.4.1 pypi_0 pypi
fsspec 2023.4.0 pypi_0 pypi
idna 3.4 pypi_0 pypi
imageio 2.33.0 pypi_0 pypi
jinja2 3.1.2 pypi_0 pypi
kiwisolver 1.4.5 pypi_0 pypi
lazy-loader 0.3 pypi_0 pypi
ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
libuuid 1.41.5 h5eee18b_0
lightning-utilities 0.10.1 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
matplotlib 3.8.2 pypi_0 pypi
mpmath 1.3.0 pypi_0 pypi
mrcfile 1.4.3 pypi_0 pypi
multidict 6.0.5 pypi_0 pypi
ncurses 6.4 h6a678d5_0
networkx 3.0 pypi_0 pypi
numpy 1.24.1 pypi_0 pypi
openssl 3.0.12 h7f8727e_0
packaging 23.2 pypi_0 pypi
pandas 2.2.1 pypi_0 pypi
pillow 9.3.0 pypi_0 pypi
pip 23.3.1 py310h06a4308_0
pyarrow 15.0.0 pypi_0 pypi
pyparsing 3.1.1 pypi_0 pypi
python 3.10.13 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
pytorch-lightning 2.1.4 pypi_0 pypi
pytz 2024.1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
requests 2.28.1 pypi_0 pypi
scikit-image 0.22.0 pypi_0 pypi
scipy 1.11.4 pypi_0 pypi
setuptools 68.0.0 py310h06a4308_0
six 1.16.0 pypi_0 pypi
sqlite 3.41.2 h5eee18b_0
starfile 0.5.6 pypi_0 pypi
sympy 1.12 pypi_0 pypi
termcolor 2.4.0 pypi_0 pypi
tifffile 2023.12.9 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
torch 2.1.1+cu121 pypi_0 pypi
torchaudio 2.1.1+cu121 pypi_0 pypi
torchmetrics 1.3.0.post0 pypi_0 pypi
torchvision 0.16.1+cu121 pypi_0 pypi
tqdm 4.66.1 pypi_0 pypi
triton 2.1.0 pypi_0 pypi
typing-extensions 4.4.0 pypi_0 pypi
tzdata 2024.1 pypi_0 pypi
urllib3 1.26.13 pypi_0 pypi
wheel 0.41.2 py310h06a4308_0
xz 5.4.5 h5eee18b_0
yarl 1.9.4 pypi_0 pypi
zlib 1.2.13 h5eee18b_0

@GYGyk2000
Copy link
Author

Thanks!

May I also ask if the cuDNN is required for the reconstruction and Misalignments Correction in RELION? From Miniconda, using 'conda search' with default and Nvidia channels, the only cuDNN versions available and greater than 8 are 8.2 and 8.9. I am not sure which one I need, or if cuDNN is not required.

Thank You
YK

@procyontao
Copy link
Collaborator

Hi,
I think cudnn is not really required for pytorch, but I need to test it.

There are cudnn in "anaconda" channel and also the "conda-forge" channel. Also you can do the manually install by downloading from official Nvidia website.

I will try to standardize the installation in the near future because many complains are raised related to pytorch and cuda.

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