WebMO - Computational chemistry on the WWW
Recent news

WebMO 17.0 is now available for free download!

WebMO 17.0 Pro and Enterprise have a variety of additional features and is available for purchase.

The WebMO app is now available for iOS and Android.

August 24, 2019

Environment Modules and WebMO Log Out | Topics | Search
Moderators | Edit Profile

WebMO Support Forum » WebMO Installation » Other » Environment Modules and WebMO « Previous Next »

Author Message
Corey Keasling
Unregistered guest
Posted on Monday, January 09, 2017 - 3:40 pm:   

I manage software on my cluster with the Lmod environment modules package. This permits varying user software environments for different requirements, including things such as differing MPIs built with different toolchains; different versions of python; and generally creating flexibility where none would otherwise exist.

As such, there is no single default user environment. To be specific: the version of python installed for psi4 must be distinct from the version used for system tools, and requires a user request that python specifically before psi4 will run. My build of python 2.7 has a further dependency on the libquadmath shipped with gcc 4.9. How do I get WebMO to run the appropriate module load commands as part of its job submission process?

Essentially what I need is for the job script to include commands like "module load gcc; module load python/2.7; module load psi4" as part of its preamble. I can probably hack the source to make this happen, but perhaps there's an elegant way to do it that I've overlooked.

Please advise.
JR Schmidt
Moderator
Username: Schmidt

Post Number: 543
Registered: 11-2006
Posted on Monday, January 09, 2017 - 3:45 pm:   

With the newest version of WebMO enterprise and assuming you are using an external batch queue (e.g. Torque, SGE, etc.), you can create a script ".webmo_profile" in the <webmo_userdir> that will be sourced (by BASH) in the job submission script.

If the script exists, it should get used.
Corey Keasling
Unregistered guest
Posted on Monday, January 09, 2017 - 6:59 pm:   

I'll try that. However, it would be nice if there could be different scripts for each package - or, better, if preamble commands could be set for each package in the configuration. For example, psi4 and its stack was built with GCC while Molpro and GAMESS are both built with the intel compilers (and depend on different libraries). I can't easily configure one user environment for all of our chemical packages at the same time. I need a mechanism that lets WebMO load only the modules required for a given job. Otherwise I have to see if I can rebuild everything with the same compiler and libraries, and that's pretty suboptimal in some cases.

Thanks for your help!
JR Schmidt
Moderator
Username: Schmidt

Post Number: 544
Registered: 11-2006
Posted on Tuesday, January 10, 2017 - 10:33 am:   

With a little tweak in the "daemon_pbs.cgi" script (around line 395, where the .webmo_profile script is sourced) you can easily edit this to:

.webmo_profile_$interface

which will allow you to specify different scripts to be sourced for each interface.
Corey Keasling
Unregistered guest
Posted on Tuesday, January 10, 2017 - 2:47 pm:   

Beautiful, thank you!

Can you point me to where I can make a similar change for Slurm? We'll be migrating in the next few months...
JR Schmidt
Moderator
Username: Schmidt

Post Number: 545
Registered: 11-2006
Posted on Tuesday, January 10, 2017 - 3:09 pm:   

The same code path is used for all external batch queue systems (the CGI file naming is just a historical artifact).

Add Your Message Here
Post:
Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration