type map
является важной, но запутанной концепцией в MPI. Я хотел бы, чтобы программа отображала или печатала карту типа для меня.
Например (взято из стандарта MPI-3),
MPI_TYPE_CREATE_RESIZED(MPI_INT, -3, 9, type1)
приводит к типу карты
{(lb_marker, -3), (int, 0), (ub_marker, 6)}.
Повторите этот тип:
MPI_TYPE_CONTIGUOUS(2, type1, type2)
и карта-карта
{(lb_marker, -3), (int, 0), (int,9), (ub_marker, 15)}
Мне бы хотелось, чтобы он автоматически отображал эту типовую карту.
Конечно, можно использовать MPI_Type_get_contents
и MPI_Type_get_envelope
и рекурсивно спускаться до тех пор, пока не нажмете встроенные типы. Это скорее гигантская боль, и я бы подумал, что 20 лет на каком-то инструменте будет существовать, чтобы сделать это для меня.
Некоторые инструменты, которые перспективны, но не совсем работают:
-
Я нашел MPImap от ~ 2001 здесь. Во-первых, он должен быть обновлен для современных Tcl/TK, исправлен для устранения некоторых ошибок памяти и после этого; вы получаете невосприимчивый графический интерфейс. Вместо этого я ищу библиотеку/подпрограмму, которую я могу вызвать во время выполнения.
-
MPIDU_Datatype_deubg
- это типичная внутренняя процедура сбрасывания типа MPICH. Он не отображает карту типа (он отображает представление dataloop, снова закрывается) -
Когда-то был отладчик под названием XMPI, который перечисляет среди своих возможностей возможность отображения карты типа MPI. Этот отладчик определен как LAM-MPI и не использует get_contents/get_envelope.