Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: using modules package?

  1. #1
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default using modules package?

    I'm confused by this (below, from an install document) - some software I'm using (NASA atmosphere software) calls for installing "modules" - and I'm unfamiliar with this approach. Am I supposed to create the 'modules' (listed in bold below)? I believe the command 'module' below is different for opensuse? I found the Modules package, but there is no command 'module' in it. It is apparently used to set paths (???) for libs and compilers? I always thought that was done with PATH and other environment variables. Can anyone help me understand what is going on here? Thanks! Patricia


    "To compile/build the model first setup your module environment, e.g.:


    module purge module load comp/intel-10.1.021 lib/mkl-9.1.023 mpi/impi-3.2.011"

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,863

    Default Re: using modules package?

    (below, from an install document)
    That install document describes to install on what? openSUSE?

    Modules is of course a common English word. And many software packages consist of modules. Do they mean Kernel modules?
    Henk van Velden

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: using modules package?

    A link to the software and the complete readme would probably help.


    --
    PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
    ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
    eCAFE 800: oS 12.2 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

  4. #4
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: using modules package?

    Am 06.10.2012 23:46, schrieb PattiMichelle:
    > module purge module load *comp/intel-10.1.021* *lib/mkl-9.1.023*
    > *mpi/impi-3.2.011"*

    Despite my question about the original software and readme:

    Have you even installed the proprietary intel compiler version 10 and
    the math kernel library version 9? You need of course get that from
    intel (gratis for private use only). I used them quite a bit a few years
    ago to test compatibility of my code with it.

    Note that this are stone age old versions, the mkl is at version 11 now
    and the intel compiler at version 13, so I am not even sure these old
    versions are still available and you have probably to check if what you
    want to install is compatible to supported versions or if you can use
    gcc compilers and other blas libraries with it.

    --
    PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
    ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
    eCAFE 800: oS 12.2 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

  5. #5
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: using modules package?

    Thank you for the replies!! I am trying to get some so docs on their use of MODULES - the refer to the sourceforge modules package.
    Modules -- Software Environment Management

    Now, it's always been my understanding that in Opensuse - modules are kernel-level things, not environment management things. I guess I'm a slow learner!

  6. #6
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: using modules package?

    Does anyone know how to use the "Modules" package under opensuse? I think I have to set an
    alias to the standard "module load" and "module unload" commands...

    Modules -- Software Environment Management

    And from YaST:
    The Modules package provides for dynamic modification of a user's environment with module files. Each module file contains the information needed to configure the shell for an application. Once the package is initialized, the environment can be modified dynamically on a per-module basis using the module command that interprets module files. Typically, module files instruct the module command to alter or set shell environment variables, such as PATH or MANPATH. Module files may be shared by many users on a system and users may have their own collection to supplement or replace the shared module files. The modules environment is common on SGI/Crays and many workstation farms.

    There are only two exe's - and what do I do with the .sh/.csh files?
    File Iist in the Modules package:
    Code:
    /etc/profile.d/modules.csh
    /etc/profile.d/modules.sh
    /usr/bin/add.modules
    /usr/bin/modulecmd
    /usr/share/doc/packages/Modules
    /usr/share/doc/packages/Modules/ChangeLog
    /usr/share/doc/packages/Modules/LICENSE.GPL
    /usr/share/doc/packages/Modules/ModuleCmd_Avail.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Clear.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Display.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Help.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Init.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_List.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Load.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Purge.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Switch.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Update.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Use.c.html
    /usr/share/doc/packages/Modules/ModuleCmd_Whatis.c.html
    /usr/share/doc/packages/Modules/Modules-Paper.doc
    /usr/share/doc/packages/Modules/PROBLEMS
    /usr/share/doc/packages/Modules/README
    /usr/share/doc/packages/Modules/TODO
    /usr/share/doc/packages/Modules/cmdAlias.c.html
    /usr/share/doc/packages/Modules/cmdConflict.c.html
    /usr/share/doc/packages/Modules/cmdInfo.c.html
    /usr/share/doc/packages/Modules/cmdIsLoaded.c.html
    /usr/share/doc/packages/Modules/cmdLog.c.html
    /usr/share/doc/packages/Modules/cmdMisc.c.html
    /usr/share/doc/packages/Modules/cmdModule.c.html
    /usr/share/doc/packages/Modules/cmdPath.c.html
    /usr/share/doc/packages/Modules/cmdSetenv.c.html
    /usr/share/doc/packages/Modules/cmdTrace.c.html
    /usr/share/doc/packages/Modules/cmdUlvl.c.html
    /usr/share/doc/packages/Modules/cmdUname.c.html
    /usr/share/doc/packages/Modules/cmdVerbose.c.html
    /usr/share/doc/packages/Modules/cmdVersion.c.html
    /usr/share/doc/packages/Modules/cmdWhatis.c.html
    /usr/share/doc/packages/Modules/cmdXResource.c.html
    /usr/share/doc/packages/Modules/cxref.apdx.html
    /usr/share/doc/packages/Modules/cxref.function
    /usr/share/doc/packages/Modules/cxref.html
    /usr/share/doc/packages/Modules/cxref.include
    /usr/share/doc/packages/Modules/cxref.typedef
    /usr/share/doc/packages/Modules/cxref.variable
    /usr/share/doc/packages/Modules/error.c.html
    /usr/share/doc/packages/Modules/getopt.c.html
    /usr/share/doc/packages/Modules/index.html
    /usr/share/doc/packages/Modules/init.c.html
    /usr/share/doc/packages/Modules/locate_module.c.html
    /usr/share/doc/packages/Modules/main.c.html
    /usr/share/doc/packages/Modules/utility.c.html
    /usr/share/doc/packages/Modules/version.c.html
    /usr/share/man/man1/module.1.gz
    /usr/share/man/man4/modulefile.4.gz
    /usr/share/modules
    /usr/share/modules/3.1.6
    /usr/share/modules/init
    /usr/share/modules/init/.modulespath
    /usr/share/modules/init/bash
    /usr/share/modules/init/csh
    /usr/share/modules/init/ksh
    /usr/share/modules/init/perl
    /usr/share/modules/init/python
    /usr/share/modules/init/sh
    /usr/share/modules/init/tcsh
    /usr/share/modules/init/zsh
    /usr/share/modules/modulefiles
    /usr/share/modules/modulefiles/dot
    /usr/share/modules/modulefiles/module-cvs
    /usr/share/modules/modulefiles/module-info
    /usr/share/modules/modulefiles/modules
    /usr/share/modules/modulefiles/null
    /usr/share/modules/modulefiles/use.own
    
    74 files total

  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: using modules package?

    Am 26.10.2012 18:06, schrieb PattiMichelle:
    >
    > Does anyone know how to use the "Modules" package under opensuse? I
    > think I have to set an
    > alias to the standard "module load" and "module unload" commands...
    >

    after you have installed the package Modules you need to log out and log
    in again such that /etc/profile.d/modules.sh becomes effective, after
    that module is available in your shell (this is for bash, I have not
    tested the .csh version).

    --
    PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
    ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
    eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

  8. #8
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: using modules package?

    Thanks for the reply!!!
    I added an alias to .bashrc.... alias module='modulecmd bash'

    ...so now:
    Code:
    patti@laptop-OS121:~> module avail
    
    --------------------------------------------------------- /usr/share/modules ---------------------------------------------------------
    3.1.6                   modulefiles/dot         modulefiles/module-info modulefiles/null
    modulefiles/Intel13     modulefiles/module-cvs  modulefiles/modules     modulefiles/use.own
    
    --------------------------------------------------- /usr/share/modules/modulefiles ---------------------------------------------------
    Intel13     dot         module-cvs  module-info modules     null        use.own
    _MODULESBEGINENV_='/home/patti/.modulesbeginenv';export _MODULESBEGINENV_;patti@laptop-OS121:~> 
    patti@laptop-OS121:~> cat /usr/share/modules/modulefiles/Intel13
    #%Module1.0#####################################################################
    ##
    ##      intel13 openmpi module
    ##
    proc ModulesHelp { } {
            puts stderr "Sets up the paths you need to run Intel 13 with OpenMPI 1.6.2"
    }
    
    set sys        [uname sysname]
    set base        /usr/local/iopenmpi_162
    set version     13
    set basepath    $base
    
    set modname     [module-info name]
    set modmode     [module-info mode]
                                                                                    
    prepend-path PATH $basepath/bin
    prepend-path INCLUDE $basepath/include
    prepend-path DYLD_LIBRARY_PATH $basepath/lib
    
    #setenv MODELERC /Users/ccruz/.modelErc.I12
    #setenv PFUNIT  /Users/ccruz/libraries/pFUnit.intel12
    patti@laptop-OS121:~>
    Which is almost-normal behavior. So now I try:
    Code:
    patti@laptop-OS121:~> module load Intel13
    INCLUDE='/usr/local/iopenmpi_162/include';export INCLUDE;DYLD_LIBRARY_PATH='/usr/local/iopenmpi_162/lib';export DYLD_LIBRARY_PATH;PATH='/usr/local/iopenmpi_162/bin:/usr/lib64/mpi/gcc/openmpi/bin:/home/patti/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin';export PATH;_MODULESBEGINENV_='/home/patti/.modulesbeginenv';export _MODULESBEGINENV_;_LMFILES_='/usr/share/modules/modulefiles/Intel13';export _LMFILES_;LOADEDMODULES='Intel13';export LOADEDMODULES;patti@laptop-OS121:~> 
    patti@laptop-OS121:~> echo $PATH
    /usr/lib64/mpi/gcc/openmpi/bin:/home/patti/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
    patti@laptop-OS121:~>
    It doesn't actually prepend the path!! So this does not seem to be working correctly.

  9. #9
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: using modules package?

    Am 26.10.2012 19:36, schrieb PattiMichelle:
    > I added an alias to .bashrc.... alias module='modulecmd bash'


    That is not how it works, you seem to overwrite what the automatic
    definition of /etc/profile.d/modules.sh does for you. It is defined as a
    function not as an alias.
    Based on what documentation did you add that alias?

    --
    PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
    ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
    eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

  10. #10
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: using modules package?

    Yes, that is what I mean I am trying to figure out how to use the Modules package (see YaST). I don't know what i am doing or how to use this package. It is not installed by default in opensuse 12.1, but probably should be given that many softwares are expecting it to be present.

    The manpage said:

    Man page of MODULE:
    "Package Initialization

    The Modules package and the module command are initialized when a shell-specific initialization script is sourced into the shell. The script creates the module command, either as an alias or shell function, creates Modules environment variables, and if enabled to do so, a snapshot of the environment is saved as either (if BEGINENV=1) $HOME/.modulesbeginenv or (if BEGINENV=99) whatever $MODULESBEGINENV points to."


    The above is what made me think I had to create the alias in order to use the module... command. Can you tell me how to get the standard Modules commands module load, module avail, etc. to work correctly? I also use bash mostly.

    This is as far as I have gotten...

    Code:
    patti@laptop-OS121:~> module
    If 'module' is not a typo you can use command-not-found to lookup the package that contains it, like this:
        cnf module
    patti@laptop-OS121:~> alias module='modulecmd bash'
    patti@laptop-OS121:~> module
    cmdModule.c(169):ERROR:11: Usage is 'bash subcommand  [arguments ...] '
    
      Modules Release 3.1.6 (Copyright GNU GPL v2 1991):
      Available Commands and Usage:
            + add|load              modulefile [modulefile ...]
            + rm|unload             modulefile [modulefile ...]
            + switch|swap           modulefile1 modulefile2
            + display|show          modulefile [modulefile ...]
            + avail                 [modulefile [modulefile ...]]
            + use [-a|--append]     dir [dir ...]
            + unuse                 dir [dir ...]
            + update
            + purge
            + list
            + clear
            + help                  [modulefile [modulefile ...]]
            + whatis                [modulefile [modulefile ...]]
            + apropos|keyword       string
            + initadd               modulefile [modulefile ...]
            + initprepend           modulefile [modulefile ...]
            + initrm                modulefile [modulefile ...]
            + initswitch            modulefile1 modulefile2
            + initlist
            + initclear
    
    patti@laptop-OS121:~> module avail
    
    --------------------------------------------------------- /usr/share/modules ---------------------------------------------------------
    3.1.6                   modulefiles/dot         modulefiles/module-info modulefiles/null
    modulefiles/Intel13     modulefiles/module-cvs  modulefiles/modules     modulefiles/use.own
    
    --------------------------------------------------- /usr/share/modules/modulefiles ---------------------------------------------------
    Intel13     dot         module-cvs  module-info modules     null        use.own
    _MODULESBEGINENV_='/home/patti/.modulesbeginenv';export _MODULESBEGINENV_;patti@laptop-OS121:~>

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •