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

pyabpoa: segmentation fault with version 1.5.2 #75

Open
shokrof opened this issue Aug 13, 2024 · 13 comments
Open

pyabpoa: segmentation fault with version 1.5.2 #75

shokrof opened this issue Aug 13, 2024 · 13 comments

Comments

@shokrof
Copy link

shokrof commented Aug 13, 2024

Hi,
I am encountering a segmentation fault when using version 1.5.2. Please find the attached code. I installed pyabopa using pip install pyabopa on a Linux machine. I can successfully print the sequence before running msa function. Additionally, I have tested version 1.5.1, which works as expected on my machine.

import pyabpoa as pa
seqs= ['CTGACTACAGCGCGCACACGCGCTATATATATCATCATCATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA', 
       'CTGACTACAGCGCGCACACGCGCTATATATATATATATGTATAGTAGAGACGTCACGTGTAGCA'
       ]
max_n_cons=2
aligner = pa.msa_aligner(aln_mode='g')
#print(seqs)
result = aligner.msa(
        seqs, out_cons=True, out_msa=False, max_n_cons=2,
        min_freq=0.3)
print(result.cons_seq[0])
@yangao07
Copy link
Owner

Hi, for the seg fault, I assume it is a known issue caused by running it on an old machine.
Are you able to re-produce it on other machines?

@shokrof
Copy link
Author

shokrof commented Aug 21, 2024

I could replicate it on a macOS m2 machine.

@yangao07
Copy link
Owner

I am not sure about macOS/m chips, our experience is primarily based on Linux.

@shokrof
Copy link
Author

shokrof commented Aug 21, 2024

I faced the problem while working on a Linux machine and I am just saying it is reproducible on other machines. I am wondering if the following code runs on your machine.

@yangao07
Copy link
Owner

I see, I can not reproduce it on my machine.
For your linux, can you show your /proc/cpuinfo ?

@shokrof
Copy link
Author

shokrof commented Aug 21, 2024

processor is "Intel(R) Xeon(R) Platinum 8168"

@yangao07
Copy link
Owner

OK, but please try this "cat /proc/cpuinfo | grep flag".

@shokrof
Copy link
Author

shokrof commented Aug 21, 2024

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d arch_capabilities
vmx flags       : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple shadow_vmcs pml ept_mode_based_exec tsc_scaling

@yangao07
Copy link
Owner

The machine looks good to me.
Have you tried installing pyabpoa from source on your linux?

@shokrof
Copy link
Author

shokrof commented Aug 21, 2024

I tried to install the python library using python3 -m pip install . from the source code and it is still giving segmentation fault. However, when I run the binary using fasta file it works fine

@yangao07
Copy link
Owner

yangao07 commented Aug 21, 2024

Hi, I just re-produce your error on my machine, and confirmed that this is a pypi building issue.
Currently, you can try this to use v1.5.2:

pip install --no-binary pyabpoa pyabpoa

I will try to fix this pypi building issue in the next version.

@yangao07 yangao07 changed the title Segmentation fault with version 1.5.2 pyabpoa: segmentation fault with version 1.5.2 Aug 21, 2024
@shenker
Copy link

shenker commented Aug 31, 2024

I ran into what is presumably the same issue with the conda packages. mamba install pyabpoa=1.5.2=py312he57d009_1 gives an pyabpoa install that triggers a signal 132 illegal instruction error with my test script (run on an academic HPC node with an outdated CPU), whereas a slightly older conda build of version 1.5.2 works (mamba install pyabpoa=1.5.2=py312he57d009_0, note the _0 build number).

cpu flags:

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdseed adx smap xsaveopt cqm_llc cqm_occup_llc  

@yangao07
Copy link
Owner

The conda/mamba could be the same, I am not sure.
For pyabpoa, I suggest pip over conda/mamba.

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

3 participants