Skip to content

An example and a readme file - #20

Merged
Jithin Jose (jithinjosepkl) merged 20 commits into
microsoft:masterfrom
hpourreza:master
Sep 25, 2019
Merged

Jithin Jose (jithinjosepkl) merged 20 commits into
microsoft:masterfrom
hpourreza:master

Conversation

@hpourreza

Copy link
Copy Markdown
Contributor

I added a folder with an example and how to run it on Windows using MSMPI.

@jithinjosepkl

Copy link
Copy Markdown
Contributor

Do you want to create a project file also for the example?

@hpourreza

Copy link
Copy Markdown
Contributor Author

Jithin Jose (@jithinjosepkl)
I updated the readme file and added the VS project file to compile the code.

Comment thread example/Run_MPIHelloWorld.md Outdated
@@ -0,0 +1,35 @@
## Compile and run a sample MPI code on Windows
1. Download MS-MPI SDK and Redist installers and install them. The download link can be found on
our [homepage](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to point it to the releases tab in github.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the link to point to the releases page of Github

`link /machine:x64 /out:MPIHelloWorld.exe "msmpi.lib" /libpath:"C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64" MPIHelloWorld.obj`
![inline](./screenshots/link.png)

You may use the `nmake` command from Developer Command Prompt to compile and build the exmaple using the provided [`Makefile`](Makefile).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A vcproject file may be useful instead.

@AnnaDaly Anna Daly (AnnaDaly) Sep 18, 2019 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that we need $(MSMPI_INC)\x64 or $(MSMPI_INC)\x86 in includes, $(MSMPI_INC) should be enough for simple C++ example..

UPD: as long as it is in sync with https://blogs.technet.microsoft.com/windowshpc/2015/02/02/how-to-compile-and-run-a-simple-ms-mpi-program/

:)

@hpourreza Hossein Pourreza (hpourreza) Sep 19, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A vcproject file may be useful instead.

Jithin Jose (@jithinjosepkl) what do you mean? I included a vcxproj file. Should I create it in some special way?

Anna Daly (@AnnaDaly)
I used most of that blog post for this Readme. This readme is going to replace that blog post since some of references in that blog post is no longer valid.

Comment thread example/MPIHelloWorld.cpp

MPI_Finalize();
return 0;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to move this into examples/helloworld? That way, we can include more examples as needed.

@hpourreza Hossein Pourreza (hpourreza) Sep 19, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created the helloworld folder under example to host the code and readme file.

@AnnaDaly Anna Daly (AnnaDaly) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, why are we talking about the official distribution here? Should not we talk about how to use the build that the github user can produce themselves?

Comment thread example/MPIHelloWorld.vcxproj Outdated
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(MSMPI_LIB64)</AdditionalLibraryDirectories>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;msmpi.lib;%(AdditionalDependencies)</AdditionalDependencies>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all these libraries?

@jithinjosepkl
Jithin Jose (jithinjosepkl) merged commit c8daf40 into microsoft:master Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants