mpi + infiniband слишком много подключений

Я запускаю приложение MPI в кластере, используя 4 узла по 64 ядра каждый. Приложение выполняет шаблон связи «все ко всем».

Выполнение приложения следующим образом работает нормально:

$: mpirun -npernode 36 ./Приложение

Добавление дополнительного процесса на узел приводит к сбою приложения:

$: mpirun -npernode 37 ./Приложение

--------------------------------------------------------------------------
A process failed to create a queue pair. This usually means either
the device has run out of queue pairs (too many connections) or
there are insufficient resources available to allocate a queue pair
(out of memory). The latter can happen if either 1) insufficient
memory is available, or 2) no more physical memory can be registered
with the device.

For more information on memory registration see the Open MPI FAQs at:
http://www.open-mpi.org/faq/?category=openfabrics#ib-locked-pages

Local host:             laser045
Local device:           qib0
Queue pair type:        Reliable connected (RC)
--------------------------------------------------------------------------
[laser045:15359] *** An error occurred in MPI_Issend
[laser045:15359] *** on communicator MPI_COMM_WORLD
[laser045:15359] *** MPI_ERR_OTHER: known error not in list
[laser045:15359] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
[laser040:49950] [[53382,0],0]->[[53382,1],30] mca_oob_tcp_msg_send_handler: writev failed: Connection reset by peer (104) [sd = 163]
[laser040:49950] [[53382,0],0]->[[53382,1],21] mca_oob_tcp_msg_send_handler: writev failed: Connection reset by peer (104) [sd = 154]
--------------------------------------------------------------------------
mpirun has exited due to process rank 128 with PID 15358 on
node laser045 exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[laser040:49950] 4 more processes have sent help message help-mpi-btl-openib-cpc-base.txt / ibv_create_qp failed
[laser040:49950] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
[laser040:49950] 4 more processes have sent help message help-mpi-errors.txt / mpi_errors_are_fatal

РЕДАКТИРОВАТЬ добавил исходный код всего ко всем шаблонам связи:

// Send data to all other ranks
for(unsigned i = 0; i < (unsigned)size; ++i){
    if((unsigned)rank == i){
        continue;
    }

    MPI_Request request;
    MPI_Issend(&data, dataSize, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &request);
    requests.push_back(request);
}

// Recv data from all other ranks
for(unsigned i = 0; i < (unsigned)size; ++i){
    if((unsigned)rank == i){
       continue;
    }

    MPI_Status status;
    MPI_Recv(&recvData, recvDataSize, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &status);
}

// Finish communication operations
for(MPI_Request &r: requests){
    MPI_Status status;
    MPI_Wait(&r, &status);
}

Есть ли что-то, что я могу сделать как пользователь кластера или какие-то советы, которые я могу дать администратору кластера?


person erikzenker    schedule 26.10.2014    source источник
comment
Вы должны предоставить исходный код. У нас нет хрустального шара. Увы, мы даже не знаем язык программирования, которым вы пользуетесь.   -  person Vladimir F    schedule 26.10.2014
comment
Есть ли причина, по которой вы не используете MPI_Alltoallv вместо этого?   -  person Hristo Iliev    schedule 27.10.2014
comment
Этот код MPI сравнивается с другой коммуникационной библиотекой, которая не поддерживает коллективную работу всех со всеми.   -  person erikzenker    schedule 27.10.2014


Ответы (2)


Ошибка связана с размером буфера очередей сообщений mpi, прокомментированных здесь:

http://www.open-mpi.org/faq/?category=openfabrics#ib-xrc

Следующая настройка среды решила мою проблему:

$ export OMPI_MCA_btl_openib_receive_queues="P,128,256,192,128:S,65536,256,192,128"

person erikzenker    schedule 27.10.2014
comment
Попробуйте использовать родной интерфейс QLogic PSM, указав следующие параметры MCA для mpiexec: --mca pml cm --mca mtl psm. Он должен работать даже лучше, чем API глаголов IB. - person Hristo Iliev; 31.10.2014

Строка ошибки mca_oob_tcp_msg_send_handler может указывать на то, что узел, соответствующий принимающему рангу, умер (недостаточно памяти или получил SIGSEGV):

http://www.open-mpi.org/faq/?category=tcp#tcp-connection-errors

OOB (внеполосная) структура в Open-MPI используется для управляющих сообщений, а не для сообщений ваших приложений. Действительно, сообщения обычно проходят через уровни передачи байтов (BTL), такие как self, sm, vader, openib (Infiniband) и т. д.

Вывод 'ompi_info -a' полезен в этом отношении.

Наконец, в вопросе не указано, является ли поставщиком оборудования Infiniband Mellanox, поэтому опция XRC может не работать (например, Intel/QLogic Infiniband не поддерживает эту опцию).

person sebhtml    schedule 31.10.2014
comment
Ошибка OOB возникает из-за laser040 после того, как несколько рангов умерли из-за невозможности создать новые QP IB. InfiniBand HCA, очевидно, принадлежит QLogic с именем qib0. - person Hristo Iliev; 31.10.2014