Sandbox/Migration example: Difference between revisions

From CNM Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Here is an example of what you might see:
Here is an example of what you might see (subject to change as the utility evolves):
  $ modules-migrate   
  $ modules-migrate   
  This application will help you adapt your environment-modules customizations to
  This application will help you adapt your environment-modules customizations to
  Carbon's naming scheme 2 (introduced in 2016).
  Carbon's 2016 module naming scheme.
   
   
  Your module commands will be _removed_ from .bashrc and instead placed into two similar
  Your module commands in .bashrc will be deactivated (commented out) and instead
files .modules-1 and .modules-el6, for use by different operating system releases.
placed into two similar files .modules-el5-legacy and .modules-el6, for use by different
operating system releases.
   
   
  NOTE: The file text manipulation done here is fairly basic. You will have
  This helper application will modify your files in a fairly simplistic manner.
opportunity to review and edit the results.  
You will have an opportunity to manually review and refine the edits.  
   
   
  '''Continue? [Y/n] '''y
  '''Continue? [Y/n] '''y
  ======================================================================
  ----------------------------------------------------------------------
  diff of changes from .bashrc:
  diff of changes from .bashrc:
  ======================================================================
  ----------------------------------------------------------------------
   
   
  19,21c19,21
  8,10c8,10
  < module load vasp5
  < module load vasp5
  < module load g09/D.01.x86_64-2
  < module load g09/D.01.x86_64-2
Line 28: Line 28:
  `.bashrc.tentative' -> `.bashrc'
  `.bashrc.tentative' -> `.bashrc'
   
   
  Opening text editor for .modules-1.tentative .modules-el6.tentative ...
  Opening text editor for .modules-el5-legacy.tentative .modules-el6.tentative ...
  '''Continue? [Y/n] '''y
  '''Continue? [Y/n] '''y


Line 37: Line 37:


Example output continues:
Example output continues:
  ======================================================================
  ----------------------------------------------------------------------
Review: "module" lines in new files:
======================================================================
   
   
  ==> .modules-1.tentative <==
  ==> .modules-el5-legacy.tentative <==
# Carbon modules initialization for v1-style module names, used on CentOS-5.
# Carbon initialization for modules in scheme 1, used on CentOS-5.
# To stop using v1-style modules, remove this file.
# To use scheme 2 instead, create .modules-el5.
#
#
# Initially extracted from .bashrc by modules-migrate .
# Initially extracted from .bashrc by modules-migrate .
#
#
# This file is in TCL syntax.
# This file is read by module profile/user, in TCL syntax.
module load vasp5
module load g09/D.01.x86_64-2
module load GaussView
# vim:syntax=tcl:
==> .modules-el6.tentative <==
# Carbon initialization for modules in scheme 2, used on CentOS-6.
# Symlink this file to .modules-el5 to load the same set on older nodes.
#
# Initially extracted from .bashrc by modules-migrate .
#
# This file is read by module profile/user, in TCL syntax.
module load vasp5
module load gaussian/09/D.01.x86_64-2
module load gaussview
# vim:syntax=tcl:
   
   
  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
    View (v)
module load gaussian/09/D.01.x86_64-2
    Edit (e)
  module load gaussview
    Test (t)
    Cancel (c)
    Install and quit (q)
  '''Enter selection: '''q
   
   
  # vim:syntax=tcl:
  Installing files ...
======================================================================
  `.modules-el5-legacy.tentative' -> `.modules-el5-legacy'
'''Accept changes (a), Edit (e), or Quit (q)? '''a
Renaming files ...
  `.modules-1.tentative' -> `.modules-1'
  `.modules-el6.tentative' -> `.modules-el6'
  `.modules-el6.tentative' -> `.modules-el6'
  Done.
  Done.

Latest revision as of 17:33, November 4, 2016

Here is an example of what you might see (subject to change as the utility evolves):

$ modules-migrate  
This application will help you adapt your environment-modules customizations to
Carbon's 2016 module naming scheme.

Your module commands in .bashrc will be deactivated (commented out) and instead
placed into two similar files .modules-el5-legacy and .modules-el6, for use by different
operating system releases.

This helper application will modify your files in a fairly simplistic manner.
You will have an opportunity to manually review and refine the edits. 

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

8,10c8,10
< 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-el5-legacy.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:

----------------------------------------------------------------------

==> .modules-el5-legacy.tentative <==
	# Carbon initialization for modules in scheme 1, used on CentOS-5.
	# To use scheme 2 instead, create .modules-el5.
	#
	# Initially extracted from .bashrc by modules-migrate .
	#
	# This file is read by module profile/user, in TCL syntax.
	
	module load vasp5
	module load g09/D.01.x86_64-2
	module load GaussView
	
	# vim:syntax=tcl:
	
==> .modules-el6.tentative <==
	# Carbon initialization for modules in scheme 2, used on CentOS-6.
	# Symlink this file to .modules-el5 to load the same set on older nodes.
	#
	# Initially extracted from .bashrc by modules-migrate .
	#
	# This file is read by module profile/user, in TCL syntax.
	
	module load vasp5
	module load gaussian/09/D.01.x86_64-2
	module load gaussview
	
	# vim:syntax=tcl:

----------------------------------------------------------------------

    View		(v)
    Edit		(e)
    Test		(t)
    Cancel		(c)
    Install and quit	(q)
Enter selection: q

Installing files ...
`.modules-el5-legacy.tentative' -> `.modules-el5-legacy'
`.modules-el6.tentative' -> `.modules-el6'
Done.