Thanks very much ! Seems like in the cluster I use, it is located at
/app/modules/4.1.0-gcc-4.8.5/init/
Difficult to locate. :P
I had the same puzzle and then looked inside the script /etc/profile.d/modules.sh.
So your app/modules/4.1 etc is a module file. It can only be loaded because your .bashrc has run /etc/profile.d/modules.sh
That in turn runs the scripts that you need to include in the config_machines.xml.
I followed the pattern of the installed file and ended up with:
<module_system type="module">
<init_path lang="perl">/exports/applications/apps/SL7/environment-modules-3.2.10/Modules/3.2.10/init/perl.pm</init_path>
<init_path lang="python">/exports/applications/apps/SL7/environment-modules-3.2.10/Modules/3.2.10/init/python.py</init_path>
<init_path lang="csh">/etc/profile.d/modules.sh</init_path>
<init_path lang="sh">/etc/profile.d/modules.sh</init_path>
<cmd_path lang="perl">/exports/applications/apps/SL7/environment-modules-3.2.10/Modules/3.2.10/bin/modulecmd perl</cmd_path>
<cmd_path lang="python">/exports/applications/apps/SL7/environment-modules-3.2.10/Modules/3.2.10/bin/modulecmd python</cmd_path>
Of course you would have something different to my "/exports/applications/apps/SL7/environment-modules-3.2.10/Modules/3.2.10/"