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

A problem when installing the raxml-ng in ARM HPC #142

Open
shengxinzhuan opened this issue May 23, 2022 · 9 comments
Open

A problem when installing the raxml-ng in ARM HPC #142

shengxinzhuan opened this issue May 23, 2022 · 9 comments

Comments

@shengxinzhuan
Copy link

Hello, raxml-ng developer !
I am working on an arm v8 HPC. Today I was tried to install the raxml-ng from the source code.
The command line I used to install like this:

git clone --recursive https://github.com/amkozlov/raxml-ng
cd raxml-ng
mkdir build && cd build
cmake -DSTATIC_BUILD=ON -DENABLE_RAXML_SIMD=OFF -DENABLE_PLLMOD_SIMD=OFF ..
make

But it failed because it without a file name : cpuid.h

/home/hzw/arm_software/biosoft/raxml-ng-master/src/util/sysutil.cpp:2:10: fatal error: cpuid.h: No such file or directory
    2 | #include <cpuid.h>
      |          ^~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/raxml_module.dir/util/sysutil.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/raxml_module.dir/all] Error 2
make: *** [all] Error 2

How could I edit the code to make it pass?

@davidecarlson
Copy link

I'm having the same problem on ARM aarch64 architecture. Were you ever able to figure out what needed to be changed to fix this?
Thanks!
Dave

@amkozlov
Copy link
Owner

Hi @shengxinzhuan @davidecarlson

I don't have access to a "real" ARM HPC system at the moment. However, I just committed changes that allow to compile and run raxml-ng on Apple M1, which is also based on ARM64 architecture.

Could you please try it out? Also, what kind of ARM system are you using?

@davidecarlson
Copy link

Hi Alexey,
Thanks for the update! With your changes, I just built this successfully using gcc 8.5 + OpenMPI. Interestingly, I get an internal compiler error when trying to build it with gcc 12.1 + OpenMPI:

during GIMPLE pass: vect
/lustre/projects/hpc_support_ookami/raxml-ng/libs/pll-modules/libs/libpll/src/parsimony.c: In function ‘pll_parsimony_build’:
/lustre/projects/hpc_support_ookami/raxml-ng/libs/pll-modules/libs/libpll/src/parsimony.c:204:19: internal compiler error: in vect_transform_reduction, at tree-vect-loop.cc:7457
  204 | PLL_EXPORT double pll_parsimony_build(pll_parsimony_t * pars,

I presume this is a GCC bug and not an issue with the code itself.

I'm building this on a Fujitsu A64FX HPC cluster named Ookami.

Incidentally, if getting access to a "real" ARM HPC system would be beneficial to improving raxml-ng, I could help get you (free) access to Ookami. I'm part of the support team for the cluster, and we're always looking for folks who are interested in using it to build/test/tune their codes for A64FX in particular and Aarch64 in general.

If that would be of any use or interest to you or your team, please let me know and I can reach out with more information.

Regardless, thank you for the updates to the code!
Best,
Dave

@amkozlov
Copy link
Owner

Hi Dave,

Hi Alexey, Thanks for the update! With your changes, I just built this successfully using gcc 8.5 + OpenMPI.

great!

I presume this is a GCC bug and not an issue with the code itself.

Yes it looks like gcc12 outsmarted itself, it tried to autovectorize the code but failed.

If that would be of any use or interest to you or your team, please let me know and I can reach out with more information.

Thanks! This sounds interesting, if it's not too much overhead on both sides :)

Best,
Alexey

@davidecarlson
Copy link

Great, thanks, Alexey. I will send you some information via email unless you have different preference. Is the email at your h-its.org page still valid?

https://www.h-its.org/people/alexey-kozlov/

Thanks,
Dave

@amkozlov
Copy link
Owner

@davidecarlson yes, this is my current e-mail.

@shengxinzhuan
Copy link
Author

@amkozlov Hi,thanks for reply. I am using the ARM HPC name kunpeng, which made by huawei. It look more like an Android cpu which install an centos system. I try to use the M1 version raxml-ng, but it don't work because apple's instruction set may be different to the general purpose instruction set.
The error look like this : cannot execute binary file.
The way to solve in the general arm cpu may be write an cpuid.h file to the raxml-ng. And huawei give an example in here.But I don't know how to edit it cause my poor c language.
https://support.huaweicloud.com/prtg-kunpenghpcs/kunpengmegahit_02_0007.html

@starsareintherose
Copy link

I work on arm cpu, error like this

12%] Building C object libs/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/output.c.o
[ 13%] Building C object libs/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/parsimony.c.o                              during GIMPLE pass: vect                                      /home/guoyi/Packages/BioArchLinux/raxml-ng-portable/src/raxml-ng/libs/pll-modules/libs/libpll/src/parsimony.c: In function pll_parsimony_build':                                          /home/guoyi/Packages/BioArchLinux/raxml-ng-portable/src/raxml-ng/libs/pll-modules/libs/libpll/src/parsimony.c:204:19: internal compiler error: in vect_transform_reduction, at tree-vect-loop.cc:7457                                                     204 | PLL_EXPORT double pll_parsimony_build(pll_parsimony_t * pars,                                                             |                   ^~~~~~~~~~~~~~~~~~~                 0x17b1b3b internal_error(char const*, ...)
        ???:0                                                 0x66aefb fancy_abort(char const*, int, char const*)
        ???:0                                                 0xdf93b7 vect_transform_reduction(_loop_vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, gimple**, _slp_tree*)                    ???:0
0x177513f vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*)                        ???:0                                                 0xe06c1f vect_transform_loop(_loop_vec_info*, gimple*)
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.    See <https://github.com/archlinuxarm/PKGBUILDs/issues> for instructions.                                                    make[2]: *** [libs/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/build.make:366: libs/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/parsimony.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:334: libs/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

command here

mkdir -p build
  cd build
  cmake -DSTATIC_BUILD=ON  -DENABLE_RAXML_SIMD=OFF -DENABLE_PLLMOD_SIMD=OFF -DENABLE_SSE=OFF -DENABLE_AVX=OFF -DENABLE_AVX2=OFF ..
  make

@martin-g
Copy link

I was able to build raxml-ng on openEuler 22.03 LTS ARM64 (Kunpeng CPU) without any issues!
Both ./bin/raxml-ng and ./bin/raxml-ng-static seem to work without any issues!

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

5 participants