Skip to content

Provided: patch for big-endian support #2690

Description

@pc297

star_big_endian_saindex_git.patch

STAR-master-bigendian-saindex-patched.zip

Logs.zip

Hi Alex,

Following up on our previous discussion regarding big-endian support, I spent some time investigating the error:

"BUG: next index is smaller than previous, EXITING"

I traced the failure from genomeSAindex.cpp through the suffix-array index generation code and identified several endian-sensitive code paths. With the help of ChatGPT, I examined additional code involved in packed-array and suffix-array handling and produced a patch addressing a number of little-endian assumptions in:

  • SuffixArrayFuns.cpp
  • PackedArray.{h,cpp}
  • Genome_genomeGenerate.cpp

I tested the patch on Debian ppc64 (big-endian) systems.

Validation performed:

  • Successful --runMode genomeGenerate on the STAR bacterial test genome.
  • Successful alignment using the STAR bacterial test FASTQ files.
  • samtools flagstat reported expected alignment statistics (100% alignment on the bacterial test dataset).
  • Successful --runMode genomeGenerate on mm10 (sjdbOverhang 99).
  • Successful alignment using the mm10 index and the publicly available mouse RNA-seq test dataset:
    https://zenodo.org/records/4249555

The initial testing was performed on a Quad G5 (PowerPC 970MP) running Debian ppc64 (big-endian). The bacterial tests completed successfully on this machine. However, mm10 index generation and alignment proved to be memory-limited on the G5 platform (28 GB RAM available max although I am hoping to get that up to 32 GB).

To validate operation on a large genome, I then ran the same ppc64 big-endian binaries on a POWER8 server running Debian ppc64 (big-endian) with 128 GB RAM. Using the same binaries compiled on the G5, mm10 genome generation and alignment completed successfully, suggesting that the remaining limitation on the G5 was memory capacity rather than correctness.

The resulting alignments appeared correct on inspection, and samtools flagstat produced expected mapping statistics.

The patch and patched source tree are attached for review and further testing:

  • star_big_endian_saindex_git.patch
  • STAR-master-bigendian-saindex-patched.zip

Although most modern POWER Linux installations now use little-endian mode (ppc64le), this patch may still be of interest for users of older big-endian POWER systems (POWER6/POWER7 and earlier), as well as potentially for current s390/s390x (IBM Z/LinuxONE) systems, which remain big-endian architectures.

I have not had access to s390x hardware for testing. If anyone in the community has access to an IBM Z/LinuxONE system and would be interested in testing the patch, I would be very interested to hear the results.

Many thanks again for STAR and for the previous discussion that helped narrow down the source of the issue.

Best regards,

Pierre Cauchy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions