Opened 8 years ago

Closed 5 years ago

#1139 closed bug (wontfix)

mpiexec's "-genv" does not work on Windows for strings longer than 260 chars

Reported by: vladimir.s.petrov@… Owned by: jayesh
Priority: major Milestone: future
Component: mpich Keywords:
Cc:

Description

On Windows Itanium MPICH2 fails to set (via mpiexec -genv) environment variables for MPI procs if the value is longer than 260 chars.

Change History (13)

comment:1 Changed 8 years ago by jayesh

  • Owner set to jayesh
  • Status changed from new to accepted
  • Summary changed from mpiexec's "-genv" does not work for strings longer than 260 chars to mpiexec's "-genv" does not work on Windows for strings longer than 260 chars

comment:2 Changed 8 years ago by balaji

  • Milestone set to mpich2-1.3.2

comment:3 Changed 8 years ago by jayesh

Hi,

Is the name of the environment variable longer than 260 chars (Currently MPICH2 has a limit of 256 chars for environment variable names & 8K chars for environment variable values)?
I tried setting environment variables with values larger than 260 chars with MPICH2 1.3.1 and it worked for me.

-Jayesh

comment:4 Changed 8 years ago by jayesh

Hi,

The name is short.
It's the value's length that is causing the problem.

Best regards,
Vladimir Petrov

comment:5 follow-up: Changed 8 years ago by jayesh

Can you copy-paste the mpiexec command in the ticket ? I tried to pass an env with > 256 char value with "-genv" option and it worked for me with 1.3.1.

-Jayesh

comment:6 Changed 8 years ago by jayesh

  • Milestone changed from mpich2-1.3.2 to mpich2-1.3.3

comment:7 in reply to: ↑ 5 Changed 8 years ago by vladimir.s.petrov@…

Here is how it can be reproduced on our Windows Itanium server:

file test.bat:
==========
@set abc
==========

file run_test.bat:
==========
set abc_val=12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

%MPICH2_HOME%\bin\mpiexec.exe -n 2 -genv abc %abc_val% test.bat
==========

Please note that the same works correctly on a Windows Intel64 machine.

Best regards,
-Vladimir

comment:8 Changed 8 years ago by jayesh

Hmmm... That (works on Intel64) could be the reason that I was not able to recreate the problem.
We haven't been providing MPICH2 builds (&testing MPICH2) on Itanium for sometime. Let me look around to see if I can get hold of an Itanium machine to reproduce the problem.

-Jayesh

comment:9 Changed 8 years ago by jayesh

I could not find an Itanium Windows system here at the lab.
However, I don't think the problem is related to whether the system is Itanium or Intel64. From looking at the code, SMPD currently limits the total length of all environment variables (name+value) to 4K (Which is obviously wrong).
Can you confirm if the sum of lengths of env name & env values > 4K (An approx estimate of sum of lengths is good enough) ?
I can increase the value to 8K (not the *correct* fix - but a quick one that might fix your problem)

-Jayesh

comment:10 Changed 7 years ago by balaji

  • Milestone changed from mpich2-1.3.3 to mpich2-1.4

Milestone mpich2-1.3.3 deleted

comment:11 Changed 7 years ago by balaji

  • Milestone changed from mpich2-1.4 to future

comment:12 Changed 5 years ago by balaji

  • Status changed from accepted to new

comment:13 Changed 5 years ago by balaji

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.