Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2012-09-27 00:46:15
Size: 3475
Editor: DNab421146
Comment:
Revision 7 as of 2012-09-27 05:34:29
Size: 6901
Editor: DNab421146
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
A user controls configuration by editing one or more configuration files: There are several files that control configuration. Some files are not to edited by users:
Line 7: Line 7:
 * '''configure'''[[BR]] * '''$JSOC/configure'''[[BR]]
Line 11: Line 11:
 * '''configsdp.txt'''[[BR]] * '''$JSOC/gen_init.csh'''[[BR]]
 This script, available only in NetDRMS releases, parses the config.local configuration file (described below), and generates the $JSOCROOT/base/include/localization.h file. This header file contains parameters that ''override'' the default set of parameters, which are specific for JSOC-SDP DRMS builds.

 * '''$JSOC/base/drms/apps/serverdefs.h'''[[BR]]
 This file contains JSOC-SDP-specific #defines used to control compilation. It contains parameters that specify the name of the database administrative user, the default name of the database to connect to, and many others that tailor DRMS and SUMS. The contents of this file are overridden by $JSOC/base/include/localization.h, if it is present.

 * '''$JSOC/base/include/localization.h'''[[BR]]
 This header file is generated when configure is run by the user. It is #included in $JSOCROOT/base/drms/apps/serverdefs.h, where it then ''overrides'' the #defines present in that file.

 * '''$JSOC/moreconfigure.pl''' [[BR]]
 This script first determines which compiler to use. It will first look for an acceptable version of icc to run. If there isn't one, then it looks for an acceptable version of gcc. It also looks for an acceptable version of ifort for FORTRAN compilation and linking, and if there is no such version, it looks for an acceptable version of gfortran. If there is no acceptable C compiler or FORTRAN compiler present, the script fails.[[BR]][[BR]]
 The user can set a build parameter in config.local, AUTOSELCOMP, that will disable this auto-selection of compilers. In that case, the choice of compilers is determined by make_basic.mk (search for the line containing the make variable assignment "COMPILER = icc"), which is overridable by environment variables ($JSOC_COMPILER and $JSOC_FCOMPILER), which are overridable by the values in the custom.mk file.

This script writes the compiler-configuration make variables to $JSOC/localization/custom.mk.

It also parses the configsdp.txt file's __LIBS__ section, which contains make variables which contain paths to third-party libraries used by the JSOC-SDP DRMS. It writes the make variables into the custom.mk file, which is then included into make_basic.mk, which then override the



 * '''$JSOC/customizemake.pl''' [[BR]]
 This script

This script writes to $JSOC/localization/custom.mk

This script also parses the contents of the __MAKE__ section of config.local. This section contains make variables used for customizing the build. In general, the variables in this section specify the paths to third-party libraries, but it could contain any desired make variable. customizemake.pl writes these variable assignments to custom.mk, which is then included into make_basic.mk, where it can have impact.

This is analogous to the way that moreconfigure.pl parses the contents of the __LIBS__ section of the configsdp.txt file.

 * '''$JSOC/custom.mk''' [[BR]]
 This file is generated by

Other files are available for the user to edit. These files allow the user to control configuration:

 * '''$JSOC/configsdp.txt'''[[BR]]
Line 15: Line 48:
 * '''config.local'''[[BR]]  * '''$JSOC/config.local'''[[BR]]
Line 19: Line 52:
  
Line 20: Line 55:

If building NetDRMS, configure first runs gen_init.csh. This will parse the config.local file to produce a NetDRMS-site-specific localization.h file, which then contains parameters, specified by the user, that override the parameters used by the JSOC-SDP. The script then runs moreconfigure.pl,

Build Configuration

The source-code configure script, $JSOCROOT/configure, sets environment variables, make variables, and creates on-the-fly make rules that allow users to localize and/or customize the way the JSOC-SDP code is built. Depending on how the make system is configured with these variables and rules, the user can build NetDRMS or the DRMS used at the JSOC-SDP. And for both builds, the user can customize various details.

There are several files that control configuration. Some files are not to edited by users:

* $JSOC/configureBR

  • This is the master script that a user runs before they run make. It needs to be run once after source-code and make-configuration changes, but it does not need to be run when building on a new platform. The user does not edit this file for configuration-control purposes, and, in general, only the CM will edit this file (for maintenance reasons, or in response to user requests). This file contains JSOC-SDP-DRMS-specific, and NetDRMS-specific configuration. For example, there is no DSDS support for NetDRMS builds, and configure contains a line that defines a compiler flag that disables DSDS support for NetDRMS.BRBR The documentation for this file resides as comments in the file itself.

* $JSOC/gen_init.cshBR

  • This script, available only in NetDRMS releases, parses the config.local configuration file (described below), and generates the $JSOCROOT/base/include/localization.h file. This header file contains parameters that override the default set of parameters, which are specific for JSOC-SDP DRMS builds.

  • $JSOC/base/drms/apps/serverdefs.hBR This file contains JSOC-SDP-specific #defines used to control compilation. It contains parameters that specify the name of the database administrative user, the default name of the database to connect to, and many others that tailor DRMS and SUMS. The contents of this file are overridden by $JSOC/base/include/localization.h, if it is present.

  • $JSOC/base/include/localization.hBR This header file is generated when configure is run by the user. It is #included in $JSOCROOT/base/drms/apps/serverdefs.h, where it then overrides the #defines present in that file.

  • $JSOC/moreconfigure.pl BR This script first determines which compiler to use. It will first look for an acceptable version of icc to run. If there isn't one, then it looks for an acceptable version of gcc. It also looks for an acceptable version of ifort for FORTRAN compilation and linking, and if there is no such version, it looks for an acceptable version of gfortran. If there is no acceptable C compiler or FORTRAN compiler present, the script fails.BRBR The user can set a build parameter in config.local, AUTOSELCOMP, that will disable this auto-selection of compilers. In that case, the choice of compilers is determined by make_basic.mk (search for the line containing the make variable assignment "COMPILER = icc"), which is overridable by environment variables ($JSOC_COMPILER and $JSOC_FCOMPILER), which are overridable by the values in the custom.mk file.

This script writes the compiler-configuration make variables to $JSOC/localization/custom.mk.

It also parses the configsdp.txt file's LIBS section, which contains make variables which contain paths to third-party libraries used by the JSOC-SDP DRMS. It writes the make variables into the custom.mk file, which is then included into make_basic.mk, which then override the

  • $JSOC/customizemake.pl BR This script

This script writes to $JSOC/localization/custom.mk

This script also parses the contents of the MAKE section of config.local. This section contains make variables used for customizing the build. In general, the variables in this section specify the paths to third-party libraries, but it could contain any desired make variable. customizemake.pl writes these variable assignments to custom.mk, which is then included into make_basic.mk, where it can have impact.

This is analogous to the way that moreconfigure.pl parses the contents of the LIBS section of the configsdp.txt file.

  • $JSOC/custom.mk BR This file is generated by

Other files are available for the user to edit. These files allow the user to control configuration:

  • $JSOC/configsdp.txtBR This file contains information specific to the JSOC-SDP that controls the build of JSOC-SDP-specific projects (like the "rings" project). At the top it contains make variables, in the middle it contains information needed by make to create project-specific directories, and at the bottom it contains shell commands to be used for project-specific management (like creating links to specified executables).BRBRThe presence of this file in the $JSOCROOT directory indicates to the make system that the source-code is to be used to create DRMS/SUMS for the JSOC-SDP (i.e., a "full" make). If this file is not present, then the make system will create a NetDRMS when make is run.BRBR The contents of this file, and how to edit them, are described more fully in CvsInit.

  • $JSOC/config.localBR This file contains various system-wide parameters that affect the build, including the machine hosting the SUMS server, the paths to the PostgreSQL and CFITSIO libraries, and the machine hosting the DRMS database, and many others. This file must be created by the user prior to running configure. It is not part of any release. Instead, the release provides a template file (config.local.template for NetDRMS releases, and config.local.sutemplate for JSOC-SDP DRMS releases). The user should copy the template, and edit is as desired. BRBR The documentation for this file, which includes examples, resides in the config.local.template (NetDRMS) or config.local.sutemplate (JSOC-SDP DRMS) file.

Once the user has modified these configuration files as desired, configuration proceeds when the user runs the $JSOCROOT/configure script. This script first determines if the build to be performed is a JSOC-SDP DRMS build, or a NetDRMS build. If $JSOCROOT/configsdp.txt is present, then it will assume the former, otherwise it will assume the latter. If performing a NetDRMS build, then the script requires that config.local be present. For a JSOC-SDP DRMS build, the presence of this file is NOT required. If it is present, then the contents of that file will customize the JSOC-SDP DRMS build, but if it is absent, then a default build will be performed.

If building NetDRMS, configure first runs gen_init.csh. This will parse the config.local file to produce a NetDRMS-site-specific localization.h file, which then contains parameters, specified by the user, that override the parameters used by the JSOC-SDP. The script then runs moreconfigure.pl,

JsocWiki: BuildConfiguration (last edited 2013-05-01 04:35:24 by localhost)