locked
Invoking mpiexec with parameters RRS feed

  • Question

  • Team,

    When I place the below code snippet in a sample web application and try to run in debug mode, it kicks-off well and executes the code successfully.

    When, I try to run the same from IIS, it neither throws an exception, nor executing successfully. I'm unsure about the issue, i suspect there is something to do with permission settings. Please let me know on any workaround for this.

    string argument1 = "mpiexec -hosts 1 domaniname.domain.com ";
                string argument2 = "\"" + @"C:\AAA.exe" +
                    "\"";
                string argument3 = "Param1";
                string argument4 = " 124846215";
                string argument5 = " 1100587 ";

                string arguments = string.Format("{0} {1} {2} {3} {4}", argument1, argument2, argument3, argument4, argument5);

                Process mpiexec = new Process();
                ProcessStartInfo pinfo = new ProcessStartInfo(@"C:\Program Files\Microsoft HPC Pack 2008 SDK\Bin\mpiexec.exe");
                pinfo.Verb = "runas";
                //pinfo.WindowStyle = ProcessWindowStyle.Hidden;
                pinfo.WorkingDirectory = Environment.CurrentDirectory;
                pinfo.UseShellExecute = false;
                pinfo.RedirectStandardError = true;
                pinfo.RedirectStandardOutput = true;
                pinfo.Arguments = arguments;
                mpiexec.StartInfo = pinfo;

                mpiexec.Start();
                int procId = mpiexec.Id;
                mpiexec.WaitForExit();
                mpiexec.Close();


    Prasenna


    Prasenna


    • Edited by Prasenna Kannan Thursday, September 25, 2014 10:19 AM Confidentiality exposed
    Tuesday, May 29, 2012 10:32 AM

All replies

  • Hi,

    Is your problem resolved? what error msg did you get when running the above program from IIS?

    Liwei

    Tuesday, January 8, 2013 5:41 PM
  • This problem is resolved. 

    Prasenna

    Thursday, September 25, 2014 10:20 AM