- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a Fortran QuickWin Application called GEMix in which I want to parallelize the computations in a single subroutine with no calls to QuickWin. The code is compiled and built (to GEMix.exe) in Visual Studio 2010 + Fortran Visual Cluster Studio 2016.
When I then open a command window and tries to execute GEM.exe via wmpiexec I get the error message "Can't load dynamic library".
Is it principally impossible to apply MPI to a QuickWin application or can the error be solved by a library reference to e.g. the QuickWin library?
Best regards
Anders S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yours looks effectively identical (system and run differences) to mine as far as I can tell. I'm concerned that there is a system configuration stopping this from working. Maybe we can get around that. Try running with -localroot.
mpiexec -localroot -n 4 testpl.exe
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The first run should have only used 1 rank, not 4.
For the second run, redirect the output to a text file and attach the text file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings James T,
mpiexec -n 1 testpl also hangs
Best regards
Anders S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings James T,
How do you redirect the error output to a file? I tried I_MPI_DEBUG_OUTPUT='err.txt' but it did not work.
Best regards
Anders S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings James T.,
Maybe I expressed myself in an unclear way. I tried to define the output file in several ways but I could not find the output file where I looked for it.
I do look forward to assisting you in finding out why the plotting does not work for me under MPI.
Best regards
Anders S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mpiexec -n 4 -verbose -genv I_MPI_DEBUG 5 testpl.exe > output.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yours looks effectively identical (system and run differences) to mine as far as I can tell. I'm concerned that there is a system configuration stopping this from working. Maybe we can get around that. Try running with -localroot.
mpiexec -localroot -n 4 testpl.exe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings James T.,
Your last suggestion made the plot work! Great! (see attached plot)
I have supplied a slightly modified test program testpl2a which describes the main structure of my real application:
part 1:sequential calculations and plotting (green rectangle)
part 2:MPI used for some time consuming caculations, no plotting
part 3:sequential calculations and plotting (red rectangle)
With your suggestion I get four windows with the two plotted rectangles when MPI uses size=4. I have tried to reduce the number of plots by using IF(rank.EQ.0) before the plot calls with no success (still four plot windows even before MPI and size 4 is invoked)
Is it possible to suppress (reduce in size?) or preferably remove all but one of the windows. When the application has finished I want to have a green and a red rectangle on the (full) screen.
When this hopefully works on the host, I will offload the MPI part to four Xeon Phi cards on the host. Can you foresee any problems in doing this?
Again, thanks a lot, James!
Best regards
Anders S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Several things to consider:
Your testpl2a.f90 has nothing restricting to rank 0. Surround your plot calls with if (rank.eq.0) then ... end if in order to only run in rank 0.
Make sure when you start adding MPI more calls to your code that all MPI calls happen between MPI_Init and MPI_Finalize. Right now, your plot calls are all outside of this region. They don't call MPI, so this is safe. But not good practice.
If you want to ensure that only rank 0 opens a window, you'll need to use a heterogeneous run. You'll compile one version of your program with /libs:qwin, and one without. When you compile with QuickWin, you will get a window. Here's an example of how to do that. See the attached files, modified from your testpl2a.f90.
mpiifort /libs:qwin test3main.f90 -o test3main.exe mpiifort test3sub.f90 -o test3sub.exe mpiexec -n 1 test3main.exe : -n 3 test3sub.exe
This will create two executables and run them as one MPI job. You will have one rank of test3main (list it first to ensure it is rank 0) and 3 ranks of test3sub. Only rank 0 will create a window. The others print a message to the command line to confirm that they are running.
Now, talking about Intel® Xeon Phi™. Don't offload MPI. You can offload some of your workload from an MPI program, or (on Linux) you can run natively on Intel® Xeon Phi™. But a Windows hosted Xeon Phi does not work with symmetric mode runs. See https://software.intel.com/en-us/articles/how-to-run-intel-mpi-on-xeon-phi for information on Intel® MPI Library and Intel® Xeon Phi™.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings James T.,
Thanks for your rapid answer!
I added your suggestions and can now conclude that it works accrding to my requirements. I added a loop to the test routine and after the first loop I manually minimize all windows associated with ranks >0 and maximize the remaining window. The windows will then remain like that during the loops. Great!
In order to check if I understood you right regarding good MPI practice, I display the new structure of my code:
Start
10 CONTINUE
Sequential calculations with no plotting
INIT MPI
IF(rank.EQ.0)CALL plot1
Sequential calculations
Parallel calculations
Sequential calculations
IF(rank.EQ.0)CALL plot2
END MPI
Sequential calculations
IF(crit.EQ..FALSE.)GOTO 10
STOP
If you instead plot for rank=size you will get the plotting on the top window.
Conclusions
By combining Windows, Fortran, QuickWin and MPI it seems possible in the case of computational heavy simulations to design an output on the screen in the form of many small windows with text and/or graphics output from different places in the code. This gives a fantastic overview of what is going on. For trouble shooting it is invaluable.
I will now continue to try to move the parallelized part in the "pseudo code" above to some Xeon Phi cards.
I do hope that the support for Windows and QuickWin in HPC will continue.
The very best regards
Anders S
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »