Core-metrics (Plugin error from diversity)

hi everyone,
Im trying to make alpha and beta diversity but when i run the following :

qiime diversity core-metrics-phylogenetic --i-phylogeny Lombok_v9_18-rooted-tree.qza
--i-table Lombok_v9_18_table.qza
--p-sampling-depth 11358
--m-metadata-file Metadata_Lombok02_v9_18.tsv
--output-dir core-metrics-results
--verbose

it delivers the following:
faithpd -i /tmp/qiime2/carolline/data/f98e6d82-b833-443d-8921-556872735626/data/feature-table.biom -t /tmp/qiime2/carolline/data/f968ca8b-7889-42f8-978f-721f522e94b6/data/tree.nwk -o /tmp/q2-AlphaDiversityFormat-c7yzl_m2

/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/bin/faithpd: line 43: /home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/bin/faithpd_nv_avx2: cannot execute binary file: Exec format error
/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/bin/faithpd: line 43: /home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/bin/faithpd_nv_avx2: Success
Traceback (most recent call last):
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2cli/commands.py", line 520, in call
results = self._execute_action(
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2cli/commands.py", line 586, in _execute_action
results = action(**arguments)
File "", line 2, in core_metrics_phylogenetic
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 647, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_diversity/_core_metrics.py", line 65, in core_metrics_phylogenetic
faith_pd_vector, = faith_pd(table=cr.rarefied_table,
File "", line 2, in faith_pd
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/qiime2/sdk/context.py", line 143, in deferred_action
return action_obj._bind(
File "", line 2, in faith_pd
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in callable_executor
output_views = self._callable(**view_args)
File "", line 2, in faith_pd
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 75, in _validate_tables
return wrapped_function(*args, **kwargs)
File "", line 2, in faith_pd
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 118, in _validate_requested_cpus
return wrapped_function(*bound_arguments.args, **bound_arguments.kwargs)
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_diversity_lib/alpha.py", line 54, in faith_pd
_omp_cmd_wrapper(threads, cmd)
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 134, in _omp_cmd_wrapper
return _run_external_cmd(cmd, verbose=verbose, env=env)
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 128, in _run_external_cmd
return subprocess.run(cmd, check=True, env=env)
File "/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['faithpd', '-i', '/tmp/qiime2/carolline/data/f98e6d82-b833-443d-8921-556872735626/data/feature-table.biom', '-t', '/tmp/qiime2/carolline/data/f968ca8b-7889-42f8-978f-721f522e94b6/data/tree.nwk', '-o', '/tmp/q2-AlphaDiversityFormat-c7yzl_m2']' returned non-zero exit status 126.

Plugin error from diversity:

Command '['faithpd', '-i', '/tmp/qiime2/carolline/data/f98e6d82-b833-443d-8921-556872735626/data/feature-table.biom', '-t', '/tmp/qiime2/carolline/data/f968ca8b-7889-42f8-978f-721f522e94b6/data/tree.nwk', '-o', '/tmp/q2-AlphaDiversityFormat-c7yzl_m2']' returned non-zero exit status 126.

How can i solve it?

thanks

Hello @caca,

The root error here is:

/home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/bin/faithpd: line 43: /home/carolline/anaconda3/envs/qiime2-amplicon-2024.2/bin/faithpd_nv_avx2: cannot execute binary file: Exec format error

which means there is some kind of binary incompatibility going on. Of particular interest to me is the avx2 part in the binary's name.

First of all, what sort of system are you running on? Mac, Linux, WSL? Are you on a local machine or a cluster? Are you sure you followed the correct install instructions for your OS on this page? We have seen a similar error before when people have installed the Linux version on Mac and vice versa.

Assuming you have installed the correct version of QIIME 2 for your system, can you run the command lscpu and post the results here?

Thank you.

1 Like

Hello
Thank you for responding. I'm running a Linux system and have followed the installation instructions,

wget https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.2-py38-linux-conda.yml
conda env create -n qiime2-amplicon-2024.2 --file qiime2-amplicon-2024.2-py38-linux-conda.yml

I run lscpu command and here is the result.

You appear to be following the correct instructions, and your CPU seems to support the avx2 instruction set.

Can you try just running faithpd and faithpd_nv_avx2 and posting the results of those runs here?

Hello
Thank you for responding. I ran the commands faithpd and faithpd_nv_avx2 and here are the results.

Hi @caca,

Could you please try executing export UNIFRAC_MAX_CPU=basic, and then running faithpd?

Best,
Daniel

2 Likes

hello @wasade, Thank you for responding. here are the result.

1 Like

Great, thank you! The call to core-metrics-phylogenetic should work now. Please note the export will need to be done prior to calling core-metrics-phylogenetic, and the "exported" variable is does not persist if the terminal is closed and reopened.

What looks to be occurring is your processor has one of the instruction sets we test for, but not all the ones required. We will be switching the library in the future to default to the basic binary to avoid this scenario.

Best,
Daniel

3 Likes

Thank you @wasade that helps :smiley:

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.