МОЛОДЕЖНАЯ ШКОЛА « Суперкомпьютерные технологии в науке, промышленности и образовании» ННГУ им. Н.И. Лобачевского, Нижний Новгород, 26-31 октября 2009.

Презентация:



Advertisements
Похожие презентации
ЦИФРЫ ОДИН 11 ДВА 2 ТРИ 3 ЧЕТЫРЕ 4 ПЯТЬ 5 ШЕСТЬ 6.
Advertisements

Фрагмент карты градостроительного зонирования территории города Новосибирска Масштаб 1 : 4500 к решению Совета депутатов города Новосибирска от
Масштаб 1 : Приложение 1 к решению Совета депутатов города Новосибирска от _____________ ______.
Масштаб 1 : Приложение 1 к решению Совета депутатов города Новосибирска от
27 апреля группадисциплина% ДЕ 1МП-12Английский язык57 2МП-34Экономика92 3МП-39Психология и педагогика55 4МП-39Электротехника и электроника82 5П-21Информатика.
© 2002, Cisco Systems, Inc. All rights reserved. AWLF 3.0Module 7-1 © 2002, Cisco Systems, Inc. All rights reserved.
Работа учащегося 7Б класса Толгского Андрея. Каждое натуральное число, больше единицы, делится, по крайней мере, на два числа: на 1 и на само себя. Если.
1 Знаток математики Тренажер Таблица умножения 2 класс Школа 21 века ®м®м.
Таблица умножения на 8. Разработан: Бычкуновой О.В. г.Красноярск год.
27 апреля группадисциплина% ДЕ 1МП-12Английский язык57 2МП-34Экономика92 3МП-39Психология и педагогика55 4МП-39Электротехника и электроника82 5П-21Информатика.
Д. Дуброво д. Бортниково с. Никульское д. Подлужье д. Бакунино пос. Радужный - Песчаный карьер ООО ССП «Черкизово» - Граница сельского поселения - Граница.
© 2009 Avaya Inc. All rights reserved.1 Chapter Three, Voic Pro Advanced Functions Module Four – Voic Campaigns.
© 2006 Cisco Systems, Inc. All rights reserved. CIPT1 v Deployment of Cisco Unified CallManager Release 5.0 Endpoints Configuring Cisco Unified CallManager.

О РЕЗУЛЬТАТАХ ПРОВЕДЕНИЯ НЕЗАВИСИМОЙ ОЦЕНКИ КАЧЕСТВА ОБУЧЕНИЯ В РАМКАХ ОЦП «Р АЗВИТИЕ ИНФОРМАЦИОННОГО ОБЩЕСТВА, ИСПОЛЬЗОВАНИЕ ИНФОРМАЦИОННЫХ ТЕХНОЛОГИЙ,
Курсы повышения квалификации (общие показатели в %)
OLAP ModelKit is a universal solution in the field of interactive reporting and thorough data analysis which allows programmers to create effective decision-support.
Рейтинг территорий с преимущественно городским населением по уровню преступности в 2008 году 1ЗАТО «Звездный»33,10 2Гремячинский230,00 3г. Кунгур242,00.
Kurochkin I.I., Prun A.I. Institute for systems analysis of RAS Centre for grid-technologies and distributed computing GRID-2012, Dubna, Russia july.
Результаты работы 5а класса Кл. руководитель: Белобородова Н. С. Показатель 0123 Обучаемость 1-6%4-25%8-50%3-18 Навыки смыслового чтения 1-6%12-75%3-18%
Транксрипт:

МОЛОДЕЖНАЯ ШКОЛА « Суперкомпьютерные технологии в науке, промышленности и образовании» ННГУ им. Н.И. Лобачевского, Нижний Новгород, октября 2009 г. КОНСОРЦИУМ УНИВЕРСИТЕТОВ РОССИИ « Есть ли жизнь после MPI? » Абрамов С.М. д.ф.-м.н., чл.-корр. РАН, ИПС имени А.К.Айламазяна РАН

Институт программных систем имени А.К.Айламазяна РАН Абрамов С.М., Климов А.В., Лацис А.О., Московский А.А. ИПС имени А.К.Айламазяна РАН ИПМ имени М.В.Келдыша РАН Доклад , Нижний Новгород Есть ли жизнь после MPI? 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 2

Институт программных систем имени А.К.Айламазяна РАН Переславль-Залесский. Институт программных систем имени А.К.Айламазяна Российской академии наук 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 3

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Переславль-Залесский Красивый старинный (860 лет) город России на берегу Плещеева озера Красивый старинный (860 лет) город России на берегу Плещеева озера Центр Золотого кольца Центр Золотого кольца Родина Св.Александра Невского, родина многих великих князей Родина Св.Александра Невского, родина многих великих князей Здесь Петр Великий создавал свою первую «потешную флотилию» место рождения Российского флота Здесь Петр Великий создавал свою первую «потешную флотилию» место рождения Российского флота Древний центр Российской Православной Церкви Древний центр Российской Православной Церкви Москва Переславль- Залесский 120 км 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 4

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» ИПС имени А.К.Айламазяна РАН, Переславль-Залесский 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 5

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Основание Института Основан в 1984 году по постановлению ВПК для развития информатики и вычислительной техники в стране Первый директор (1984–2003) проф. А.К.Айламазян В декабре 2008 Институту присвоено имя А.К.Айламазяна 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 6

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» 2009: Организационная структура института Исследовательский центр искусственного интеллекта Исследовательский центр медицинской информатики Исследовательский центр мультипроцессорных систем Исследовательский центр системного анализа Исследовательский центр процессов управления Научно-образовательный центр Международный детский компьютерный лагерь (МДКЦ) имени А.К.Айламазяна 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 7

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Университет города Переславля имени А.К.Айламазяна 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 8

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Программы «СКИФ» и «СКИФ-ГРИД» Заказчики-координаторы НАН Беларуси Агентство «Роснаука» Головные исполнители Объединенный институт проблем информатики НАН Беларуси Институт программных систем РАН Исполнители «СКИФ» организаций Беларуси и России «СКИФ-ГРИД» организаций Беларуси и России : 5 суперЭВМ семейства «СКИФ» в рейтинге Top500 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 9

Семейство суперЭВМ «СКИФ»: Ряды 1, 2, 3 и 4 Ряд 1 Ряд 2 Ряд 3 Ряд Gflops СКИФ К Gflops СКИФ К Gflops Первенец-М 26 Gflops ВМ Gflops Первенец Tflops СКИФ МГУ 12.2 Tflops СКИФ Урал 9 Тflops СКИФ Cyberia 1 кв.2012 СКИФ П~5.0 3 кв СКИФ П кв СКИФ П-0.5 Сделано: Ряды 1–3 Ближайшие планы: Ряд 4 Linpack 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 10

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» 2002 июнь МВС 1000M 0.734/1.024 TFlops 2003 ноябрь СКИФ К /0.717 TFlops 2004 ноябрь СКИФ К /2.534 TFlops 2007 февраль СКИФ Cyberia 9.013/ TFlops 2008 май СКИФ Урал 12.2/15.9 TFlops 2008 май СКИФ МГУ 47.1/60 TFlops За все время только шесть созданных в России суперЭВМ вошли в Top500. Пять из шестиСКИФы! 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 11

Институт программных систем имени А.К.Айламазяна РАН Что затрудняет эффективное использование MPI в суперЭВМ ближайшего будущего? 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 12

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Проблемы MPI Рост числа процессоров (и ядер) в суперЭВМ будет продолжаться Сегодня 1 Pflops 20,000 CPU 80,000 ядер Установки с 1,000,000 ядрами появятся очень скоро Трудности эффективной реализации MPI для гигантского числа вычислительных узлов да еще и многоядерных! Трудности эффективного использования программистами MPI для случая гигантского числа вычислительных узлов Есть разрыв между тем, что реализует аппаратура (SMP + односторонние обмены) и тем, что имеется в MPI (двусторонние обмены, рандеву на канале) Проблемы серьезны, возможно «вымирание» MPI 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 13

Институт программных систем имени А.К.Айламазяна РАН Т-система: автоматическое динамическое распараллеливание программ 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 14

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Т-система (неформально) Функциональная модель + императивное описание тела функции Арность и коарность функций Готовые и неготовые значения Вызов Т-функции порождение процесса Можно копировать неготовые значения, в том числе и передавать их как результат Любые иные операции с неготовым значением приводит к «засыпанию» процесса на данной Т-переменной Побудка будет, когда Т-переменная примет готовое значение Состояние вычисления: сеть из процессов (ребра отношение «поставщик-потребитель»), процесс исполнения: автотрансформация данной сети 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 15

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 16 a6a6 b5b5 c3c3 d9d9 uvw F … d = G(a, b) b = d u = a d = c v = a w = b …

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 17 a6a6 b5b5 c3c3 d uvw F … d = G(a, b) b = d u = a d = c v = a w = b … 65 G

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 18 a6a6 bc3c3 d uvw F … d = G(a, b) b = d u = a d = c v = a w = b … 65 G

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 19 a6a6 bc3c3 d uvw F 6 … d = G(a, b) b = d u = a d = c v = a w = b … 65 G

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 20 a6a6 bc3c3 d3d3 uvw F 6 … d = G(a, b) b = d u = a d = c v = a w = b … 65 G

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 21 a6a6 bc3c3 d3d3 uvw F 6 … d = G(a, b) b = d u = a d = c v = a w = b … 65 G

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 22 a6a6 bc3c3 d3d3 uvw F 6 … d = G(a, b) b = d u = a d = c v = a w = b … 65 G

2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд G

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.24 T-System History Mid-80-ies Basic ideas of T-System Mid-80-ies Basic ideas of T-System 1990-ies First implementation of T-System 1990-ies First implementation of T-System , SKIF GRACE Graph Reduction Applied to Cluster Environment , SKIF GRACE Graph Reduction Applied to Cluster Environment 2003-current, SKIF Cooperation with Microsoft Open TS Open T-system 2003-current, SKIF Cooperation with Microsoft Open TS Open T-system

Program Systems Institute Russian Academy of Sciences25 Open TS Overview

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.26 Comparison: T-System and MPI C/Fortran T-System Assembler MPI High-level a few keywords Low-level hundred(s) primitives SequentialParallel

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.27 T-System in Comparison Related work Open TS differentiator Charm++ FP-based approach UPC, mpC++ Implicit parallelism Glasgow Parallel Haskell Allows C/C++ based low- level optimization OMPC++ Provides both language and C++ templates library Cilk Supports SMP, MPI, PVM, and GRID platforms

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.28 Open TS: an Outline High-performance computing High-performance computing Automatic dynamic parallelization Automatic dynamic parallelization Combining functional and imperative approaches, high-level parallel programming Combining functional and imperative approaches, high-level parallel programming Т++ language: Parallel dialect of C++ an approach popular in 90-ies Т++ language: Parallel dialect of C++ an approach popular in 90-ies

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.29 Т-Approach Pure functions (tfunctions) invocations produce grains of parallelism Pure functions (tfunctions) invocations produce grains of parallelism T-Program is T-Program is Functional – on higher level Functional – on higher level Imperative – on low level (optimization) Imperative – on low level (optimization) C-compatible execution model C-compatible execution model Non-ready variables, Multiple assignment Non-ready variables, Multiple assignment Seamless C-extension (or Fortran-extension) Seamless C-extension (or Fortran-extension)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.30 Т++ Keywords tfun Т-function tfun Т-function tval Т-variable tval Т-variable tptr Т-pointer tptr Т-pointer tout Output parameter (like &) tout Output parameter (like &) tdrop Make ready tdrop Make ready twait Wait for readiness twait Wait for readiness tct Т-context tct Т-context

Program Systems Institute Russian Academy of Sciences31 Short Introduction (Sample Programs)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.32 #include #include int fib (int n) { return n < 2 ? n : fib (n-1)+ fib (n-2); } int main (int argc, char **argv) { if (argc != 2) { printf("Usage: fib \n"); return 1; } int n = atoi(argv[1]); printf("fib(%d) = %d\n", n, fib(n)); return 0; } Sample Program (C++)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.33 #include #include tfun int fib (int n) { return n < 2 ? n : fib (n-1)+ fib (n-2); } tfun int main (int argc, char **argv) { if (argc != 2) { printf("Usage: fib \n"); return 1; } int n = atoi(argv[1]); printf("fib(%d) = %d\n", n, (int)fib(n)); return 0; } Sample Program (T++)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.34 Sample Program (T++) WinCCS cluster, 4 nodes WinCCS cluster, 4 nodes CPU: AMD Athlon 64 X2 Dual Core Processor GHz CPU: AMD Athlon 64 X2 Dual Core Processor GHz Gigabit Ethernet Gigabit Ethernet time% = time tapp (N)/timet app (1) time% = time tapp (N)/timet app (1) CoE = 1/(n×time%) CoE = 1/(n×time%) CPU Cores

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.35 Approximate calculation of Pi (C++) #include #include double isum(double begin, double finish, double d) { double dl = finish - begin; double dl = finish - begin; double mid = (begin + finish) / 2; double mid = (begin + finish) / 2; if (fabs(dl) > d) if (fabs(dl) > d) return isum(begin, mid, d) + isum(mid, finish, d); return isum(begin, mid, d) + isum(mid, finish, d); return f(mid) * dl; return f(mid) * dl;} double f(double x) { return 4/(1+x*x); return 4/(1+x*x);} int main(int argc, char* argv[]){ unsigned long h; unsigned long h; double a, b, d, sum; double a, b, d, sum; if (argc < 2) {return 0;} if (argc < 2) {return 0;} a = 0; b = 1; h = atol(argv[1]); a = 0; b = 1; h = atol(argv[1]); d = fabs(b - a) / h; d = fabs(b - a) / h; sum = isum(a, b, d); sum = isum(a, b, d); printf("PI is approximately %15.15lf\n", sum); printf("PI is approximately %15.15lf\n", sum); return 0; return 0;}

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.36 Approximate calculation of Pi (T++) #include #include tfun double isum(double begin, double finish, double d) { double dl = finish - begin; double dl = finish - begin; double mid = (begin + finish) / 2; double mid = (begin + finish) / 2; if (fabs(dl) > d) if (fabs(dl) > d) return isum(begin, mid, d) + isum(mid, finish, d); return isum(begin, mid, d) + isum(mid, finish, d); return (double)f(mid) * dl; return (double)f(mid) * dl;} tfun double f(double x) { return 4/(1+x*x); return 4/(1+x*x);} tfun int main(int argc, char* argv[]){ unsigned long h; unsigned long h; double a, b, d, sum; double a, b, d, sum; if (argc < 2) {return 0;} if (argc < 2) {return 0;} a = 0; b = 1; h = atol(argv[1]); a = 0; b = 1; h = atol(argv[1]); d = fabs(b - a) / h; d = fabs(b - a) / h; sum = isum(a, b, d); sum = isum(a, b, d); printf("PI is approximately %15.15lf\n", sum); printf("PI is approximately %15.15lf\n", sum); return 0; return 0;}

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.37 Calculation of Pi (T++) WinCCS cluster, 4 nodes WinCCS cluster, 4 nodes CPU: AMD Athlon 64 X2 Dual Core Processor GHz CPU: AMD Athlon 64 X2 Dual Core Processor GHz Gigabit Ethernet Gigabit Ethernet time% = time tapp (N)/timet app (1) time% = time tapp (N)/timet app (1) CoE = 1/(n×time%) CoE = 1/(n×time%) CPU Cores

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.38 Map-ReduceMap-Reduce Original Message From: Alexy Maykov Sent: Monday, October 02, :58 PM Subject: MCCS projects … I work in Microsoft Live Labs … I have several questions below: 1.How would you implement Map-Reduce in OpenTS? … Alexy MaykovAlexy Maykov

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.39 Map-Reduce (C++) #include #include using namespace std; int fib (int n) { return (n < 2) ? n : fib(n-1) + fib(n-2); return (n < 2) ? n : fib(n-1) + fib(n-2);} int plus (int val1, int val2) { return val1 + val2; return val1 + val2;} int main (int argc, char *argv[ ]) { const int factor = 23; const int factor = 23; const int vector_size = 40; const int vector_size = 40; vector a, b, c; vector a, b, c; vector fa, fb; vector fa, fb; cout

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.40 Map-Reduce (C++) #include #include using namespace std; int fib (int n) { return (n < 2) ? n : fib(n-1) + fib(n-2); return (n < 2) ? n : fib(n-1) + fib(n-2);} int plus (int val1, int val2) { return val1 + val2; return val1 + val2;} int main (int argc, char *argv[ ]) { const int factor = 23; const int factor = 23; const int vector_size = 40; const int vector_size = 40; vector a, b, c; vector a, b, c; vector fa, fb; vector fa, fb; cout

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.41 Map-Reduce (C++) #include #include using namespace std; int fib (int n) { return (n < 2) ? n : fib(n-1) + fib(n-2); return (n < 2) ? n : fib(n-1) + fib(n-2);} int plus (int val1, int val2) { return val1 + val2; return val1 + val2;} int main (int argc, char *argv[ ]) { const int factor = 23; const int factor = 23; const int vector_size = 40; const int vector_size = 40; vector a, b, c; vector a, b, c; vector fa, fb; vector fa, fb; cout

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.42 Map-Reduce (C++) #include #include using namespace std; int fib (int n) { return (n < 2) ? n : fib(n-1) + fib(n-2); return (n < 2) ? n : fib(n-1) + fib(n-2);} int plus (int val1, int val2) { return val1 + val2; return val1 + val2;} int main (int argc, char *argv[ ]) { const int factor = 23; const int factor = 23; const int vector_size = 40; const int vector_size = 40; vector a, b, c; vector a, b, c; vector fa, fb; vector fa, fb; cout

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.43 Map-Reduce (C++) #include #include using namespace std; int fib (int n) { return (n < 2) ? n : fib(n-1) + fib(n-2); return (n < 2) ? n : fib(n-1) + fib(n-2);} int plus (int val1, int val2) { return val1 + val2; return val1 + val2;} int main (int argc, char *argv[ ]) { const int factor = 23; const int factor = 23; const int vector_size = 40; const int vector_size = 40; vector a, b, c; vector a, b, c; vector fa, fb; vector fa, fb; cout

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.44 Map-Reduce (T++) #include #include using namespace std; tfun int fib (int n) { return (n < 2) ? n : fib(n-1) + fib(n-2); return (n < 2) ? n : fib(n-1) + fib(n-2);} tfun int plus (int val1, int val2) { return val1 + val2; return val1 + val2;} tfun int main (int argc, char *argv[ ]) { const int factor = 23; const int factor = 23; const int vector_size = 40; const int vector_size = 40; vector a, b, c; vector a, b, c; vector fa, fb; vector fa, fb; cout

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.45 Map-Reduce (T++): Laziness Filling, mapping all T-functions are invoked, no T-Functions calculated: 0 seconds Calculating of all T-functions, printing out: 8 seconds

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.46 Map-Reduce (T++) WinCCS cluster, 4 nodes WinCCS cluster, 4 nodes CPU: AMD Athlon 64 X2 Dual Core Processor GHz CPU: AMD Athlon 64 X2 Dual Core Processor GHz Gigabit Ethernet Gigabit Ethernet time% = time tapp (N)/timet app (1) time% = time tapp (N)/timet app (1) CoE = 1/(n×time%) CoE = 1/(n×time%) CPU Cores

Program Systems Institute Russian Academy of Sciences47 Inside OpenTS

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.48 Open TS: Environment Supports more then 1,000,000 threads per core

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.49 SupermemorySupermemory Utilization: non-ready values, resource and status information, etc. Utilization: non-ready values, resource and status information, etc. Object-Oriented Distributed shared memory (OO DSM) Object-Oriented Distributed shared memory (OO DSM) Global address space Global address space DSM-cell versioning DSM-cell versioning On top - automatic garbage collection On top - automatic garbage collection

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.50 Multithreading & Communications Lightweight threads Lightweight threads PIXELS ( threads) PIXELS ( threads) Asynchronous communications Asynchronous communications A thread A asks non-ready value (or new job) A thread A asks non-ready value (or new job) Asynchronous request sent: Active messages & Signals delivery over network to stimulate data transfer to the thread A Asynchronous request sent: Active messages & Signals delivery over network to stimulate data transfer to the thread A Context switches (including a quant for communications) Context switches (including a quant for communications) Latency Hiding for node-node exchange Latency Hiding for node-node exchange

Program Systems Institute Russian Academy of Sciences51 Open TS applications (selected)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.52 MultiGen Chelyabinsk State University Level 0 Level 1 Level 2 Multi-conformation model К0 К11К12 К21 К22

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.53 MultiGen: Speedup SubstanceAtom number Rotations number ConformersExecution time (min.:с) 1 node4 nodes16 nodes NCI :333:211:22 TOSLAB A :2739:2316:09 NCI :1995:5734:48 National Cancer Institute USA Reg.No. NCI (AIDS drug lead) TOSLAB company (Russia-Belgium) Reg.No. TOSLAB A (antiphlogistic drug lead) National Cancer Institute USA Reg.No. NCI (AIDS drug lead)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.54 Aeromechanics Institute of Mechanics, MSU

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.55 Belocerkovskis approach flow presented as a collection of small elementary whirlwind (colours: clockwise and contra-clockwise rotation)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.56 Creating space-born radar image from hologram Space Research Institute Development

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.57 Simulating broadband radar signal Graphical User Interface Non-PSI RAS development team (Space research institute of Khrunichev corp.)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.58 Landsat Image Classification Computational web-service Computational web-service

Program Systems Institute Russian Academy of Sciences59 Open TS vs. MPI case study

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.60 ApplicationsApplications Popular and widely used Popular and widely used Developed by independent teams (MPI experts) Developed by independent teams (MPI experts) PovRay – Persistence of Vision Ray-tracer, enabled for parallel run by a patch PovRay – Persistence of Vision Ray-tracer, enabled for parallel run by a patch ALCMD/MP_lite – molecular dynamics package (Ames Lab) ALCMD/MP_lite – molecular dynamics package (Ames Lab)

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.61 T-PovRay vs. MPI PovRay: code complexity Program Source code volume MPI modules for PovRay 3.10g 1,500 lines MPI patch for PovRay 3.50c 3,000 lines T++ modules (for both versions 3.10g & 3.50c) 200 lines 200 lines ~715 times

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.62 T-PovRay vs. MPI PovRay: performance 2CPUs AMD Opteron GHz RAM 4GB, GigE, LAM 7.1.1

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.63 T-PovRay vs MPI PovRay: performance 2CPUs AMD Opteron GHz RAM 4GB, GigE, LAM 7.1.1

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.64 ALCMD/MPI vs ALCMD/OpenTS MP_Lite component of ALCMD rewritten in T++ MP_Lite component of ALCMD rewritten in T++ Fortran code is left intact Fortran code is left intact

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.65 ALCMD/MPI vs ALCMD/OpenTS : code complexity Program Source code volume MP_Lite total/MPI ~20,000 lines MP_Lite,ALCMD-related/ MPI ~3,500 lines MP_Lite,ALCMD-related/ OpenTS 500 lines 500 lines ~7 times

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.66 ALCMD/MPI vs ALCMD/OpenTS: performance 16 dual Athlon 1800, AMD Athlon MP RAM 1GB, FastEthernet, LAM 7.0.6, Lennard-Jones MD, atoms

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.67 ALCMD/MPI vs ALCMD/OpenTS: performance 2CPUs AMD Opteron GHz RAM 4GB, GigE, LAM 7.1.1, Lennard-Jones MD, atoms

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.68 ALCMD/MPI vs ALCMD/OpenTS: performance 2CPUs AMD Opteron GHz RAM 4GB, InfiniBand,MVAMPICH 0.9.4, Lennard-Jones MD, atoms

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.69 ALCMD/MPI vs ALCMD/OpenTS: performance 2CPUs AMD Opteron GHz RAM 4GB, GigE, LAM 7.1.1, Lennard-Jones MD, atoms

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.70 ALCMD/MPI vs ALCMD/OpenTS: performance 2CPUs AMD Opteron GHz RAM 4GB, InfiniBand,MVAMPICH 0.9.4, Lennard-Jones MD, atoms

Program Systems Institute Russian Academy of Sciences71 Porting OpenTS to MS Windows CCS

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing : contract with Microsoft Porting OpenTS to Windows Compute Cluster Server inherits all basic features of the original Linux version inherits all basic features of the original Linux version is available under FreeBSD license is available under FreeBSD license does not require any commercial compiler for T-program development its only enough to install VisualC Express Edition (available for free on Microsoft website) and PSDK does not require any commercial compiler for T-program development its only enough to install VisualC Express Edition (available for free on Microsoft website) and PSDK

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.73 AMD64 and x86 platforms are currently supported AMD64 and x86 platforms are currently supported Integration into Microsoft Visual Studio 2005 Integration into Microsoft Visual Studio 2005 Two ways for building T-applications: command line and Visual Studio IDE Two ways for building T-applications: command line and Visual Studio IDE An installer of OpenTS for Windows XP/2003/WCCS An installer of OpenTS for Windows XP/2003/WCCS Installation of WCCS SDK (including MS-MPI), if necessary Installation of WCCS SDK (including MS-MPI), if necessary OpenTS self-testing procedure OpenTS self-testing procedure

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.74 Installer of OpenTS for Windows XP/2003/WCCS

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.75 OpenTS integration into Microsoft Visual Studio 2005

Program Systems Institute Russian Academy of Sciences76 Open TS Gadgets

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.77 Web-services, Live documents tfun int fib (int n) { return n < 2 ? n : fib(n-1)+fib(n-2); return n < 2 ? n : fib(n-1)+fib(n-2);} twsgen Perl script

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.78 Trace visualizer Collect trace of T-program execution Collect trace of T-program execution Visualize performance metrics of OpenTS runtime Visualize performance metrics of OpenTS runtime

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.79 Fault-toleranceFault-tolerance Recalculation based fault-tolerance Recalculation based fault-tolerance (+)Very simple (in comparison with full transactional model) (+)Efficient (only minimal set of damaged functions are recalculated) (–)Applicable only for functional programs Fault-tolerant communications needed (eg.: DMPI v1.0) Fault-tolerant communications needed (eg.: DMPI v1.0) Implemented (experimental version on Linux ) Implemented (experimental version on Linux )

Open TS: an advanced tool for parallel and distributed computing. Open TS: an advanced tool for parallel and distributed computing.80 Some other Gadgets Other T-languages: T-Refal, T-Fortan Other T-languages: T-Refal, T-Fortan Memoization Memoization Automatically choosing between call-style and fork-style of function invocation Automatically choosing between call-style and fork-style of function invocation Checkpointing Checkpointing Heartbeat mechanism Heartbeat mechanism Flavours of data references: normal, glue and magnetic lazy, eager and ultra-eager (speculative) data transfer Flavours of data references: normal, glue and magnetic lazy, eager and ultra-eager (speculative) data transfer

Институт программных систем имени А.К.Айламазяна РАН Full / Empty Bit (FEB) и Т-Система 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 81

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» FEB Модель вычисления: «общая память» легковесные нити FEB бит синхронизации на каждое слово Тонкости: фьючеры Аппаратная реализация: Cray XMT, MTA, T3D (2001 и далее) Программная реализация: Sandia National Laboratories: Qthreads 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 82

Институт программных систем имени А.К.Айламазяна РАН Монотонные объекты, как безопасное расширение функциональной модели 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 83

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Идеи расширения Монотонные объекты обладают свойством Черча- Россера Типичная жизнь монотонного объекта: Создание и инициализация объекта Поток обращений по обновлению («запись») и считыванию текущего состояния («чтение») Финализация и удаление объекта Примеры монотонных объектов (класса сумматоры) Примеры приложения с монотонным объектом Способы масштабируемой реализации монотонных объектов 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 84

Институт программных систем имени А.К.Айламазяна РАН Библиотеки односторонних обменов SHMEM, Gasnet, ARMCI 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 85

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Основные черты технологии SHMEM «Чужие» данные не обрабатываются на месте, а копируются предварительно туда, где они нужны как в MPI Преобладающий режим копирования – запись, возможно, мелкозернистая Синхронизация – барьерная Важны высокий message rate (например, для приложений со сложной организацией данных: неструктурных сеток и т.п.) низкая подлинная латентность (для снижения размера зерна параллелизма, независимо от того, сложно или просто организованы данные) Однородность доступа не важна Message rate можно обеспечить программно, грамотной буферизацией Низкую подлинную латентность может дать только аппаратура 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 86

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Технология SHMEM Рассчитана на полностью однородные многопроцессорные вычислители (общность системы команд, машинного представления чисел, одинаковая операционная система, один и тот же исполняемый файл) Программа на С, использующая SHMEM, должна включать файл заголовков shmem.h. shmem_init() инициализация my_pe() собственный номер процесса; num_pes() число процессов 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 87

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» SHMEM: Односторонние обмены put --- односторонняя запись в чужую память get --- одностороннее чтение из чужой памяти Поддержаны передачи данных разных типов, одного значения, сплошного массива или массива, расположенного в памяти с шагом (например, столбец двумерного массива в С) shmem_double_p( addr, value, pe ) shmem_float_put( addr, src, len, pe ) Можно обмениваться областями памяти статических (но не автоматических!) переменных. И даже поддержан специальный malloc 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 88

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» SHMEM: Операции синхронизации Возможность выполнить барьерную синхронизацию всех или лишь указанных процессов. При выполнении синхронизации гарантируется, что все выданные до барьера запросы типа put будут завершены. shmem_barrier_all() shmem_barrier( start, stride, size, sync ) step = 2 stride синхронизуются процессы с номерами start, strat+step, … strat+step*(size-1) sync рабочий массив (расписать нулями!) типа long, длиной _SHMEM_BARRIER_SYNC_SIZE 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 89

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Ожидание переменной shmem_wait( &var, value ) на «==» ожидание &var == value shmem_int_wait_until( &var, SHMEM_CMP_GT, value ) ожидание &var > value shmem_fence() гарантирует, что все выданные ранее из данного процесса запросы типа put будут завершены. 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 90

Институт программных систем имени А.К.Айламазяна РАН Модели PGAS (Partitioned Global Address Space), DSM (Distributed Shared Memory), языки Co-Array Fortran, UPC… 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 91

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Модель памяти Разделяемая (shared) память Любой процесс может использовать ее или указывать на нее Приватная память Только «локальный» процесс может использовать ее или указывать на нее 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 92

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Что такое UPC Unified Parallel C Расширение ANSI C примитивами задания явного параллелизма Основан на «distributed shared memory» Основные идеи Сохранить философию С: Программист умен и аккуратен Близость к железу (насколько возможно) для лучшей эффективности (но можно получить и проблемы) Простой и привычный синтаксис 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 93

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Модель исполнения Несколько процессов (нитей 0..THREADS-1) работают независимо MYTHREAD определяет номер процесса THREADS число процессов Когда необходимо для синхронизации используются Барьеры Блокировки Управление поведением памяти 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 94

ИПС имени А.К.Айламазяна РАН Программа «СКИФ-ГРИД» Пример 1 //vect_add.c #include #define N 100*THREADS shared int a[N], b[N], c[N]; void main(){ int i; for(i=0; i

Институт программных систем имени А.К.Айламазяна РАН Вместо заключения 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 96

Институт программных систем имени А.К.Айламазяна РАН Спасибо за внимание! 2 июля 2012 г.СКИФ-ГРИД © 2009 Все права защищеныСлайд 97