解决openMPI报错

执行mpirun的命令后发现报错如下

mpirun 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 mpirun 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.

原因是MPI不建议在root下使用,解决方法是加参数强制允许或使用进入用户执行命令,后面尝试了添加用户并在用户下执行命令,发现这样会出现ssh连接的问题,所以此报错的解决办法是在root加--allow-run-as-root强制执行

猜你喜欢

转载自blog.csdn.net/eternal963/article/details/130754893