MPI не может создать параллельный процесс, происходит сбой в MPI_INIT - PullRequest
0 голосов
/ 04 ноября 2019

Я изучаю интерфейс MPI для C и только что установил MPI для моей системы (Mac Os Mojave 10.14.6). Я сделал это с помощью этого урока . Все было хорошо, и теперь я хотел начать свой первый простой код. Я пытался понять ошибку и искал решение, но не смог найти его самостоятельно. Использование CLion в качестве IDE. main.c

#include <stdio.h>
#include <mpi.h>

int main(argc, argv)
        int argc;

        char **argv;
{
    int rank, size;
    MPI_Init( &argc, &argv );
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    MPI_Comm_rank(MPI_COMM_WORLD, &size);
    printf("Hi from process %d of $d\n", rank, size);
    MPI_Finalize();
    return 0;
}

CMakeList.txt

cmake_minimum_required(VERSION 3.15)
project(uebung02 C)

set(CMAKE_C_STANDARD 99)

add_executable(uebung02 main.c)
set(CMAKE_C_COMPILER /opt/openmpi/bin/mpicc)
set(CMAKE_CXX_COMPILER /opt/openmpi/bin/mpic++)

Ошибка вывода

/Users/admin/Documents/HU/VSuA/uebung02/cmake-build-debug/uebung02
--------------------------------------------------------------------------
PMIx has detected a temporary directory name that results
It looks like orte_init failed for some reason; your parallel process is
in a path that is too long for the Unix domain socket:
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;

here's some additional information (which may only be relevant to an
Open MPI developer):
    Temp dir: /var/folders/9j/54dxfbf1451dk82nn7y99d8r0000gn/T/openmpi-sessions-501@admins-MacBook-Pro_0/15653


  orte_ess_init failed
Try setting your TMPDIR environmental variable to point to
something shorter in length
[admins-MacBook-Pro.local:44625] [[INVALID],INVALID] ORTE_ERROR_LOG: Unable to start a daemon on the local node in file ess_singleton_module.c at line 582
[admins-MacBook-Pro.local:44625] [[INVALID],INVALID] ORTE_ERROR_LOG: Unable to start a daemon on the local node in file ess_singleton_module.c at line 166
  --> Returned value Unable to start a daemon on the local node (-127) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems.  This failure appears to be an internal failure; here's some
[admins-MacBook-Pro.local:44625] *** An error occurred in MPI_Init
addition[admins-MacBook-Pro.local:44625] *** on a NULL communicator
[admins-MacBook-Pro.local:44625] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[admins-MacBook-Pro.local:44625] ***    and potentially your MPI job)
al information (which may only be relevant to an Open MPI
developer):

[admins-MacBook-Pro.local:44625] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!
  ompi_mpi_init: ompi_rte_init failed
  --> Returned "Unable to start a daemon on the local node" (-127) instead of "Success" (0)
--------------------------------------------------------------------------

Process finished with exit code 1

...