Accelerator V2 Library - Cannot Create DirectX Device Error When App is Run Through Job Scheduler

Unanswered Accelerator V2 Library - Cannot Create DirectX Device Error When App is Run Through Job Scheduler

  • 2011. május 27. 23:05
     
     

    On my head node with 3 graphics cards installed along with DirectX11 I get an error from my application that a DirectX device cannot be created. 

    Unhandled Exception: Microsoft.ParallelArrays.AcceleratorException: Failure to create a DirectX 9 device.
       at Microsoft.ParallelArrays.ParallelArrays.ThrowNativeAcceleratorException()
       at Microsoft.ParallelArrays.DX9Target..ctor()

    However when I start the app creating a console window it works just fine.  I followed the instructions I found here:

    http://technet.microsoft.com/en-us/library/gg247477%28WS.10%29.aspx

    And the commands reported that everything worked when I ran them.  Rebooted everything and still the same problem.

    Is there something else I can do here?  Some troubleshooting steps or something?  Is there a way that I can have my executables create their console window when launched?  This would make debugging easier at first if I can see what the apps are doing in real time through console.Writeline.

    Edit:  Is this how setting the environment variable for a job should look?

    job.SetEnvironmentVariable("HPC_CREATECONSOLE", "true");

     

    Bob



    • Szerkesztette: MadScientistBob 2011. május 29. 19:07 Added more info to question
    •  

Az összes válasz

  • 2011. június 1. 19:51
     
     

    This is what finally got it working:

    job.SetEnvironmentVariable("HPC_ATTACHTOSESSION", "TRUE");

    Bob

    • Megjelölte válaszként: MadScientistBob 2011. június 1. 19:52
    • Válaszként való megjelölést visszavonta: MadScientistBob 2011. június 1. 22:58
    •  
  • 2011. június 1. 22:59
     
     

    Oops, my previous answer only works if I have a remote desktop connection to the server.  How do I create a session or console on a server if one does not already exist?

     

    Bob

  • 2011. október 5. 19:59
     
     
    Bob, can you please explain the answer? Is this "job.SetEnvironmentVariable("HPC_ATTACHTOSESSION", "TRUE");" what needs to be added to the code? What is the job object?
  • 2011. október 6. 0:50
     
     

    Hi Bob,

    Yes, to have the session created automatically please use HPC_CREATECONSOLE. It requires some additional setup steps you've mentioned earlier: http://technet.microsoft.com/en-us/library/gg247477(WS.10).aspx

    Does HPC_CREATECONSOLE work for you?

    Regards,
    Lukasz