- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all:
For a Windows unicode console program (MyUnicodeAPP.exe), my way to display unicode characters in the screen is:
(1)Convert all wchar_t to char with UTF8 encoding
(2)Change the codepage of console to 65001 (UTF8)
(3)printf the UTF8 encoded strings
But when I use the following command, the UTF8 encoded strings can't be displayed correctly.
mpiexec.exe -localonly -n 2 MyUnicodeApp.exe
I think the MyUnicodeApp.exe launched by smpd.exe has its own codepage of console rather than 65001 of the main console.
Is there anyway to print unicode strings in a MPI app?
regards,
Seifer
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I have done another test and find that if the unicode string is read from a unicode encoded text file, there is no display issue.
But if the unicode string is passed as the argument of MyUnicodeApp.exe, the unicode strings can't be displayed correctly.
Note: MyUnicodeApp.exe already use
int wmain(int argc, wchar_t **argv)
to replace
int main(int argc, char **argv)
I think mpiexec.exe can't get unicode string argument corretly, therefore smpd will launch MyUnicodeApp.exe with an incorrect argument.
mpiexec.exe -localonly -n 2 MyUnicodeApp.exe []
regards,
Seifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Seifer,
Are there any Unicode characters in the path to your application or to your MPI installation folder?
Sincerely,
James Tullos
Technical Consulting Engineer
Intel Cluster Tools
Are there any Unicode characters in the path to your application or to your MPI installation folder?
Sincerely,
James Tullos
Technical Consulting Engineer
Intel Cluster Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Seifer Lin
...
Is there anyway to print unicode strings in a MPI app?
Is there anyway to print unicode strings in a MPI app?
I use two CRT functions mbstowcs and wcstombs to do all stringconversions.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All:
When running my app without mpiexec.exe as the following ([UnicodeCharacter] is the argument for MyMPIAPP.exe) :
MyMPIApp.exe [UnicodeCharacter]
The console shows[UnicodeCharacter] correctly.
But when I run my app with mpiexec.exe
mpiexec -localonly -n 2 MyMPIApp.exe [UnicodeCharater]
The console shows:
[??????????]
[??????????]
all the unicode characters are displayed as question marks.
regards,
Seifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Seifer,
I've checked with our development team, and Unicode is currently unsupported by the Intel MPI Library. In order to add support, there will need to be significant changes throughout, and as such it is not expected to be completed in the near future.
Sincerely,
James Tullos
Technical Consulting Engineer
Intel Cluster Tools
I've checked with our development team, and Unicode is currently unsupported by the Intel MPI Library. In order to add support, there will need to be significant changes throughout, and as such it is not expected to be completed in the near future.
Sincerely,
James Tullos
Technical Consulting Engineer
Intel Cluster Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Seifer Lin
...But when I run my app with mpiexec.exe
mpiexec -localonly -n 2 MyMPIApp.exe [UnicodeCharater]
The console shows:
[??????????]
[??????????]
all the unicode characters are displayed as question marks...
Did you try to execute that command with a simple Win32 Consoleapplication ( UNICODE )?
The code could look like:
...
void main( void )
{
...
DWORD dwCreationFlags = ( ... | CREATE_UNICODE_ENVIRONMENT | ... );
...
CreateProcess( NULL, _T("mpiexec -localonly -n 2 MyMPIApp.exe [UnicodeCharacter]"), ..., dwCreationFlags, ...);
...
}
...
Best regards,
Sergey

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page