title: Unable to create enviornmental setting for batch process
body: <p>I am trying to execute a mpi-based task with python-sdk for batch pool.</p>
  <p>My setup includes the following steps:</p>
  <ul>
  <li>Create the pool from template json.</li>
  <li>Create SAS URLs and upload the executable &amp; supporting files as common resource files.</li>
  <li>Create the Task Object
  <ul>
  <li>Add Environmental settings to tasks. (using azure.batch.models.EnvironmentSetting)</li>
  <li>Add the coordination script and run_script.</li>
  </ul>
  </li>
  </ul>
  <p>The coordination script looks like:</p>
  <pre class="lang-bash prettyprint-override"><code>#!/usr/bin/bash
  
  export MPI_HOME=&quot;/usr/local/openmpi4.0/openmpi-4.0.0/build&quot;
  export CUDA_HOME=&quot;/usr/local/cuda-11.0&quot;
  
  export LD_LIBRARY_PATH=&quot;$MPI_HOME/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH&quot;
  export PATH=&quot;$MPI_HOME/bin:$CUDA_HOME/bin:$PATH&quot;
  export PYTHONPATH=&quot;/usr/local/lib64/python3.6/site-packages:$PYTHONPATH&quot;
  </code></pre>
  <p>The run_script looks like:</p>
  <pre class="lang-bash prettyprint-override"><code>#!/usr/bin/bash
  
  export MPI_HOME=&quot;/usr/local/openmpi4.0/openmpi-4.0.0/build&quot;
  export CUDA_HOME=&quot;/usr/local/cuda-11.0&quot;
  
  export LD_LIBRARY_PATH=&quot;$MPI_HOME/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH&quot;
  export PATH=&quot;$MPI_HOME/bin:$CUDA_HOME/bin:$PATH&quot;
  export PYTHONPATH=&quot;/usr/local/lib64/python3.6/site-packages:$PYTHONPATH&quot;
  
  mpirun -np 3 --prefix /usr/local/openmpi4.0/openmpi-4.0.0/build --map-by ppr:4:node --oversubscribe --mca btl_openib_allow_ib 1 -host $AZ_BATCH_HOST_LIST $AZ_BATCH_TASK_SHARED_DIR/EXECUTABLE_FILE $AZ_BATCH_TASK_SHARED_DIR/INPUT_FILE_WITH_PARAMS
  </code></pre>
  <p>I am stuck with the error:</p>
  <pre><code>/path/to/my/executable: error while loading shared libraries: libmpi.so.12: cannot open shared object file: No such file or directory
  
  --------------------------------------------------------------------------
  Primary job  terminated normally, but 1 process returned
  a non-zero exit code. Per user-direction, the job has been aborted.
  --------------------------------------------------------------------------
  </code></pre>
  <p>I am not sure what I am doing wrong.
  Clearly, the env settings is not working.</p>
  <p>Can you point to how can I go about the env setup for the tasks ?</p>