Module LMOD TCL在加载模块时执行bash脚本
有个小问题你可以帮我解决。在我们的新集群上,我们使用LMod作为环境模块系统 为OpenFOAM创建模块TCL脚本时,需要加载依赖于系统的bashrc文件 这是我在另一个模块系统上使用的TCL脚本,它运行良好。我无法在Lmod中执行“source”命令行,这里缺少什么Module LMOD TCL在加载模块时执行bash脚本,module,openfoam,Module,Openfoam,有个小问题你可以帮我解决。在我们的新集群上,我们使用LMod作为环境模块系统 为OpenFOAM创建模块TCL脚本时,需要加载依赖于系统的bashrc文件 这是我在另一个模块系统上使用的TCL脚本,它运行良好。我无法在Lmod中执行“source”命令行,这里缺少什么 #%Module1.0##################################################################### ## ## modules software/openfoa
#%Module1.0#####################################################################
##
## modules software/openfoam_v1812
##
## /opt/software/openfoam/openfoamv1812/OpenFOAM-v1812
proc ModulesHelp { } {
global version modroot
puts stderr "software/OpenFOAM-v1812 - sets the Environment for OpenFOAM-v1812 (openfoam.com)"
}
module-whatis "Sets the environment for using OpenFOAM-v1812"
# for Tcl script use only
set VERSION v1812
set OpenFOAM_PATH /opt/software/openfoam/openfoam${VERSION}/OpenFOAM-${VERSION}
set FOAM_INST_DIR /opt/software/openfoam/openfoam${VERSION}
puts stdout "source /opt/software/openfoam/openfoam${VERSION}/OpenFOAM-${VERSION}/etc/bashrc;"
我不是专家,但我最近遇到了一个类似的问题,我在模型中激活蟒蛇。在我的例子中,解决方案是在LMod中使用“execute”命令 其中包含以下文件:
execute{cmd=”“,modeA={“load”}
以特定模式运行任何命令。例如,执行{cmd=“ulimit
-s unlimited”,modeA={“load”}}将运行命令ulimit-s unlimited,这是加载模块所做的最后一件事
希望这有帮助