Hpc pack 2008 sdk sp2 для windows 10

В этой заметке показано как установить MPI, подключить его к Visual Studio, а затем использовать с заданными параметрами (числом вычислительных узлов). В статье используется Visual Studio 2015, т.к. именно с ней возникали проблемы у моих студентов (эта заметка написана студентами для студентов), однако вероятно инструкция подойдет и для других версий.

В этой заметке показано как установить MPI, подключить его к Visual Studio, а затем использовать с заданными параметрами (числом вычислительных узлов). В статье используется Visual Studio 2015, т.к. именно с ней возникали проблемы у моих студентов (эта заметка написана студентами для студентов), однако вероятно инструкция подойдет и для других версий.

Шаг 1:
Необходимо установить пакет HPC Pack 2008 SDK SP2 (в вашем случае может быть уже другая версия), доступный на официальном сайте Microsoft. Разрядность пакета и системы должны соответствовать.

Шаг 2:
Необходимо настроить пути, для этого переходим во вкладку Debug — Properties:

Далее во вкладке VC++ Directories необходимо прописать в поле Include Directories:

“C:Program FilesMicrosoft HPC Pack 2008 SDKInclude”

.

В поле Library Directories:

“C:Program FilesMicrosoft HPC Pack 2008 SDKLibamd64”

.

В поле с библиотеками, если стоит 32 разрядная версия, вместо amd64 нужно прописать i386.

Далее во вкладке Linker – Input в поле Additional Dependencies необходимо указать библиотеку

msmpi.lib

:

Шаг 3:

Для настройки запуска необходимо перейти во вкладку Debugging и в поле Command указать:

“C:Program FilesMicrosoft HPC Pack 2008 SDKBinmpiexec.exe”

.

В поле Command Arguments указать, например,

-n 4 $(TargetPath)

Число 4 указывает на количество процессов.

Для запуска программы необходимо подключить библиотеку

mpi.h

. Путь к проекту не должен содержать кириллицу. При возникновении ошибок можно воспользоваться Microsoft MPI, доступный по на сайте Microsoft.

Для этого после установки достаточно прописать в поле Command вкладки Debugging путь:

“C:Program FilesMicrosoft MPIBinmpiexec.exe”

Также перед запуском программы не забудьте указать её разрядность:

Пример запуска программы с MPI:

#include<mpi.h>
#include<iostream>
using namespace std;

int main(int argc, char **argv)
{
     int rank, size;
     MPI_Init(&argc, &argv);
     MPI_Comm_size(MPI_COMM_WORLD, &size);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     cout << "The number of processes: " << size << " my number is " << rank << endl;
     MPI_Finalize();
     return 0;
}

Работа программы на 2 узлах:

В соседней статье вы можете прочитать про установку MPI в Linux и настройку в CLion .

Содержание

  1. NVIDIA HPC SDK
  2. NVIDIA HPC SDK
  3. A Comprehensive Suite of Compilers, Libraries and Tools for HPC
  4. Why Use the NVIDIA HPC SDK?
  5. Performance
  6. Portability
  7. Productivity
  8. Support for Your Favorite Programming Languages
  9. C++17 Parallel Algorithms
  10. Fortran 2003 Compiler
  11. OpenACC Directives
  12. Key Features
  13. GPU Math Libraries
  14. Optimized for Tensor Cores
  15. Optimized for Your CPU
  16. Multi-GPU Programming
  17. Scalable Systems Programming
  18. Nsight Performance Profiling
  19. Deploy Anywhere
  20. What Users are Saying
  21. HPC Compilers Support Services
  22. Архив Windows SDK и эмуляторов
  23. Windows 10
  24. Предыдущие выпуски

NVIDIA HPC SDK

To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video.

NVIDIA HPC SDK

A Comprehensive Suite of Compilers, Libraries and Tools for HPC

The NVIDIA HPC Software Development Kit (SDK) includes the proven compilers, libraries and software tools essential to maximizing developer productivity and the performance and portability of HPC applications.

The NVIDIA HPC SDK C, C++, and Fortran compilers support GPU acceleration of HPC modeling and simulation applications with standard C++ and Fortran, OpenACC® directives, and CUDA®. GPU-accelerated math libraries maximize performance on common HPC algorithms, and optimized communications libraries enable standards-based multi-GPU and scalable systems programming. Performance profiling and debugging tools simplify porting and optimization of HPC applications, and containerization tools enable easy deployment on-premises or in the cloud. With support for NVIDIA GPUs and Arm, OpenPOWER, or x86-64 CPUs running Linux, the HPC SDK provides the tools you need to build NVIDIA GPU-accelerated HPC applications.

Why Use the NVIDIA HPC SDK?

Performance

Widely used HPC applications, including VASP, Gaussian, ANSYS Fluent, GROMACS, and NAMD, use CUDA, OpenACC, and GPU-accelerated math libraries to deliver breakthrough performance to their users. You can use these same software tools to GPU-accelerate your applications and achieve dramatic speedups and power efficiency using NVIDIA GPUs.

Portability

Build and optimize applications for over 99 percent of today’s Top500 systems, including those based on NVIDIA GPUs or x86-64, Arm or OpenPOWER CPUs. You can use drop-in libraries, C++17 parallel algorithms and OpenACC directives to GPU accelerate your code and ensure your applications are fully portable to other compilers and systems.

Productivity

Maximize science and engineering throughput and minimize coding time with a single integrated suite that allows you to quickly port, parallelize and optimize for GPU acceleration, including industry-standard communication libraries for multi-GPU and scalable computing, and profiling and debugging tools for analysis.

Support for Your Favorite Programming Languages

C++17 Parallel Algorithms

C++17 parallel algorithms enable portable parallel programming using the Standard Template Library (STL). The NVIDIA HPC SDK C++ compiler supports full C++17 on CPUs and offloading of parallel algorithms to NVIDIA GPUs, enabling GPU programming with no directives, pragmas, or annotations. Programs that use C++17 parallel algorithms are readily portable to most C++ implementations for Linux, Windows, and macOS.

Fortran 2003 Compiler

The NVIDIA Fortran compiler supports Fortran 2003 and many features of Fortran 2008. With support for OpenACC and CUDA Fortran on NVIDIA GPUs, and SIMD vectorization, OpenACC and OpenMP for multicore x86-64, Arm, and OpenPOWER CPUs, it has the features you need to port and optimize your Fortran applications on today’s heterogeneous GPU-accelerated HPC systems.

OpenACC Directives

NVIDIA Fortran, C, and, C++ compilers support OpenACC directive-based parallel programming for NVIDIA GPUs and multicore CPUs. Over 200 HPC application ports have been initiated or enabled using OpenACC, including production applications like VASP, Gaussian, ANSYS Fluent, WRF, and MPAS. OpenACC is the proven performance-portable directives solution for GPUs and multicore CPUs.

Key Features

GPU Math Libraries

The NVIDIA HPC SDK includes a suite of GPU-accelerated math libraries for compute-intensive applications. The cuBLAS and cuSOLVER libraries provide GPU-optimized and multi-GPU implementations of all BLAS routines and core routines from LAPACK, automatically using NVIDIA GPU Tensor Cores where possible. cuFFT includes GPU-accelerated 1D, 2D, and 3D FFT routines for real and complex data, and cuSPARSE provides basic linear algebra subroutines for sparse matrices. These libraries are callable from CUDA and OpenACC programs written in C, C++ and Fortran.

Optimized for Tensor Cores

NVIDIA GPU Tensor Cores enable scientists and engineers to dramatically accelerate suitable algorithms using mixed precision or double precision. The NVIDIA HPC SDK math libraries are optimized for Tensor Cores and multi-GPU nodes to deliver the full performance potential of your system with minimal coding effort. Using the NVIDIA Fortran compiler, you can leverage Tensor Cores through automatic mapping of transformational array intrinsics to the cuTENSOR library.

Optimized for Your CPU

Heterogeneous HPC servers use GPUs for accelerated computing and multicore CPUs based on the x86-64, OpenPOWER or Arm instruction set architectures. NVIDIA HPC compilers and tools are supported on all of these CPUs, and all compiler optimizations are fully enabled on any CPU that supports them. With uniform features, command-line options, language implementations, programming models, and tool and library user interfaces across all supported systems, the NVIDIA HPC SDK simplifies the developer experience in diverse HPC environments.

Multi-GPU Programming

The NVIDIA Collective Communications Library (NCCL) implements highly optimized multi-GPU and multi-node collective communication primitives using MPI-compatible all-gather, all-reduce, broadcast, reduce, and reduce-scatter routines to take advantage of all available GPUs within and across your HPC server nodes. NVSHMEM implements the OpenSHMEM standard for GPU memory and provides multi-GPU and multi-node communication primitives that can be initiated from a host CPU or GPU and called from within a CUDA kernel.

Scalable Systems Programming

MPI is the standard for programming distributed-memory scalable systems. The NVIDIA HPC SDK includes a CUDA-aware MPI library based on Open MPI with support for GPUDirect™ so you can send and receive GPU buffers directly using remote direct memory access (RDMA), including buffers allocated in CUDA Unified Memory. CUDA-aware Open MPI is fully compatible with CUDA C/C++, CUDA Fortran and the NVIDIA OpenACC compilers.

Nsight Performance Profiling

Nsight™ Systems provides system-wide visualization of application performance on HPC servers and enables you to optimize away bottlenecks and scale parallel applications across multicore CPUs and GPUs. Nsight Compute allows you to deep dive into GPU kernels in an interactive profiler for GPU-accelerated applications via a graphical or command-line user interface, and allows you to pinpoint performance bottlenecks using the NVTX API to directly instrument regions of your source code.

Deploy Anywhere

Containers simplify software deployment by bundling applications and their dependencies into portable virtual environments. The NVIDIA HPC SDK includes instructions for developing, profiling, and deploying software using the HPC Container Maker to simplify the creation of container images. The NVIDIA Container Runtime enables seamless GPU support in virtually all container frameworks, including Docker and Singularity.

What Users are Saying

“On Perlmutter, we need Fortran, C and C++ compilers that support all the programming models our users need and expect on NVIDIA GPUs and AMD EPYC CPUs — MPI, OpenMP, OpenACC, CUDA and optimized math libraries. The NVIDIA HPC SDK checks all of those boxes.”

– Nicholas Wright, NERSC Chief Architect

HPC Compilers Support Services

HPC Compiler Support Services provide access to NVIDIA technical experts, including:

  • Paid technical support for the NVFORTRAN, NVC++ and NVC compilers (NVCC excluded).
  • Help with installation and usage of NVFORTRAN, NVC++ and NVC compilers.
  • Confirmation of bug reports, prioritization of bug fixes above those from non-paid users.
  • Where possible, help with temporary workarounds for confirmed compiler bugs.
  • Access to release archives including both HPC SDK and legacy PGI packages.
  • For more details please refer to End Customer Terms & Conditions.

Архив Windows SDK и эмуляторов

В этом архиве содержатся выпуски и обновления пакета SDK для предыдущих версий платформ Windows и Windows Phone, а также выпуски эмулятора с поддержкой разработки и тестирования взаимодействия с пользователем на мобильных устройствах.

Последние выпуски Visual Studio и средств разработчика Windows 10 см. на странице Загружаемые файлы и инструменты для Windows 10.

Windows 10 версии 20H2 — это ограниченный набор функций для отдельных улучшений производительности и повышения качества. Разработчики должны знать об этом выпуске, но пока никаких действий не требуется.

Новый пакет Windows SDK для этой версии Windows выпущен не будет, так как в этом выпуске не вводятся новые API. Это означает, что нет необходимости вносить изменения в файлы проекта или задавать новую целевую версию Windows. Продолжайте использовать пакет Windows 10 SDK для Windows 10 (версия 2004). При указании целевой версии для приложения Windows версия Windows 10 (сборка 19041) по-прежнему является последней целевой версией.

Windows 10

Выпущено вместе с Windows 10, версия 2004. Включает служебные обновления 10.0.19041.685. Обновлено 16.12.20

  • Устранены непредсказуемые и трудно диагностируемые сбои при связывании как библиотек umbrella, так и собственных библиотек ОС (например, onecoreuap.lib и kernel32.lib).
  • Устранена проблема, препятствовавшая работе AppVerifier.
  • Устранена проблема, которая приводила к сбою WACK с сообщением «Задаче не удалось включить HighVersionLie».

См. подробные сведения

Выпуск
Пакет SDK для Windows 10, версия 2004 (10.0.19041.0) УСТАНОВИТЬ ПАКЕТ SDK СКАЧАТЬ ISO-ФАЙЛ
Пакет SDK для Windows 10, версия 1903 (10.0.18362.1)

Выпущено вместе с Windows 10, версия 1903.

УСТАНОВИТЬ ПАКЕТ SDK СКАЧАТЬ ISO-ФАЙЛ
Пакет SDK для Windows 10, версия 1809 (10.0.17763.0) Выпущено вместе с Windows 10, версия 1809. Включает служебные обновления 10.0.17763.132.

  • Устранена проблема, из-за которой происходил сбой комплектов сертификации приложений для Windows в любом приложении, которое объявляло более одного семейства устройств в манифесте
  • Устранена проблема, из-за которой комплекту сертификации приложений для Windows не удавалось выполнить развертывание пакета MSIX.
  • Устранена проблема, из-за которой в проектах UWP, использовавших несколько MinTargetPlatformVersions, происходила ошибка сборки, относящаяся к XAML.
  • Устранена проблема, из-за которой при наследовании из SelectorAutomationPeer в IDL возникала ошибка MIDL с сообщением «Обнаружен неподдерживаемый шаблон массива».

См. подробные сведения

УСТАНОВИТЬ ПАКЕТ SDK СКАЧАТЬ ISO-ФАЙЛ
Пакет SDK для Windows 10, версия 1803 (10.0.17134.12) Выпущено вместе с обновлением Windows 10 за апрель (версия 1803). УСТАНОВИТЬ ПАКЕТ SDK
Пакет SDK для Windows 10 (10.0.16299.91) и эмулятор устройства с Windows 10 Mobile (Майкрософт) (10.0.15254.1) Выпущено вместе с обновлением Windows 10 Fall Creators Update (версия 1709). УСТАНОВИТЬ ПАКЕТ SDK УСТАНОВИТЬ ЭМУЛЯТОР
Пакет SDK для Windows 10 (10.0.15063.468) и эмулятор устройства с Windows 10 Mobile (Майкрософт) (10.0.15254.1) Выпущено вместе с обновлением Windows 10 Creators Update (версия 1703).

  • Устранена проблема, из-за которой возникали ошибки сборки при включении events.h.
  • Тесты возвращены в комплект сертификации приложений.
  • Устранена проблема, из-за которой средству WinAppDeploycmd не удавалось подключиться к телефону через USB.
  • Устранена проблема, из-за которой конвейер удаленного развертывания UWP автоматически игнорировал исключения SMB.

См. подробные сведения

УСТАНОВИТЬ ПАКЕТ SDK УСТАНОВИТЬ ЭМУЛЯТОР
Пакет SDK для Windows 10 (10.0.14393.795) и эмулятор устройства с Windows 10 Mobile (Майкрософт) (10.0.14393.0) Выпущено вместе с обновлением Windows 10 Anniversary Edition (версия 1607).

Это обновление, не связанное с безопасностью, направлено на повышение качества работы ОС.

  • Устранена проблема, из-за которой разработчикам не удавалось создавать приложения UWP в Windows 7, так как библиотека MRMSupport.dll не загружалась.
  • Устранена проблема, из-за которой не удавалось запустить MidlRT и MDMerge в Windows 7.
  • Устранена проблема, из-за которой возникал сбой установки пакета SDK в Windows.
  • Устранена проблема, из-за которой при развертывании устаревшего приложения Store в Windows Phone 8.1 возникал сбой Visual Studio.
  • Устранена проблема, из-за которой данные приложения не сохранялись в сеансах удаленной отладки при отмене регистрации приложений.
УСТАНОВИТЬ ПАКЕТ SDK УСТАНОВИТЬ ЭМУЛЯТОР
Пакет SDK для Windows 10 (10.0.10586.212) и эмулятор устройства с Windows 10 Mobile (Майкрософт) (10.0.10586.11) Выпущено вместе с Windows 10, версия 1511. УСТАНОВИТЬ ПАКЕТ SDK УСТАНОВИТЬ ЭМУЛЯТОР
Пакет SDK для Windows 10 (10.0.10240) и эмулятор устройства с Windows 10 Mobile (Майкрософт) (10.0.10240) Выпущено вместе с Windows 10, версия 1507.

Примечание. Во время установки отображается номер версии 10.0.26624.

УСТАНОВИТЬ ПАКЕТ SDK УСТАНОВИТЬ ЭМУЛЯТОР
Эмулятор Microsoft HoloLens Запускайте приложения в среде Windows Holographic на виртуальной машине без HoloLens. Эта установка также содержит шаблоны голографических проектов DirectX для Visual Studio УСТАНОВИТЬ ЭМУЛЯТОР

Предыдущие выпуски

Этот пакет SDK, выпущенный в октябре 2013 года, позволяет создавать приложения для Windows (Windows 8.1 и более поздних версий), использующие веб-технологии или управляемый и неуправляемый код, а также классические приложения на базе управляемой или неуправляемой модели программирования.

Инструменты разработчика Windows Phone 8.1 устанавливаются вместе с Visual Studio Community 2015 с обновлением 2. Компоненты, добавленные в обновление 2, включают новые эмуляторы и шаблоны универсальных приложений.

Этот пакет добавляет шесть образов эмуляторов в существующую среду Visual Studio 2013, что позволяет вам проверять работоспособность приложений на телефонах Windows Phone 8.1. (Требуется Visual Studio 2013 с обновлением 2 или более поздней версии.)

Поддерживает использование эмуляторов в тестовых сценариях для телефонов под управлением Windows Phone 8.1 с обновлением 1. (Требуется Visual Studio 2013 с обновлением 2 или более поздней версии.)

Этот пакет SDK, выпущенный в ноябре 2012 года, позволяет создавать приложения для Windows (Windows 8 и более ранних версий), использующие веб-технологии или управляемый и неуправляемый код, а также классические приложения на базе управляемой или неуправляемой модели программирования.

Включен в выпуск Visual Studio Community 2015 для поддержки разработки приложений для устройств Windows Phone 8.

Добавляет пять новых образов эмуляторов в существующий пакет SDK для Windows Phone 8.0. После установки этого обновления вы можете тестировать работоспособность ваших приложений на устройствах с обновлением 3 для Windows Phone 8 (версия 8.0.10492 или более поздняя). Для этого обновления требуется среда Visual Studio 2012 с пакетом SDK для Windows Phone 8.0 и обновлением 4 или более поздней версии либо среда Visual Studio 2013 с дополнительным пакетом SDK для Windows Phone 8.0 (выбирается во время установки).

Добавляет два новых образа эмуляторов в существующий пакет SDK для Windows Phone. Это обновление поддерживает пакет SDK для Windows Phone 7.1 и пакет SDK для Windows Phone 8.0. С помощью этого обновления вы можете использовать взаимодействие с начальным экраном Windows Phone 8 в приложениях Windows Phone 7.5. Вы также можете проверить работоспособность своих приложений на устройствах c Windows Phone 7.8.

Средства разработки приложений для устройств под управлением Windows Phone 7.5 и Windows Phone 7.0.

Предоставляет дополнительные функции для пакета SDK для Windows Phone 7.1. После установки этого обновления вам будет проще разрабатывать приложения и игры, оптимизированные для работы на устройствах с памятью 256 МБ.

С помощью этого пакета SDK, выпущенного в июне 2010 года, можно создавать приложения для Windows 7, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008 и .NET Framework 2.0, 3.0, 3.5 SP1 и 4.0.

Во избежание проблем с установкой сначала прочитайте эту статью.

Adblock
detector

Выпуск
Пакет SDK для Windows 8.1 УСТАНОВИТЬ ПАКЕТ SDK
Средства разработки для Windows Phone 8.1 УСТАНОВИТЬ ЭМУЛЯТОРЫ
Обновление Windows Phone 8.1 и эмуляторы УСТАНОВИТЬ ПАКЕТ SDK
Пакет SDK для Windows Phone 8.0 УСТАНОВИТЬ VISUAL STUDIO ДОПОЛНИТЕЛЬНЫЕ ЯЗЫКИ
Эмуляторы пакета SDK для Windows Phone 8.0 с обновлением 3 УСТАНОВИТЬ ЭМУЛЯТОРЫ ДОПОЛНИТЕЛЬНЫЕ ЯЗЫКИ
Обновление пакета SDK 8.0 для Windows Phone 8.0.10322 Добавляет четыре новых образа эмуляторов в существующий пакет SDK для Windows Phone 8.0. Для этого обновления требуется среда Visual Studio 2012 с пакетом SDK для Windows Phone 8.0 и обновлением 4 или более поздней версии либо среда Visual Studio 2013 с дополнительным пакетом SDK для Windows Phone 8.0 (выбирается во время установки). УСТАНОВИТЬ ЭМУЛЯТОРЫ ДОПОЛНИТЕЛЬНЫЕ ЯЗЫКИ
Обновление пакета SDK для Windows Phone 7.8 УСТАНОВИТЬ ЭМУЛЯТОРЫ ДОПОЛНИТЕЛЬНЫЕ ЯЗЫКИ
Пакет SDK для Windows Phone 7.1 УСТАНОВИТЬ ПАКЕТ SDK ДОПОЛНИТЕЛЬНЫЕ ЯЗЫКИ
Обновление пакета SDK для Windows Phone 7.1.1 УСТАНОВИТЬ ПАКЕТ SDK ДОПОЛНИТЕЛЬНЫЕ ЯЗЫКИ
Пакет SDK для Windows 7 и .NET Framework 4

Hello, and welcome to the first tutorial in my MPI tutorial series! This tutorial will work fine for Visual Studio 2005 Express, Visual Studio 2005 Standard, Visual Studio 2008 Express, and Visual Studio 2008 Standard edition. Much of this tutorial can also be applied to the professional versions of Visual Studio, with some minor differences.

Step 1: Download Visual Studio 2008 Express if you do not already have it

If you don’t already have a version of Visual Studio installed on your computer, you can download a free version called Visual Studio 2008 Express. This is the most powerful developement environment available for Windows. Download Visual Studio 2008 Express here

There are multiple versions of Visual Studio 2008 Express. Because this blog focuses on high performance computing, all tutorials will be using the C++ flavour of Visual Studio.

Step 2: Download HPC Pack 2008 SDK

Microsoft has realized that virually all high performance computing clusters run on Linux. To help combat this, Microsoft realeased the High Performance Computing Pack 2008 SDK. This SDK is necessary if you want to use MPI for this tutorial and other tutorials. Please note that MPI is not platform dependent. You should write your programs so that they run on Windows, Linux, Mac OS, and any other operating system. Usually I write programs in Visual Studio, then I compile the source code with GCC in Linux when I’m finally ready to run the program on a large cluster. You can search on Google, or you can download the HPC Pack 2008 SDK here.

Step 3: Now that you have everything installed, lets go ahead and create our project!

Open up Visual Studio, go to the File menu and select New->Project. A dialog will appear:

start_new_project

After naming your project, click OK.

configure_new_project

Turn off the Precompiled Header option. This will generally make it easier to compile your source code of platforms other than Windows.

Step 4: Get Hello World Up and running

#include "stdafx.h"
#include <iostream>
using namespace std;
//int _tmain(int argc, _TCHAR* argv[])
int main(int argc, char* argv[])
{ 
    cout << "Hello Worldn";
    return 0;
}

Go ahead and modify the default source code so it looks like the code above. Compile your program, and make sure that it runs properly. There are several reasons we changed the _tmain to the standard main function declaration. The first reason is for platform compatibility reasons. The second reason is that we will need to use argv as char* later on, not as a TCHAR*.

Step 5: Configure your project to run MPI

Now that you’re program is compiling and working, we’ll need to configure your program to include the MPI libraries and header files. Right-click your project in the Solution Explorer window, and select Properties.

Additional Include Directories

You’ll need to navigate to the HPC Pack 2008 SDK directory, and make sure the include directory is included in your project’s include search path.

Additional Library Directories

Next, you’ll need to navigate to the HPC Pack 2008 SDK directory, and make sure the library directory is included in you’re project’s library search path.

Additional Dependencies

Next, you’ll need to specifically tell Visual Studio that you will be depending on msmpi.lib. Before continuing with this tutorial, it’s a good idea to compile and run your program again to make sure it’s still working.

Step 6: Modify your source code to use MPI

#include "stdafx.h"
#include <iostream>
#include "mpi.h"

using namespace std;

//int _tmain(int argc, _TCHAR* argv[])
int main(int argc, char* argv[])
{
 //cout << "Hello Worldn";

 int  nTasks, rank; 

 MPI_Init(&argc,&argv);
 MPI_Comm_size(MPI_COMM_WORLD,&nTasks);
 MPI_Comm_rank(MPI_COMM_WORLD,&rank);

 printf ("Number of threads = %d, My rank = %dn", nTasks, rank);

 MPI_Finalize();
 return 0;
}

There are a couple things I would like to point out. First, we include the mpi.h file. There are a total of four MPI functions that we call.

MPI_Init: This function should always be called at the start of the program. Simply pass in the address for argc and argv. Make sure that you changed the _tmain function to main as requested earlier, and make sure argv is of type char*. This function basically initializes MPI.

MPI_Comm_size: This function basically gives you the number of tasks in any communication group. For now, we’ll use MPI_COMM_WORLD, which will be a collection of all the different threads in our program. The variable nTasks will be equal to the total number of threads int he program.

MPI_Comm_rank: Each thread has a different ID, also called a rank. For example, if your program has four threads, the threads will have a rank value somewhere between 0 and 3. Again, each thread will have a different rank which distinguishes it from the rest of the threads. In order to find out which rank a thread is, simply call this function.

MPI_Finalize: This function cleans up MPI, and should be called just before the program exits.

Important Information for Windows XP users

If you are using Windows XP, you may brush up against an error like the following dialog when trying to complete step 7 of this tutorial.

XP Smpd Exe Error

The procedure entry point GetProcessIdOfThread could not be located in the dynamic link library KERNEL32.dll.

Don’t panic, this is fixable.You will need to download a Windows Hotfix for this issue. Download Hotfix here.

Please note that because this hotfix has not been fully tested, you will need to enter your email address, and Microsoft will email you a link with where you can download the file. The email may appear in your spam box, as it did for me. The email will contain information on where you can download the Hotfix. The email will also contain a password that you will need before being able to apply the hotfix. Again, the reason for making you jump through these hoops is because the Hotfix hasn’t been fully tested. However, I can tell you that it worked on my system first time, with no problems at all. I didn’t even have to restart my computer or anything. Just make sure you close all instances of your program before applying this Hotfix.

Step 7: Getting your program to run with multiple threads

If you compile and run the program now, you will find that the program only runs with 1 thread, even if you have a dual or quad-core computer. This is a problem! In order to run MPI, you’ll need to run the program through mpiexec.exe.

Run With Command Line

For now, go ahead and click the Start menu, and select Run. Type cmd and hit enter. Go ahead and browse to your project directory. If you’ve never used the command line before, you can change directories with “cd <directory name>”, list the contents of the current directory with “dir”, and go back a directory with “cd ..”.

Once you browse to your project directory, type mpiexec MPI_Tutorial_1.exe. In the picture above, you’ll see that it ran with two threads. That’s because I’m currently running on a computer with two processor cores. In the next command, you see that by specifying with an -n switch, you can force your program to start with any number of threads.

If you encounter an error when trying to run your program with mpiexe, please scroll up and read about the issue with Windows XP, and how to fix the issue by applying a hotfix.

Step 8: Getting your program to run without having to type on the command line

Wouldn’t it be nice if we didn’t have to type on the command line every time we wanted to run our program? Well, we can configure Visual Studio to do this automatically. Right click on the Solution Explorer window, select your project, right click, and select properties.

A note for Visual Studio Professional users: If you have a professional version of Visual Studio 2005 or 2008, you are in luck. by selecting the Debugging Category, you can select the “Debugger to launch” drop down list. If you see MPI Cluster Debugging, or something similar, then you should definitely use that. This offers many advantages over the express and standard versions of Visual Studio. These advantages will be covered in later tutorials. If you are using an express or standard version of Visual Studio, don’t panic. Please follow the text below in order to get your program to run with the build and run command in Visual Studio.

Configure Command Line

Make the command target mpiexec.exe. As command line options, you can specify the number of processors you want, and just as importantly, specity your executable. You may want to include your target path with quotation marks. Go ahead and click Apply, and run your project. Visual Studio should be able to compile and run your program just as it did before!

Wrapping up

This has been an exciting day! You were able to create a project from scratch, and modify it to run MPI. Sure, there’s a lot of prep work involved in getting this to work, but it was worth it. There are many things left to be discussed, including how to debug your program. This issue and more will be looked at in a following tutorial.

You can download the project files for this tutorial here:

MPI_Tutorial_1

NEXT: Learn how to attach the debugger to your MPI application

Back to the MPI tutorial landing page



1


Windows HPC Server 2008 R2 Suite: –Windows Server 2008 R2 HPC Edition + –Microsoft HPC Pack Microsoft HPC Pack 2008 R2 Enterprise Microsoft HPC Pack 2008 R2 Express Windows Server 2008 R2 HPC Edition, являясь частью Windows HPC Server 2008 R2 Suite, использует модель лицензирования «на сервер» и не требует клиентских лицензий (CAL) для доступа. По условиям лицензии он не может использоваться как «сервер». Microsoft HPC Pack Enterprise и Express не требует клиентских лицензий.


2


Простейший HPC кластер может состоять из головного узла и 2-х вычислительных узлов.


3


Головной узел может быть создан с помощью Microsoft HPC Pack 2008 R2 на любой из следующих 64-разрядных ОС (не Itanium): Windows Server 2008 R2 HPC Edition Windows Server 2008 R2 Standard Windows Server 2008 R2 Enterprise Windows Server 2008 R2 Datacenter HPC Pack это дополнительное программное обеспечение, предоставляющее управление HPC кластером. Вычислительные узлы могут быть созданы на любой из следующих 64- разрядных ОС (не Itanium): Windows Server 2008 R2 HPC Edition или Windows Server 2008 HPC Edition Windows Server 2008 R2 Standard или Windows Server 2008 Standard Windows Server 2008 R2 Enterprise или Windows Server 2008 Enterprise Windows Server 2008 R2 Datacenter или Windows Server 2008 Datacenter


4



5



6



7



8



9



10



11



12



13


И наконец, HPC Cluster Manager предстает в своем обычном виде. В работе этого мастера представлены следующие закладки Configuration – Конфигурация кластера (настройки образов, сети и пр.) Node Management – Управление нодами. Job Management – Управление очередью работ. Diagnostics — Диагностика Charts & Reports – графики и отчеты. Каждой вкладке соответствует свой набор диалогов, так например для вкладки Configuration существенен следующий набор –To Do List – представленный выше список действий по стартовой настройке конфигурации кластерной сети. –Network — сеть –Node Templates – образцы образов развертки –Images –Job Templates – образцы заданий –Users – пользователи кластера


14



15



16



17



18



19



20



21



22



23



24



25



26



27



28


Установка обновлений и дополнительного ПО Через AD Подготовить шаблон типа для узла с установленной ОС Создать задачу Через запуск команды (+копирование) Вручную


29


Microsoft HPC Pack 2008 R2 Enterprise Включает кроме стандартного функционала HPC Pack 2008 R2 Express Возможность включать рабочие станции в состав кластера Возможность выполнять вычисления из Excel 2010 на кластере позволяет использовать средства Azure –«библиотека» Cloud Numerics


30



31


Организации, использующие рабочие станции в качестве вычислительных узлов, могут использовать вычислительную мощность простаивающих в нерабочее время ПК с Windows 7 или сформировать вычислительное облако, предоставляющее дополнительную мощность для кластера серверов Windows HPC Server. Клиентские компьютеры, на которых могут быть запущены вычислительные узлы (workstation nodes) с помощью Microsoft HPC Pack 2008 R2 for Workstation, должны работать на любой из следующих (x86 или x64) ОС: Windows 7 Professional Windows 7 Enterprise Windows 7 Ultimate


32



33



34


HPC Pack 2008 R2 Tool Pack Lizard — вариант теста Linpack от MS ClusterCopy — утилита для копирования файлов на узлы кластера Node XML Editor — Node XML Editor Excel file – шаблон для создания и редактирования XML описаний узлов кластера для развертывания на них ПО Network Troubleshooting Report — тесты сети кластера GangliaIntegration HPCPreInstall – для подготовки узлов к установке HPC Pack


35


HPC Pack 2008 SharePoint Integration Sample


36



37



38



39



40


Клиентские компьютеры, с которых пользователи могут управлять консолями администрирования и управления заданиями, должны работать под следующими операционными системами: Windows 7 Professional, Enterprise, Ultimate (x86 или x64) Windows Vista Enterprise, Business, Home, Ultimate Windows XP Professional с Service Pack 3 или старше (x86 или x64) Windows Server 2008 R2 Standard, Enterprise, Windows Server 2008 R2 HPC Edition (x86 или x64) Windows Server 2008 Standard, Enterprise, Windows Server 2008 HPC Edition (x86 или x64) Windows Server 2003 R2 Standard Edition, Enterprise Edition (x86 или x64) Windows Server 2003 Compute Cluster Edition, Windows Server 2003 Standard Edition, Enterprise Edition с Service Pack 2 или старше (x86 или x64)


41


SDK –Примеры –средства для разработки драйверов NetworkDirect –HPC Pack 2008 R2 MS-MPI redistributable installer MPITemplate – шаблон для VS проектов для кластера


42


Отправить задачу через оболочку Использовать интерфейс на основе веб-частей Sharepoint Командлеты Powershell Файлы, требующиеся для выполнения задания, должны размещаться на носителях, доступных всем узлам.


43


ПРОБЛЕМА Блокировка файлов – задача висит «в стартинге»


44


На компьютере разработчика должна быть установлена среда Visual Studio 2010 Professional Edition или более высокой версии с удаленным отладчиком. У пользователя должны быть права администратора кластера.У пользователя должны быть права администратора кластера. У Visual Studio должен быть доступ ко всем вычислительным узлам, на которых предполагается запускать сеансы отладки. Необходимый доступ обеспечивают сценарии, указанные ниже. Приложение разрабатывается на головном узле кластера или на выделенном узле входа. Используется кластер, в котором вычислительные узлы подключены к корпоративной сети (топология 2, 4 или 5), а компьютер разработчика присоединен к тому же домену или к домену, для которого настроены отношения доверия с доменом кластера. Для отправки приложения в кластер HPC с клиентского компьютера необходимо установить пакет Microsoft HPC Pack Для построения MPI-программ с использованием интерфейса передачи сообщений корпорации Майкрософт необходимо, чтобы на компьютере разработчика был установлен пакет Windows HPC Server 2008 SDK. Требования для использования отладчика MPI-кластера


45


Cloud Numerics


46


A numerical library with over 400 functions covering mathematics, statistics, linear algebra, and more. The «Cloud Numerics» Visual Studio project gives instant access to distributed data structures and numerical functions. Develop and debug on your desktop then deploy to Windows Azure with a couple of simple steps.


47


The project template and sample program have the following operating system and software prerequisites: Windows 7 or Windows Server 2008 R2 SP1, 32 or 64-bit Visual Studio 2010 Professional or Ultimate Edition with SP1 with Visual C++ components installed* SQL Server 2008 R2 Express or higher Windows Azure SDK v1.6 and Windows Azure Tools for Visual Studio, November 2011 or later edition A Windows Azure subscription for deploying projects from local, debugging mode to Windows Azure. If any of the following obsolete components are present, installation will appear to succeed but you probably wont be able to open a new Cloud Numerics project: Microsoft HPC Pack 2008 R2 Azure Edition Microsoft HPC Pack 2008 R2 Client Components Microsoft HPC Pack 2008 R2 MS-MPI Redistributable Pack Microsoft HPC Pack 2008 R2 SDK Windows Azure SDK v1.5 Windows Azure AppFabric v1.5 Windows Azure Tools for Microsoft VS


48



49


Архитектура Windows HPC


50



51


Основа кластера: Минимальный набор средств для запуска кластерных приложений


52


Сервис-ориентированный кластер Строится на основе кластера с добавлением broker- узлов, необходимых для управления и выполнения SOA приложений


53


Высоконадежный кластер Включает в себя избыточные(вспомогательные) управляющий и broker-узлы, благодаря чему приложения являются устойчивыми к отказу этих критически важных серверов


54


Кластер рабочих станций Позволяет использовать рабочие станции под управлением Windows 7 как вычислительные узлы кластера во время простоя


55


Решения Microsoft для вузов и прикладной науки Наши победы. СКИФ-Урал, Linpack Узлы/ЯдраRmax(TFlops)Rpeak(TFlops) Эффективн.ОС 166/ % SUSE Linux Enterprise Server / % Windows HPC Server 2008 RC2 Mellanox WinIB-ND 1.4.0b Латентность: 2.9 / 5.6 μsec Throughput: 931 Мб/сек Классическая кластерная инфраструктура: публичная, приватная и MPI-сети


56


Решения Microsoft для вузов и прикладной науки Некоторые российские вузы/институты, разместившие заказы на кластерную ОС 1. МИЭТ 2. Белгородский ГУ 3. МИФИ 4. Пермский ГТУ 5. ЮрГУ 6. ИКИ РАН 7. МФТИ 8. ИБХ РАН 9. Санкт-Петербургский ГПУ 10. МГУ 11. Ульяновский ГТУ 12. Новосибирский ГУ 13. Волгоградский ГТУ 14. РосНОУ 15. Иркутский ТУ, …


57


TOP500.ORG

Понравилась статья? Поделить с друзьями:
  • Hp1005 драйвер windows 7 x64 скачать
  • Hp универсальный драйвер печати x64 windows 10 pcl5
  • Hp тема omen для windows 10
  • Hp при установке windows рябит экран
  • Hp неттоп зайти в биос установка windows