У меня есть recently installed открытый MPI на двух хостах Ubuntu 14.04, и теперь я тестирую его функциональность с двумя предоставленными тестовыми функциями hello_c и ring_c. Хосты называются «hermes» и «zeus», и у них обоих есть пользовательский «mpiuser» для входа в систему не интерактивно (через ssh-agent).open MPI - ring_c на нескольких хостах не работает
Функции mpirun hello_c
и mpirun --host hermes,zeus hello_c
оба исправно работают.
Вызов функции mpirun --host zeus ring_c
локально также работает. Выход для обоих Гермеса и ЗЕВС:
[email protected]:/opt/openmpi-1.6.5/examples$ mpirun --host zeus ring_c
Process 0 sending 10 to 0, tag 201 (1 processes in ring)
Process 0 sent to 0
Process 0 decremented value: 9
Process 0 decremented value: 8
Process 0 decremented value: 7
Process 0 decremented value: 6
Process 0 decremented value: 5
Process 0 decremented value: 4
Process 0 decremented value: 3
Process 0 decremented value: 2
Process 0 decremented value: 1
Process 0 decremented value: 0
Process 0 exiting
Но вызов функции mpirun --host zeus,hermes ring_c
терпит неудачу и дает следующий результат:
[email protected]:/opt/openmpi-1.6.5/examples$ mpirun --host hermes,zeus ring_c
Process 0 sending 10 to 1, tag 201 (2 processes in ring)
[zeus:2930] *** An error occurred in MPI_Recv
[zeus:2930] *** on communicator MPI_COMM_WORLD
[zeus:2930] *** MPI_ERR_TRUNCATE: message truncated
[zeus:2930] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
Process 0 sent to 1
--------------------------------------------------------------------------
mpirun has exited due to process rank 1 with PID 2930 on
node zeus 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).
--------------------------------------------------------------------------
Я не нашел никаких документов о том, как решить такую проблему, и я не» t есть подсказка, где искать ошибку на основе вывода ошибки. Как я могу это исправить?
'mpirun -n 2 ring_c' на том же хосте работает. Но я предполагаю, что нашел ошибку. Переменные среды были неправильными: 'ssh user @ IP env' не показывал мне правильные $ PATH и $ LD_LIBRARY_PATH. Поэтому я попробовал его с помощью 'mpirun -prefix/opt/openmpi -host hermes, zeus ring_c', и это сработало. Поэтому я должен выяснить, каков правильный способ экспорта переменных. – ViggieSmalls