Sandbox/Migration example: Difference between revisions

From CNM Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 6: Line 6:
   
   
  Your module commands will be _removed_ from .bashrc and instead placed into two similar
  Your module commands will be _removed_ from .bashrc and instead placed into two similar
  files .modules-1 and .modules-2, for use by different operating system releases.
  files .modules-1 and .modules-el6, for use by different operating system releases.
   
   
  NOTE: The file text manipulation done here is fairly basic. You will have
  NOTE: The file text manipulation done here is fairly basic. You will have
Line 28: Line 28:
  `.bashrc.tentative' -> `.bashrc'
  `.bashrc.tentative' -> `.bashrc'
   
   
  Opening text editor for .modules-1.tentative .modules-2.tentative ...
  Opening text editor for .modules-1.tentative .modules-el6.tentative ...
  '''Continue? [Y/n] '''y
  '''Continue? [Y/n] '''y


Line 55: Line 55:
  # vim:syntax=tcl:
  # vim:syntax=tcl:
   
   
  ==> .modules-2.tentative <==
  ==> .modules-el6.tentative <==
  # Carbon modules initialization for v2-style module names, used on CentOS-6.
  # Carbon modules initialization for v2-style module names, used on CentOS-6.
  # Also used on CentOS-5 if .modules-1 does not exist.
  # Also used on CentOS-5 if .modules-1 does not exist.
Line 72: Line 72:
  Renaming files ...
  Renaming files ...
  `.modules-1.tentative' -> `.modules-1'
  `.modules-1.tentative' -> `.modules-1'
  `.modules-2.tentative' -> `.modules-2'
  `.modules-el6.tentative' -> `.modules-el6'
  Done.
  Done.

Revision as of 20:32, April 28, 2016

Here is an example of what you might see:

$ modules-migrate  

This application will help you adapt your environment-modules customizations to
Carbon's naming scheme 2 (introduced in 2016).

Your module commands will be _removed_ from .bashrc and instead placed into two similar
files .modules-1 and .modules-el6, for use by different operating system releases.

NOTE: The file text manipulation done here is fairly basic. You will have
opportunity to review and edit the results. 

Continue? [Y/n] y
======================================================================
diff of changes from .bashrc:
======================================================================

19,21c19,21
< module load vasp5
< module load g09/D.01.x86_64-2
< module load GaussView
---
> #	module load vasp5
> #	module load g09/D.01.x86_64-2
> #	module load GaussView
Accept changes in .bashrc? [Y/n] y
Putting in place ...
`.bashrc.tentative' -> `.bashrc'

Opening text editor for .modules-1.tentative .modules-el6.tentative ...
Continue? [Y/n] y

A text editor will open (session output omitted here).

  • Review and adapt as needed.
  • Save each file.
  • Quit the editor.

Example output continues:

======================================================================
Review: "module" lines in new files:
======================================================================

==> .modules-1.tentative <==
# Carbon modules initialization for v1-style module names, used on CentOS-5.
# To stop using v1-style modules, remove this file.
#
# Initially extracted from .bashrc by modules-migrate .
#
# This file is in TCL syntax.

module load vasp5
module load g09/D.01.x86_64-2
module load GaussView

# vim:syntax=tcl:

==> .modules-el6.tentative <==
# Carbon modules initialization for v2-style module names, used on CentOS-6.
# Also used on CentOS-5 if .modules-1 does not exist.
#
# Initially extracted from .bashrc by modules-migrate .
#
# This file is in TCL syntax.

module load vasp5
module load gaussian/09/D.01.x86_64-2
module load gaussview

# vim:syntax=tcl:
======================================================================
Accept changes (a), Edit (e), or Quit (q)? a
Renaming files ...
`.modules-1.tentative' -> `.modules-1'
`.modules-el6.tentative' -> `.modules-el6'
Done.