This is an old revision of the document!


Before running SEPlib do the following:

create ~/.datapath

SEPlib files are composed of ascii/binary pairs. The ascii portion describes the data (the size, the type, and the location of the binary). The binary portion is the actual data. The two are separated to allow processing to be done in a centralized location (a home directory for example) while the data is written where ever there is space. The datapath file tells SEPlib where to put binary data and should look something like this:

spur     datapath=/scrka2/bob/
oas      datapath=/scrsa1/bob/
vesuvio  datapath=/SDA/bob/
santorin datapath=/scrsa4/bob/

By default SEPlib first checks the command line for datapath=, then the directory where the program is run for a .datapath file, and finaly the home directory. The above .datapath files tells SEPlib to put binary data by default in /scrka3/bob and if it runs out of space in /scrka2/bob, but when on the computer “santorin” to put the data in /scrsa4/bob.

Environmental Variables


The next step is to tell SEPlib where to put temporary vplot files. It is best to put these in a location such as /tmp/ which is periodically cleaned.

setenv SEP_DOC_PATH docpath
    If you move the SEP sources you can set this enviorenmental variable. If set self-doc will look in the sub-directiories of "docpath" for documentation.
setenv SEP my/sep/path/
    The location of the SEP install (''--prefix'' which defaults to ''/usr/local/SEP'') 
# setenv PYTHONPATH $SEP/lib/python/

You need to set this variable to use Rm and to access SEP's python modules Add the mandir and the bindir you specified to your MANPATH and PATH variables.

If you prefer you can use the HTML version of the documentation in docs/html With the distribution comes a set of makerules customized to your system that are by default installed in the include directory.

SEP Compiling rules

To use these you must:

  • 1. setenv SEPINC sepincdir
  • 2. In your makefile put:
    include ${SEPINC}/
    include ${SEPINC}/SEP.bottom
  • 3. In between these is where your local compile rules should go.

To compile a program

  1. Set some general variables
        o BINDIR = /my/bin/dir {if not set, current directory}
        o SRCIDR = /my/src/dir {if not set, current directory}
        o OBJDIR = /my/obj/dir {my object directory} 
  2. Set additional compiler flags
        o a. UCFLAGS, UF77FLAGS, UF90FLAGS - additional flags needed to compile a C, F77, or F90 program
        o b. UCLIBDIR, UF77LIBDIR, UF90LIBDIR a list of directories where additional libraries can be found
        o c. UCLIBS, UF77LIBS, UF90LIBS addition libaries to compile with 
  3. Setting up the make rules
        o a. C code
          if you are compiling a code made up of a single source file, you shouldn't need any additional rules. If the code comes from multiple files ....
          Assuming that the main program is my_prog.o and you need the additional sub1, sub2, and sub3 compiled (and linked with the C linker)
          ${BINDIR}/my_prog.x: $(addprefix ${OBJDIR}/, sub1.o sub2.o sub3.o)
          Note if your OBJDIR is the local directory you just need to list the object files, the add prefix portion is not necessary.
        o b. F77 code
          the exact same rules as with C
        o c. F90 code
          If your code uses strictly modules and a main program no additional rules are needed. If you use other subroutines follow the above procedure.
        o d. Compiling and linking 

To compile a code:

gmake objdir/code.o  

where objdir is what you set OBJDIR to TO link

gmake bindir/myprog.x

where bindir is what you set BINDIR to Example Makefile:

include ${SEPINC}/

include ${SEPINC}/SEP.bottom

Converting old SEPlib code

From Joe: Need to replace “reed(infd, …)” with “sreed(“in”, …)”. Need to replace “rite(outfd, …)” with “srite(“out”, …)”. Need to replace “getpar” with “getch”.

vp_filep(outstream); to the start of any program that calls -lvplot.

/web/html/data/attic/sep/software/environment.1216921698.txt.gz · Last modified: 2015/05/26 22:41 (external edit) Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0