问题: *************************** Testing started ****************************
mpiexec has detected an attempt to run as root.
Running as root is *strongly* discouraged as any mistake (e.g., in
defining TMPDIR) or bug can result in catastrophic damage to the OS
file system, leaving your system in an unusable state.
We strongly suggest that you run mpiexec as a non-root user.
You can override this protection by adding the --allow-run-as-root option
to the cmd line or by setting two environment variables in the following way:
the variable OMPI_ALLOW_RUN_AS_ROOT=1 to indicate the desire to override this
protection, and OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 to confirm the choice and
add one more layer of certainty that you want to do so.
We reiterate our advice against doing so - please proceed at your own risk.
Could not parse feature flags.
make[3]: *** [/home/gengzi/install/cp2k-2024.1/Makefile:256: test] Error 1
make[2]: *** [/home/gengzi/install/cp2k-2024.1/Makefile:151: test] Error 2
make[1]: *** [/home/gengzi/install/cp2k-2024.1/Makefile:128: psmp] Error 2
make: *** [Makefile:123: test] Error 2
助手: 这个问题是由于在以root用户身份运行mpiexec时引起的警告。虽然可以通过添加--allow-run-as-root选项来覆盖此保护,但强烈建议不要以root用户身份运行mpiexec,因为这可能会造成系统文件系统的灾难性损坏。
为了解决这个问题,你应该以非root用户身份重新运行mpiexec。如果你希望继续以root用户身份运行mpiexec,可以按照以下步骤操作:
设置环境变量
OMPI_ALLOW_RUN_AS_ROOT为1:export OMPI_ALLOW_RUN_AS_ROOT=1设置环境变量
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM为1:export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
请注意,尽管可以通过以上步骤继续以root用户身份运行mpiexec,但这并不是推荐做法。建议尽可能以非root用户身份来运行mpiexec,以避免潜在的系统损坏风险。
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。