Mark,
Thanks for the info. This seems to work on some occasions, and then not
on others. Still trying to narrow down the flakiness.
Thanks...
Jon
On Mon, 15 Apr 2002, Mark Moe wrote:
> Jon,
>
> We are doing the same: adding RedHat 7.2 job servers to our LSF queue.
>
> Anyway, this is a hack that I use for LSF and aliases:
>
> 1) we use csh with aliases, so I add this to queue definitions:
>
> JOB_STARTER = /cadtools/apps/lsf/exec/use_csh
>
> 2) here is my "use_csh" wrapper script:
>
> #!/cadtools/programs/perl
> # wrapper to make LSF use csh in a way that aliases are still valid
>
> # send to /bin/csh
> open CSH, "| /bin/csh";
>
> # restore environment vars as they were stored by LSF
> foreach $key (keys %ENV) {
> $value = $ENV{$key};
> $value =~ s/\'/\'\"\'\"\'/g; # in case the value contains single quotes
> printf CSH "setenv '%s' '%s'\n", $key, $value;
> }
>
> # set LM_PROJECT for tracking LSF usage of licensed products
> print CSH "setenv LM_PROJECT lsf\n";
>
> # send command
> $first = shift;
> print CSH $first;
> foreach (@ARGV) {
> print CSH " ";
> s/\'/\'\"\'\"\'/g; # in case arg contains single quotes
> print CSH "'$_'"; # single quote args
> }
> print CSH "\n";
> close CSH;
>
> It's messy, but I've been using the above since 1998 and LSF 3.2 (now on LSF 4.2).
>
> - Mark
>
> >>> Jonathan Turenne <jtu...@lu...> 04/15/02 08:31AM >>>
>
> We are introducing linux machines to our solaris environment. What we are
> doing is setting up a compute farm(LSF) of servers running RedHat 7.2.
> We have 2 issues in doing this:
>
> Issue 1
> -------
> Because all of our tools do not run under linux, our modulefiles contain a
> case statement, which determines the OS, and loads the appropriate
> binaries(if they exist). Iin the case of tools that do not run under
> linux, I echo a statement to the window, stating that the tool is
> unsupported under linux. The problem, is that because that case of the
> case statement was resolved, that modulefile shows up when we do a 'module
> list' command. Is there any sort of "trap" which would allow me to
> control whether the "module list" gets updated if this type of case
> resolves, and there is nothing to set up? I don't want to load something
> that doesn't exist.
>
>
> Issue 2
> -------
> Is anyone out there running LSF and Modulefiles? If so, have you noticed
> that the aliases that you set in the modulefiles using the "set-alias"
> command, don't get propagated when submiting a job to LSF? This happens
> in Solaris & Linux. Is there any way to get around this?
>
> Any help would be appreciated.
>
> Thanks,
>
> Jon
>
>
|