olb [1] $SMEI/ucsd/gen/python/olb.py
[Previous] [Next]
 NAME:
	olb
 PURPOSE:
	Recompile all F77 subroutines and functions, and create object library
	libgen.a from the object files
 CALLING SEQUENCE:
	olb
	olb module  (where 'module' is an F77 module, e.g. forgen)
 INPUTS:
	Fortran files selected from a number of subdirectories (see PROCEDURE).
 OPTIONAL INPUTS:
	-g77		use g77 compiler
	-intel		use Intel Fortran compiler
	-pgi		use Portland compiler
	-absoft or $ABSOFT set
			use Absoft compiler
	-dir=<dir>	destination directory for static library
	If neither keyword or environment variable is set then g77 or Intel
	compiler is used (whichever is found first using 'which')
 OUTPUTS:
	New or updated object library libgen.a in $for (when executed on
	the '$SMEI_ACCOUNT' software account) or $myfor (when executed on a
	user account).
 CALLS:
	mk [1], mk [2], tine.run_cmd, tiny.args, tiny.is_there
 SIDE EFFECTS:
	A compilation status line is added to $sys/olb.log
 RESTRICTIONS:
	Can only be executed from the software account (i.e. $USER=$SMEI_ACCOUNT).
	A line is added to $sys/olb.log with the time of compilation and
	the module updated (if present)
 PROCEDURE:
 >	If no explicit module is specified then a hardcoded list of
	Fortran files is used from $for and $SMEI_FOR, mostly from
	subdirectories 'lib' and 'os' (containing OS-dependent files)
 >	If an explicit module with name 'module' is specified then the
	file 'module.f' is processed after looking for it in directories
	$myfor, $for and $SMEI_FOR, respectively.
 >	Object files are created in $temp and deleted after use
 >	The library is created in $for (on the software account) or $myfor
	(on a user account).
 >	The compilation command looks for include files in the directories
	$for/h, $SMEI_FOR/h and $SMEI_FOR/h/linux.
 >	Two other switches are included:
	    -ffixed-line-length-none	-> extended fortran
	    -c		    -> suppresses linking into executable

	Some of the fortran files are compiled with the -w switch added to
	suppress warning messages, mostly about unimplemented intrinsics such
	as cosd, sind, etc.

	An earlier version also used switches to be able to use our old
	'signal' subroutine (signal is a unix function included in the
	badu77 group and the unix group of intrinsics):
	    -fbadu77-intrinsic-hide
	    -funix-intrinsic-hide
	Since 'signal' has been renamed 'say' we don't need these anymore.

 >	For gcc the machine type is determined with gcc -dumpmachine and
	the version number with gcc -dumpversion.
	For the Intel compilers -dumpmachine doesn't work, and -dumpversion
	only works for version 8.0. ifc -dumpversion is used to determine
	the version number. If it doesn't work version 6.0 is assumed (this
	is the only version of ifc prior to 8.0 that we used).
 MODIFICATION HISTORY:
	FEB-2001, Paul Hick (UCSD/CASS)
	SEP-2002, Paul Hick (UCSD/CASS)
	    Removed -fdollar-ok option from g77 compilations (all dollar
	    signs in variable names should have been removed by now).
	SEP-2004, Paul Hick (UCSD/CASS)
	    The name of the libgen library now tries to code
	    compiler information into the file name.
	    For g77 the name now is libgen_<machine>_gnu_<version>.a
	    For Intel ifc it is libgen_intel_<version>
	    On the software account the library is now created in
	    $SMEI_LIB instead of $for.
	OCT-2004, Paul Hick (UCSD/CASS)
	    Added Portland compiler.
	JAN-2004, Paul Hick (UCSD/CASS)
	    Converted from bash to Python.
	SEP-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Added get_compiler_intel.f and get_compiler_gnu.f
	    to list of files to be skipped.


olb [2] $SMEI/ucsd/gen/python/olb.py
[Previous] [Next]
 NAME:
	olb
 PURPOSE:
	Recompile all F77 subroutines and functions, and create object library
	libgen.a from the object files
 CALLING SEQUENCE:
	olb
	olb module  (where 'module' is an F77 module, e.g. forgen)
 INPUTS:
	Fortran files selected from a number of subdirectories (see PROCEDURE).
 OPTIONAL INPUTS:
	-g77		use g77 compiler
	-intel		use Intel Fortran compiler
	-pgi		use Portland compiler
	-absoft or $ABSOFT set
			use Absoft compiler
	-dir=<dir>	destination directory for static library
	If neither keyword or environment variable is set then g77 or Intel
	compiler is used (whichever is found first using 'which')
 OUTPUTS:
	New or updated object library libgen.a in $for (when executed on
	the '$SMEI_ACCOUNT' software account) or $myfor (when executed on a
	user account).
 CALLS:
	mk [1], mk [2], tine.run_cmd, tiny.args, tiny.is_there
 SIDE EFFECTS:
	A compilation status line is added to $sys/olb.log
 RESTRICTIONS:
	Can only be executed from the software account (i.e. $USER=$SMEI_ACCOUNT).
	A line is added to $sys/olb.log with the time of compilation and
	the module updated (if present)
 PROCEDURE:
 >	If no explicit module is specified then a hardcoded list of
	Fortran files is used from $for and $SMEI_FOR, mostly from
	subdirectories 'lib' and 'os' (containing OS-dependent files)
 >	If an explicit module with name 'module' is specified then the
	file 'module.f' is processed after looking for it in directories
	$myfor, $for and $SMEI_FOR, respectively.
 >	Object files are created in $temp and deleted after use
 >	The library is created in $for (on the software account) or $myfor
	(on a user account).
 >	The compilation command looks for include files in the directories
	$for/h, $SMEI_FOR/h and $SMEI_FOR/h/linux.
 >	Two other switches are included:
	    -ffixed-line-length-none	-> extended fortran
	    -c		    -> suppresses linking into executable

	Some of the fortran files are compiled with the -w switch added to
	suppress warning messages, mostly about unimplemented intrinsics such
	as cosd, sind, etc.

	An earlier version also used switches to be able to use our old
	'signal' subroutine (signal is a unix function included in the
	badu77 group and the unix group of intrinsics):
	    -fbadu77-intrinsic-hide
	    -funix-intrinsic-hide
	Since 'signal' has been renamed 'say' we don't need these anymore.

 >	For gcc the machine type is determined with gcc -dumpmachine and
	the version number with gcc -dumpversion.
	For the Intel compilers -dumpmachine doesn't work, and -dumpversion
	only works for version 8.0. ifc -dumpversion is used to determine
	the version number. If it doesn't work version 6.0 is assumed (this
	is the only version of ifc prior to 8.0 that we used).
 MODIFICATION HISTORY:
	FEB-2001, Paul Hick (UCSD/CASS)
	SEP-2002, Paul Hick (UCSD/CASS)
	    Removed -fdollar-ok option from g77 compilations (all dollar
	    signs in variable names should have been removed by now).
	SEP-2004, Paul Hick (UCSD/CASS)
	    The name of the libgen library now tries to code
	    compiler information into the file name.
	    For g77 the name now is libgen_<machine>_gnu_<version>.a
	    For Intel ifc it is libgen_intel_<version>
	    On the software account the library is now created in
	    $SMEI_LIB instead of $for.
	OCT-2004, Paul Hick (UCSD/CASS)
	    Added Portland compiler.
	JAN-2004, Paul Hick (UCSD/CASS)
	    Converted from bash to Python.
	SEP-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Added get_compiler_intel.f and get_compiler_gnu.f
	    to list of files to be skipped.