Opened 5 years ago

Closed 5 years ago

#1498 closed help (worksforme)

problem with .profile entries

Reported by: markr Owned by: um_support
Component: ARCHER Keywords: profile aprun not found
Cc: Platform: ARCHER
UM Version: 8.6

Description

Hello CMS,
I am just recently back to using Archer. I did attend the training courses for UMUI in Dec and UKCA in Jan.
However, now when I log into Archer I see the following:

-bash: PROMPT_COMMAND: readonly variable
-bash: HISTCONTROL: readonly variable
-bash: HISTSIZE: readonly variable
-bash: PROMPT_COMMAND: readonly variable
-bash: HISTCONTROL: readonly variable
-bash: HISTSIZE: readonly variable

which I attribute to the inclusion of the

. /etc/profile
. /etc/bash.bashrc

in my .profile (as advised and previously no issue), removing them stops the messages.

I am working with version 8.2 (the UKCA tutorials)

I think the requirement for those two lines could be omitted if we used the "—login"
flag for the /bin/ksh line.
I am awaiting a run to prove this.
or somehow explicitly load the module for aprun and report loaded modules.

Change History (6)

comment:1 Changed 5 years ago by markr

When I remove them I get the "aprun not found" issue.

comment:2 follow-up: Changed 5 years ago by ros

Hi Mark,

It does no harm having these warnings, just can be a bit unsightly. The solution ARCHER gave me was to redirect the output to /dev/null!

I have found I actually don't need to run . /etc/profile in my .profile just the bash.bashrc. So I now have:

. /etc/bash.bashrc  > /dev/null 2>&1

You've just reminded me I still need to change this in some of the UMUI versions too.

Regards,
Ros.

comment:3 Changed 5 years ago by markr

Okay, there was also an issue for me that looked like a login problem earlier in week.
I discovered it was the ssh-agent "environment file" but I had also removed those unsightly
(and slightly concerning) lines from my profile.

After all is not the default behaviour on Linux to process those /etc files?
Surely there is a better way to get aprun and PBS environment on ones path?

comment:4 in reply to: ↑ 2 Changed 5 years ago by markr

Okay, there was also an issue for me that looked like a login problem earlier in week.

I discovered it was the ssh-agent "environment file" but I had also removed those unsightly
(and slightly concerning) lines from my profile.

After all is not the default behaviour on Linux to process those /etc files?
Surely there is a better way to get aprun and PBS environment on ones path?

Replying to ros:

Hi Mark,

It does no harm having these warnings, just can be a bit unsightly. The solution ARCHER gave me was to redirect the output to /dev/null!

I have found I actually don't need to run . /etc/profile in my .profile just the bash.bashrc. So I now have:

. /etc/bash.bashrc  > /dev/null 2>&1

You've just reminded me I still need to change this in some of the UMUI versions too.

Regards,
Ros.

comment:5 Changed 5 years ago by markr

Hello again,
back to looking at Archer.
My experimental adding "—login" to the job /bin/ksh line did not work.
I wonder where hum changes the PATH?
loadcomp seems to be invoked only with a compile and invoking it interactively only modifies by swapping modules i.e. the PATH still finds aprun in:

/opt/cray/eslogin/eswrap/1.1.0-1.010400.915.0/bin/aprun

this is because module eswrap/1.1.0-1.010400.915.0 is still loaded.

Is it possible to display (list) modules that are active for rcf and run?
The PATH is echoed in the rcf log file and it is clear it has not retained the eswrap
info.
Also I will want to activate the craypat modules when I get onto profiling my development on archer.

I do not like a crude solution to adding . /etc/bash.bashrc to my profile it might interfere with other work I do.

Mark

comment:6 Changed 5 years ago by annette

  • Resolution set to worksforme
  • Status changed from new to closed

Hi Mark,

As this ticket has been inactive for 4 weeks I'm going to close it.

Just to clarify, the line:

. /etc/bash.bashrc  > /dev/null 2>&1

is required for access to module and aprun as recommended to us by Archer support. As I understand it, this is just required because of the way we run the UM, not because the UM changes the environment.

We are satisfied that it works, therefore have no plans (or resources) to investigate further.

Best regards,
Annette

Note: See TracTickets for help on using tickets.