On Fri, Jan 05, 2018 at 08:02:18AM +0000, [email protected] wrote: > Hi, > > > > We have recently upgraded one submit host from RHEL6.7 to RHEL7.2. > > Most of our grid execution servers are RHEL6.7, with a few RHEL6.3 > servers. When we run any jobs by using "-V" option to export environment > variables, it does not work and the job fails. In RHEL7 the /bin directory has been replaced by a symlink to /usr/bin and /sbin by a symlink to /usr/sbin. The former contents have been merged.
The default path in RHEL7 includes /usr/bin but not /bin. In RHEL6 /bin and
/usr/bin
are different directories and most binaries only exist in one place or the
other.
I don't have a RHEL6 box to hand but on RHEL5 both sleep and date live in /bin
rather
than /usr/bin.
Adding a line to the script PATH="${PATH}:/bin" will probably result in the
binary being found.
Rather than passing the entire environment through it might be better to make
your scripts
run a login shell:
#!/bin/bash -l
so that the environment gets set up correctly for the machine on which the job
is run.
Then pass any environment variables you actually need via -v options.
William
>
>
>
> As an example examine a simple job:
>
>
>
> <code>
>
> #!/bin/bash
>
>
>
> date
>
> echo "Sleeping now"
>
> sleep $1
>
>
>
> </code>
>
>
>
> When we run this job without exporting environment variables, it works
> fine. But exporting environment variables causes errors as shown below:
>
>
>
> <BASE_PATH>/job_scripts/2666843: line 3: date: command not found
>
> <BASE_PATH>/job_scripts/2666843: line 5: sleep: command not found
>
>
>
> Of course, this issue is persistent in interactive jobs also, which causes
> applications not working properly.
>
>
>
> Is there any way to circumvent this issue?
>
>
>
> Thanks and regards,
> Srinivas.
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you
> are not the intended recipient, you should not disseminate, distribute or
> copy this e-mail. Please notify the sender immediately and destroy all
> copies of this message and any attachments. WARNING: Computer viruses can
> be transmitted via email. The recipient should check this email and any
> attachments for the presence of viruses. The company accepts no liability
> for any damage caused by any virus transmitted by this email.
> www.wipro.com
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
> _______________________________________________
> users mailing list
> [email protected]
> https://gridengine.org/mailman/listinfo/users
signature.asc
Description: PGP signature
_______________________________________________ users mailing list [email protected] https://gridengine.org/mailman/listinfo/users
