Intel MPI and Unicode in Windows

Intel MPI and Unicode in Windows

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 stringsBut when I use the following command, the UTF8 encoded strings can't be displayed correctly.mpiexec.exe -localonly -n 2 MyUnicodeApp.exeI 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

7 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

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 useint wmain(int argc, wchar_t **argv)to replaceint 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

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

Quoting Seifer Lin...
Is there anyway to print unicode strings in a MPI app?

Hi Seifer,

I use two CRT functions mbstowcs and wcstombs to do all stringconversions.

Best regards,
Sergey

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.exempiexec -localonly -n 2 MyMPIApp.exe [UnicodeCharater]The console shows:[??????????][??????????]all the unicode characters are displayed as question marks.regards,Seifer

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

Quoting Seifer Lin...But when I run my app with mpiexec.exempiexec -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

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi