environment problem for nvvp

Hello,

I have noticed a very strange problem that only happens on our cluster (OS is RHEL 6.2 and cuda toolkit 5.5):

when trying to profile an application with nvvp, I get the following error message:
Unable to profile application.
org.eclipse.core.runtime.CoreException: Reference to undefined variable MODULE_VERSION

I know that this env variable MODULE_VERSION is set by the module environment tools on our cluster; I really don’t why it is undefined in nvvp.

If I use nsight on the same machine, and use the profiler from inside nsight, the profiler works great ! Meaning here there is not problem with this environment variable, why ??

I can use nvvp/nsight without any problem on other systems (Ubuntu 12.10 and other).

How can we track this environment problem that exists for nvvp but not for nsight ?

Thank for your help.

Pierre.

PS: full log of nvvp:

!SESSION 2013-10-17 16:14:01.235 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_07
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Command-line arguments: -os linux -ws gtk -arch x86_64 -data @user.home/nvvp_workspace

!ENTRY com.nvidia.viper 4 0 2013-10-17 16:14:23.568
!MESSAGE Unable to profile application.
!STACK 1
org.eclipse.core.runtime.CoreException: Reference to undefined variable MODULE_VERSION
at org.eclipse.core.internal.variables.StringSubstitutionEngine.resolve(StringSubstitutionEngine.java:262)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.substitute(StringSubstitutionEngine.java:195)
at org.eclipse.core.internal.variables.StringSubstitutionEngine.performStringSubstitution(StringSubstitutionEngine.java:87)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:574)
at org.eclipse.core.internal.variables.StringVariableManager.performStringSubstitution(StringVariableManager.java:350)
at org.eclipse.debug.internal.core.LaunchManager.getEnvironment(LaunchManager.java:1291)
at org.eclipse.core.externaltools.internal.launchConfigurations.ProgramLaunchDelegate.launch(ProgramLaunchDelegate.java:103)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:697)
at com.nvidia.viper.run.TimelineRunner.runWithMonitor(TimelineRunner.java:151)
at com.nvidia.viper.run.TimelineRunner$TimelineJob.run(TimelineRunner.java:303)
at com.nvidia.viper.ViperJob$1.run(ViperJob.java:94)
!SUBENTRY 1 org.eclipse.core.variables 4 120 2013-10-17 16:14:23.569
!MESSAGE Reference to undefined variable MODULE_VERSION

Hi all,

I found where my problem was.
It’s not directly due to nvvp; actually in the module environment init file that is sourced by bash_profile, the module function was defined like this
export MODULE_VERSION=default
module() {
eval /gpfslocal/pub/Modules/${MODULE_VERSION}/bin/modulecmd $MODULESHELL $*;
}

Just by removing the curly brackets arround MODULE_VERSION made nvvp working !