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

setup gets stuck #45

Open
ekg opened this issue Jul 11, 2022 · 3 comments
Open

setup gets stuck #45

ekg opened this issue Jul 11, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@ekg
Copy link

ekg commented Jul 11, 2022

On two very different systems I'm getting stuck at the same place in the setup.

mantis setup
...
Merging profiles in  /lizardfs/erikg/miniconda3/lib/python3.8/site-packages/References/NCBI/986/to_merge/
Concatenating files into  /lizardfs/erikg/miniconda3/lib/python3.8/site-packages/References/NCBI/986/986_merged.hmm

The setup process simply hangs. On my laptop, I had to kill it. But, on a remote server I'll wait to see if it progresses. Nothing is running as far as htop says and no data is being written.

@PedroMTQ
Copy link
Owner

Hello @ekg
I'm not entirely sure what the issue could be as this is only a concatenation method.

  1. What OS are you using in your systems?
  2. Is 986_merged.hmm not being written at all?
  3. Could you perhaps have some permission issues?
  4. When you killed the process on your laptop, what was the traceback?

Regards,
Pedro

@ekg
Copy link
Author

ekg commented Jul 11, 2022

The remote system is a debian one in octopus, while the local one is a Ryzen laptop. So they have in common the fact that they are recent AMD systems. Otherwise, they couldn't be less similar up to the point that they're both debian-based (the laptop runs Ubuntu 22.04 (linux 5.18), the server is probably on a recent debian stable (linux 4.19).

The remote one has progressed. But, it seems very strange that nothing is happening. One filesystem is a local SSD, the other is a networked storage system. The common behavior on both suggests it should be possible to reproduce?

On both, I'm installing mantis using conda: conda install -c bioconda -c conda-forge mantis_pfa

@PedroMTQ
Copy link
Owner

What do you mean by The remote one has progressed. But, it seems very strange that nothing is happening?
The HMM for taxa id 986 is also pretty small, so I'm not sure why it would take that long.

The code for concatenation is pretty simple as well:

def concat_files(output_file, list_file_paths, stdout_file=None):
    print('Concatenating files into ', output_file, flush=True, file=stdout_file)
    with open(output_file, 'wb') as wfd:
        for f in list_file_paths:
            with open(f, 'rb') as fd:
                shutil.copyfileobj(fd, wfd)
            # forcing disk write
            wfd.flush()
            os.fsync(wfd.fileno())

It might be that the flushing or fsync is causing hanging, but I'm not sure why that would be the case.
At the moment I don't have time to dive into this but I'll try to reproduce this by the end of the month and will see if there's a better solution to the concatenation.

It might be possible that there's write competition between the multiple cores in your system.
Could you try to run the setup with a single core for NCBI?

@PedroMTQ PedroMTQ added the bug Something isn't working label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants