여러 개의 프로세스가있는 단일 시스템에서 mpi 프로그램을 실행할 수 있지만 여러 시스템에서는 실행할 수 없습니다. 호스트의 프로세스 수를 다음과 같이 지정하는 "컴퓨터"파일이 있습니다.
localhost:6
another_host:4
아래에 세 가지 예를 들었습니다.
// When I run the program on only localhost, everything is OK.
mpirun -n 10 ./myMpiProg parameter1 parameter2
// In this case, everything is OK, too.
mpirun -f machinesFile -n 10 ./myMpiProg parameter1 parameter2
// This is also OK
mpirun -n 8 ./myMpiProg parameter1 parameter2
다음과 같이 컴퓨터 파일을 변경했을 때 :
localhost:6
another_host:2
...
// But this does not work.
mpirun -f machinesFile -n 8 ./myMpiProg parameter1 parameter2
분산 환경에서 프로그램을 실행할 때 아래와 같은 오류가 발생합니다. 더 흥미로운 점은 항상 8 개 프로세스, 12 개 프로세스와 같은 일부 배포에서 발생합니다. 그리고 그것은 10 개의 프로세스로 발생하지 않습니다.
terminate called after throwing an instance of 'std::length_error' what(): vector::reserve
그렇다면 단일 시스템에서 mpi 프로그램을 실행하는 것과 여러 시스템에서 실행하는 것 사이에 차이점이 있습니까?
우연히 문제를 발견했지만 여전히 이유를 모릅니다. isend 요청을 벡터에 저장하면 모든 것이 정상입니다. 하지만 저장하지 않으면 오류가 나타납니다. 때로는 std :: length :: error이고 때로는 아래와 같이 더 길기도합니다.
제가 언급 할 수있는 코드는 https://stackoverflow.com/a/33375285/2979477 에서 찾을 수 있습니다 . 이 줄을 변경하면 :
mpiSendRequest.push_back(world.isend(neighbors[j], 100, *p));
같이:
world.isend(neighbors[j], 100, *p);
오류가 나타납니다. 이해가 안되지만 합리적인 설명이있을 수 있습니다.
에러 메시지:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::mpi::exception> >'
what(): MPI_Alloc_mem: Unable to allocate memory for MPI_Alloc_mem, error stack:
MPI_Alloc_mem(115): MPI_Alloc_mem(size=1600614252, MPI_INFO_NULL, baseptr=0x7fffbb499e90) failed
MPI_Alloc_mem(96).: Unable to allocate memory for MPI_Alloc_mem
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::mpi::exception> >'
what(): MPI_Alloc_mem: Unable to allocate memory for MPI_Alloc_mem, error stack:
MPI_Alloc_mem(115): MPI_Alloc_mem(size=1699946540, MPI_INFO_NULL, baseptr=0x7fffdad0ee10) failed
MPI_Alloc_mem(96).: Unable to allocate memory for MPI_Alloc_mem
[proxy:0:1@mpi_notebook] HYD_pmcd_pmip_control_cmd_cb (./pm/pmiserv/pmip_cb.c:928): assert (!closed) failed
[proxy:0:1@mpi_notebook] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
[proxy:0:1@mpi_notebook] main (./pm/pmiserv/pmip.c:226): demux engine error waiting for event
=====================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= EXIT CODE: 134
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
=====================================================================================
APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다