Differences between revisions 1 and 2
Revision 1 as of 2007-10-24 14:59:11
Size: 6108
Editor: solpc2
Comment:
Revision 2 as of 2007-10-25 13:11:12
Size: 6108
Editor: solpc2
Comment:
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
[[Image(JSOC_top.jpg)]] attachment:JSOC_top.jpg
Line 35: Line 35:
[[Image(JSOC_base.jpg)]] attachment:JSOC_base.jpg
Line 39: Line 39:
[[Image(JSOC_proj.jpg)]] attachment:JSOC_proj.jpg

JSOC File Structure

Background

On October 1, 2007, a newly reorganized JSOC code tree became effective. The new code tree differs from the original tree's structure. The original tree and the new tree coexist in CVS (new is in the "JSOC" module, old is in the "jsoc" module), but moving forward, changes to the old tree should cease with future changes being constrained to the new tree (with some exceptions). The old tree is becoming read-only

As of October 1, all developers should start using the new JSOC CVS tree, and discontinue using the old one. Production users who run binaries, and are not changing source code, should continue to do what they are currently doing. If you have any questions about what to do please talk to Art Amezcua.

If you are currently modifying files in the old tree, finish up there, submit those changes, and let Art know so he can duplicate those changes in the new tree. After that, work only in the new tree (one or two of you will continue to work in the old tree on occasion, but everybody else should work in the new tree).

To move over to the new tree, you have to do a couple of things that basically tell CVS you want to use the JSOC module (all caps) instead of the jsoc module (all lower, the one you've been using heretofore). These are changes you'll need to make in one of your startup scripts (like ~/.cshrc). The script(s) that you modify is the same one the you originally modified to set up your system for accessing the original jsoc source tree.

  • Change the JSOCROOT environment variable to contain $HOME/cvs/JSOC (note, upper case JSOC, not lower case).
  • Add $JSOCROOT/scripts to your path variable. It might already be defined. This will allow you to access certain drms/jsoc scripts from any directory, and it will also give you access to the drms/jsoc manpages.
  • Modify your cvsstatus alias to point to $JSOCROOT/base/util/scripts/cvsstatus.pl: alias cvsstatus "$JSOCROOT/base/util/scripts/cvsstatus.pl"
  • Optional: Add a link named ~/JSOC to ~/cvs/JSOC: cd ~; ln -s ~/cvs/JSOC JSOC

To check out the new tree:

cd ~/cvs
cvs checkout JSOC
cd $JSOCROOT
./configure
make

Alternatively, after checking out JSOC, you can run jsoc_update.csh from $JSOCROOT.

New JSOC Tree View

At the top-most level, the directory structure looks like this after running 'cvs checkout JSOC' and 'configure':

attachment:JSOC_top.jpg

In greater detail, the structure of $JSOCROOT/base looks like:

attachment:JSOC_base.jpg

And, in greater detail, the structure of $JSOCROOT/proj looks like:

attachment:JSOC_proj.jpg

Optional Directories

Additional and optional directories include the following. These directories can be created as needed:

CVS/JSOC/{base|proj}/.../apps/data
CVS/JSOC/{base|proj}/.../apps/test
CVS/JSOC/{base|proj}/.../libs/<libname>/data
CVS/JSOC/{base|proj}/.../libs/<libname>/test

These directories contain JSOC-specific data files (such as tables), jsd files, and test programs. If they exist, they appear as nodes of "apps" and "libs" subtrees.

Generated Directories (not part of the CVS repository)

Several directories shown in the above tree view are created as part of the configuration and binary-build process. 'make' creates the following directories to contain all generated binary files:

CVS/JSOC/_linux_ia32
CVS/JSOC/_linux_x86_64

Binary output resides at various nodes within these two directories. 'make' also creates these directories:

CVS/JSOC/bin
CVS/JSOC/lib

These directories contain links to the executables and libraries built by 'make' and which reside at various nodes within the output tree. It is important to avoid name conflicts between binaries and between libraries. Conflicts are resolved by the last link created silently overwriting all others previously created with the same name.

The configure script creates these directories.

CVS/JSOC/jsds
CVS/JSOC/man
CVS/JSOC/scripts
CVS/JSOC/base/include

They contain links to jsd files, man pages, scripts, and base header files that live at various nodes within the source tree. It is important to avoid name conflicts. Conflicts are resolved by the FIRST same-named link "winning". The configure script outputs an error message in the event of a conflict.

Library Dependencies

There should only be five types of dependencies of binaries on libraries:

  • Any binary whose source resides in the path base/<a subpath>/apps or base/<a subpath>/libs can depend on any library whose source resides in base/<a subpath>/libs. It can also depend on any library whose source resides within a 'libs' directory off of a parent directory. So, base/drms/apps/drms_server.c can depend on the library source in base/libs/misc (base/libs is a parent of base/drms/apps/drms_server.c).

  • Any binary whose source resides in the path base/drms can depend on any library whose source resides in base/sums.
  • Any binary whose source resides in the path base/util can depend on any library whose source resides in base/drms.
  • Any binary whose source resides in the path proj/<a subpath>/apps or proj/<a subpath>/libs can depend on any library whose source resides in proj/<a subpath>/libs. It can also depend on any library whose source resides within a 'libs' directory off of a parent directory.

  • Any binary whose source resides in the path proj can depend on any library whose source resides in base.

Using CVS to Checkout the Base Files

To facilitate checking out just base code, a the CVS admin file "modules" has been modified to add two CVS modules: DRMS and JSOC. Type the following to checkout only the base (ie., DRMS) part of JSOC:

cd $JSOCROOT/..
cvs checkout DRMS

Type the following to checkout all JSOC files:

cvs checkout JSOC

To update the source code of these modules:

cd to your JSOC tree, which may be $JSOCROOT
jsoc_sync.csh

To update the source code in $JSOCROOT and build the default binaries:

cd $JSOCROOT
jsoc_update.csh

JsocWiki: FileStruct (last edited 2013-05-01 04:35:23 by localhost)