Opened 8 years ago

Last modified 8 years ago

#908 new bug

Unicode command line arguments

Reported by: john.tomko@… Owned by:
Priority: long-term Milestone: future
Component: mpich Keywords: UNICODE
Cc: john.tomko@…

Description (last modified by goodell)

It appears that MPIEXEC converts UNICODE arguments to 8bit.
Consider the following mini program:

=================================
#include <windows.h>
#include <iostream>

int wmain(int argc, wchar_t *argv[], wchar_t *envp[])
{
   for(int i=0;i<10;i++)
      printf("%d %d %c\n",i,argv[1][i],argv[1][i]);

   return 0;
}
=================================

The output when running standalong on the command line is:

C:\>test ???-Valve_s
0 12354 B
1 12354 B
2 12354 B
3 45 -
4 86 V
5 97 a
6 108 l
7 118 v
8 101 e
9 95 _

The output when running using mpiexec is:

C:\>mpiexec2 -localonly test ???-Valve_s
0 63 ?
1 63 ?
2 63 ?
3 45 -
4 86 V
5 97 a
6 108 l
7 118 v
8 101 e
9 95 _

Notice that the first 3 arguments are converted from unicode to ascii 8bit.

Change History (2)

comment:1 Changed 8 years ago by goodell

  • Description modified (diff)

(tweaking ticket formatting in trac)

comment:2 Changed 8 years ago by goodell

  • Milestone set to future
  • Priority changed from major to long-term

Thanks for the bug report. Unfortunately, the answer here is that almost none of the MPICH2 code base handles unicode correctly. We might be able to make the unicode come through OK at least for command-line arguments, but it will take some investigation.

We'll update this ticket at some point when we know more about the fix.

Note: See TracTickets for help on using tickets.