moduleluahpclmod

Remove local lmod modules or update local lmod module list on HPC cluster


I am working on a HPC cluster. I successfully created my local openmpi_gpu module (compiled with intel17.2 and cuda 8.0). What I did is that storing a cuda_17.2.lua file in the directory

${HOME}/modulefiles/Core/openmpi_gpu/

And after

module use $HOME/modulefiles/Core

I can see the new module "openmpi_gpu/cuda_17.2" by typing module avail.

Now, I intend to delete this module and replace it by a new openmpi compiled with intel 17.2 without cuda/8.0. So I rm -rf openmpi_gpu to remove the source file of openmpi_gpu, and recompile an openmpi just with intel 17.2. Then I remove the directory ${HOME}/modulefiles/Core/openmpi_gpu/, and create a new directory ${HOME}/modulefiles/Core/openmpi_intel/ to store the new .lua file local_17.2.lua.

However, now I tried module avail but can still see the old module "openmpi_gpu/cuda_17.2", and cannot see the new module "openmpi/local_17.2".

I doubt that I should not delete the module just by removing the source file, or I should do something to update the module list. Anyway, does anyone has any idea about this problem? Thank you in advance.


Solution

  • Lmod uses a cache so you are probably just seeing the cache and it has not been updated. Run the following command to reset it:

    rm -rf    ~/.lmod.d/.cache
    

    Alternatively, you can use the --ignore_cache option:

    module --ignore_cache avail