jiaor17 / DiffCSP

[NeurIPS 2023] The implementation for the paper "Crystal Structure Prediction by Joint Equivariant Diffusion"
MIT License
82 stars 33 forks source link

Windows 11 FileNotFoundError when attempting to run the CSP task #26

Open hasan-sayeed opened 1 month ago

hasan-sayeed commented 1 month ago

First of all, I want to say this is a great project! I read your paper on DiffCSP, and I was really excited to try it out. The approach and insights you presented are fascinating, and I’m eager to apply this to my work. However, I’ve run into an issue that I hope someone can help me with.

Description:

I’m attempting to run the CSP task using the DiffCSP repository on my Windows 11 laptop with an RTX 4060 GPU. I followed the environment setup instructions provided in https://github.com/txie-93/cdvae/issues/63#issuecomment-2211103347, and https://github.com/jiaor17/DiffCSP?tab=readme-ov-file#dependencies-and-setup but I’m encountering a FileNotFoundError when running the command: python diffcsp/run.py data=mp_20 expname=mp_20

Error:

File "C:\Users\hsayeed\miniconda3\envs\cdvae_copy_3\lib\site-packages\multiprocess\spawn.py", line 116, in spawn_main
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\hsayeed\miniconda3\envs\cdvae_copy_3\lib\site-packages\multiprocess\spawn.py", line 287, in _fixup_main_from_path
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\hsayeed\miniconda3\envs\cdvae_copy_3\lib\site-packages\multiprocess\spawn.py", line 125, in _main
    main_content = runpy.run_path(main_path,
  File "C:\Users\hsayeed\miniconda3\envs\cdvae_copy_3\lib\runpy.py", line 264, in run_path  
    prepare(preparation_data)
  File "C:\Users\hsayeed\miniconda3\envs\cdvae_copy_3\lib\site-packages\multiprocess\spawn.py", line 236, in prepare
    code, fname = _get_code_from_file(run_name, path_name)
  File "C:\Users\hsayeed\miniconda3\envs\cdvae_copy_3\lib\runpy.py", line 234, in _get_code_from_file
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\hsayeed\miniconda3\envs\cdvae_copy_3\lib\site-packages\multiprocess\spawn.py", line 287, in _fixup_main_from_path
    with io.open_code(decoded_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\hsayeed\\Documents\\GitHub\\HYDRA_JOBS\\singlerun\\2024-10-02\\mp_20\\diffcsp\\run.py'

System Setup:

OS: Windows 11 GPU: RTX 4060 Python environment: Miniconda, cdvae_copy_3 environment .env file:

export PROJECT_ROOT="C:\Users\hsayeed\Documents\GitHub\DiffCSP"
export HYDRA_JOBS="C:\Users\hsayeed\Documents\GitHub\HYDRA_JOBS"
export WABDB_DIR="C:\Users\hsayeed\Documents\GitHub\WABDB_DIR"

Additional Context: I found an open issue here: https://github.com/jiaor17/DiffCSP/issues/11#issue-2197787565 in the repository, which suggests that DiffCSP is more suited for Linux environments, and there might be incompatibility with Windows. I don't have access to a Linux machine at the moment, so I’m wondering if there’s a way to make this work on Windows.

Questions:

I’d really appreciate it if anyone could help me resolve this issue. Thanks in advance for your time and for this fantastic project!

hasan-sayeed commented 1 month ago

I was able to solve this issue, and I'm sharing the solution here for anyone who may face the same problem in the future.

After these steps, I was able to successfully run the CSP task.

I hope this helps anyone facing similar issues. Feel free to reach out if you have any further questions or need clarification. Thanks again to the developers for this great project!