Beispiel #1
0
## Needs different paths for NCI, storm ... this is set for my mac
## comment out the below and set your own, see scripts/set_default_paths.py
#
(met_dir, NCDIR, NCMOD, FC, CFLAGS, LD, LDFLAGS) = set_paths(nodename)

# ------------------------------------------- #

# clean out old src directory
if os.path.exists(src_dir):
    shutil.rmtree(src_dir)
    os.makedirs(src_dir)

#
## Get CABLE ...
#
G = GetCable(src_dir=src_dir, user=user)

if user_path is None:
    # Setup for the head of the trunk
    repo = "Trunk_%s" % (date)
    G.main(repo_name=repo, trunk=True)
else:
    # Setup for user specified path
    G.main(repo_name=user_path, trunk=False)

#
## Build CABLE ...
#
B = BuildCable(src_dir=src_dir, NCDIR=NCDIR, NCMOD=NCMOD, FC=FC,
               CFLAGS=CFLAGS, LD=LD, LDFLAGS=LDFLAGS)
B.main(repo_name=repo)
Beispiel #2
0
## Needs different paths for NCI, storm ... this is set for my mac
## comment out the below and set your own, see scripts/set_default_paths.py
#
(met_dir, NCDIR, NCMOD, FC, CFLAGS, LD, LDFLAGS) = set_paths(nodename)

# ------------------------------------------- #

# clean out old src directory
if os.path.exists(src_dir):
    shutil.rmtree(src_dir)
    os.makedirs(src_dir)

#
## Get CABLE ...
#
G = GetCable(src_dir=src_dir, user=user)

if user_path is None:
    # Setup for the head of the trunk
    repo = "Trunk"
    G.main(repo_name=repo, trunk=True)
else:
    # Setup for user specified path
    repo = user_path
    G.main(repo_name=repo, trunk=False, share=True)

#
## Build CABLE ...
#
B = BuildCable(src_dir=src_dir,
               NCDIR=NCDIR,
Beispiel #3
0

parser = OptionParser()
parser.add_option("--qsub", action="store_true", default=False,
                  help="Run qsub script?")
parser.add_option("-s", "--skipsrc", action="store_true", default=False,
                  help="Rebuild src?")

(options, args) = parser.parse_args()

if options.qsub == False and options.skipsrc == False:

    #
    ## Get CABLE ...
    #
    G = GetCable(src_dir=src_dir, user=user)
    G.main(repo_name=repos[0], trunk=trunk) # Default is True

    # Run on a users branch, not integration
    if repos[1] != "integration":
        get_user_branch = True
    else:
        get_user_branch = False

    if share_branch:
        get_user_branch = False

    G.main(repo_name=repos[1], trunk=False, user_branch=get_user_branch,
           share_branch=share_branch) # integration branch

    #
Beispiel #4
0
                  default=False,
                  help="Run qsub script?")
parser.add_option("-s",
                  "--skipsrc",
                  action="store_true",
                  default=False,
                  help="Rebuild src?")

(options, args) = parser.parse_args()

if options.qsub == False and options.skipsrc == False:

    #
    ## Get CABLE ...
    #
    G = GetCable(src_dir=src_dir, user=user)
    G.main(repo_name=repos[0], trunk=trunk)  # Default is True
    G.main(repo_name=repos[1], trunk=False)  # integration branch

    #
    ## Build CABLE ...
    #
    B = BuildCable(src_dir=src_dir,
                   NCDIR=NCDIR,
                   NCMOD=NCMOD,
                   FC=FCMPI,
                   CFLAGS=CFLAGS,
                   LD=LD,
                   LDFLAGS=LDFLAGS,
                   mpi=True)
    B.main(repo_name=repos[0])