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

OSError with multiple GPUs #86

Open
VN-jsjeon opened this issue Nov 6, 2024 · 1 comment
Open

OSError with multiple GPUs #86

VN-jsjeon opened this issue Nov 6, 2024 · 1 comment

Comments

@VN-jsjeon
Copy link

VN-jsjeon commented Nov 6, 2024

Describe the bug
When running auto3d to generate 3D structures with multiple GPUs (e.g., using --gpu_idx 0,1), I encounter an OSError related to an invalid file, arated.sdf. This error does not occur when using only a single GPU (--gpu_idx 0), where the command executes successfully. It seems the program is attempting to read a non-existent file when more than one GPU is specified, likely due to how it splits tasks across GPUs.

To Reproduce
Steps to reproduce the behavior:

Prepare a SMILES file, e.g., abemaciclib.smi, with the desired structures.
Run auto3d with multiple GPUs:

auto3d abemaciclib.smi --k=100 --use_gpu=True --job_name auto3d_5 --gpu_idx 0,1

Error

The task will be divided into 2 jobs.
Job1, number of inputs: 1
Job2, number of inputs: 0


Isomer generation for job1
Enumerating cis/tran isomers for unspecified double bonds...
Enumerating R/S isomers for unspecified atomic centers...
Removing enantiomers...
Enumerating conformers/rotamers, removing duplicates...
100%|███████████████████████████████████████████████████████████████████████████████████


Isomer generation for job2


Optimizing on job1
Enumerating cis/tran isomers for unspecified double bonds...
Enumerating R/S isomers for unspecified atomic centers...
Removing enantiomers...
Enumerating conformers/rotamers, removing duplicates...
0it [00:00, ?it/s]


Optimizing on job2
Preparing for parallel optimizing... (Max optimization steps: 5000)
Preparing for parallel optimizing... (Max optimization steps: 5000)
Process Process-5:
Traceback (most recent call last):
  File "/home/jeon/raid_new/miniconda3/envs/auto3D/lib/python3.11/multiprocessing/proces
    self.run()
  File "/home/jeon/raid_new/miniconda3/envs/auto3D/lib/python3.11/multiprocessing/proces
    self._target(*self._args, **self._kwargs)
  File "/home/jeon/raid_new/miniconda3/envs/auto3D/lib/python3.11/site-packages/Auto3D/aapper
    optimizer.run()
  File "/home/jeon/raid_new/miniconda3/envs/auto3D/lib/python3.11/site-packages/Auto3D/bun
    mols = list(Chem.SDMolSupplier(self.in_f, removeHs=False))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: File error: Invalid input file /home/jeon/raid_new/model/auto3d/example/files/arated.sdf
Total 3D conformers: 767

System information:

Operating System: ubuntu22.04
Auto3D version: 2.3.1
Python version: 3.11
RDKit version: 2024.09.2
PyTorch version: 2.5.1

Additional context

  • This issue appears to arise when auto3d creates empty jobs or fails to handle cases where a job assigned to a GPU has zero inputs. When only a single GPU is used, the program executes without issues, so it seems specific to multi-GPU handling.
  • Even after downgrading rdkit to version 2023.09.01, I am still encountering the same error.
  • I have multiple GPUs available, and I've confirmed that they are working correctly with tasks other than auto3d.
@LiuCMU
Copy link
Member

LiuCMU commented Nov 7, 2024 via email

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