Okay so if I put the following line in sge's modulefile: set arch [exec $env(SGE_ROOT)/util/arch]
then $arch will contain the correct platform string. However, the downside is that each time you open a shell, the program /opt/sge/util/arch needs to be run - it causes about 2-3 seconds delay. Comments? Cheers, Bernard > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Jeff Squyres > Sent: Friday, December 16, 2005 6:13 > To: [email protected] > Subject: Re: [Oscar-devel] SGE's modulefile > > I agree -- you can do a fair bit of conditional logic in > modulefiles; > this is one of the exact use-cases where this capability is useful. > Find a way to determine which platform *should* be in the path, and > set it accordingly. > > > On Dec 16, 2005, at 4:48 AM, Erich Focht wrote: > > > Hi Bernard, > > > > I have a third option for you ;-) > > > > 3) use tcl "if" statements and do some parsing of the uname output > > inside the > > module file. > > > > Regards, > > Erich > > > > On Friday 16 December 2005 10:27, Bernard Li wrote: > >> I have a dilemna with SGE's modulefile. The modulefile basically > >> sets the PATH, MANPATH, LD_LIBRARY_PATH for the application, > >> however, the PATH would look like this depending on what > >> architecture it is running on: > >> > >> /opt/sge/bin/lx26-x86 > >> > >> So there are two options: > >> > >> 1) Have PATH for all three archs: > >> > >> append-path PATH /opt/sge/bin/lx26-x86;/opt/sge/bin/lx26-amd64;/ > >> opt/sge/bin/lx26-ia64 > >> > >> -or- > >> > >> 2) Have the modulefile arch specific > >> > >> Also, I just realized that I will need more PATHs for option 1) > >> because there is also the scenario where it will be lx24-x86 (2.4 > >> kernel) > >> > >> Thoughts? > >> > >> Cheers, > >> > >> Bernard > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through > > log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD > > SPLUNK! > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > _______________________________________________ > > Oscar-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/oscar-devel > > > -- > {+} Jeff Squyres > {+} The Open MPI Project > {+} http://www.open-mpi.org/ > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep > through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. > DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Oscar-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/oscar-devel > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Oscar-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oscar-devel
