Creating the GEOSagcm bridge repo
This page will detail the process of making the GEOSagcm bridge repo.
Following http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/
Commands used to make a bridge repo:
Initialize a bare bridge repo
$ cd /discover/swdev/adasilva/bridge/ $ git init --bare GEOSagcm $ chgrp -R gmaosi GEOSagcm/ $ lt total 0 drwxrwxr-x 3 adasilva gmaosi 512 2014-07-07 14:59 AEROsa/ drwxrwxr-x 3 adasilva gmaosi 512 2014-07-07 15:00 GEOSadas/ drwxr-xr-x 7 mathomp4 gmaosi 512 2014-07-16 12:06 GEOSagcm/
We now have an empty bridge repo.
Clone the empty bridge repo
Now go to a model directory:
$ cd /discover/swdev/mathomp4/Models
Make a place to check out the model:
$ mkdir Ganymed-4_0-bridge-repo $ cd Ganymed-4_0-bridge-repo
Clone the bare repo:
$ git clone /discover/swdev/adasilva/bridge/GEOSagcm Cloning into 'GEOSagcm'... warning: You appear to have cloned an empty repository. done.
Fill the empty git repo with our model
Now checkout the model:
$ ecvs co -kk -r Ganymed-4_0 Ganymed
where ecvs:
$ alias ecvs cvs -d:ext:esma:/cvsroot/esma
This CVS setup is user-agnostic and allows for multiple users to run CVS commands on it.
Add files to the git repo
$ cd GEOSagcm/ total 0 drwxr-xr-x 2 mathomp4 g0620 512 2014-07-16 12:11 CVS/ drwxr-xr-x 7 mathomp4 g0620 512 2014-07-16 12:11 src/ Directory: /discover/swdev/mathomp4/Models/Ganymed-4_0-bridge-repo/GEOSagcm $ git branch $
Now add the files:
$ git add .
and then commit:
$ git commit <add message in vim because I forgot to do it on the command line> [master (root-commit) 8afb4e9] MAT: Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: 4324 files changed, 1532916 insertions(+) create mode 100644 CVS/Entries create mode 100644 CVS/Entries.Log create mode 100644 CVS/Entries.Static ... create mode 100755 src/GNUmakefile create mode 100755 src/g5_modules create mode 100644 src/g5_modules.sh create mode 100755 src/parallel_build.csh $ git log commit 8afb4e903eacf8de6d8b5d56f66252c44e88ad9e Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Wed Jul 16 12:42:51 2014 -0400 MAT: Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Jul-06 12:30 pm.
Check the branch:
$ git branch * master
Now try to push:
$ git push warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git) No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'. fatal: The remote end hung up unexpectedly error: failed to push some refs to '/discover/swdev/adasilva/bridge/GEOSagcm' $ git remote origin $ git push origin master Counting objects: 4124, done. Delta compression using up to 8 threads. Compressing objects: 100% (3898/3898), done. Writing objects: 100% (4124/4124), 37.11 MiB | 4.80 MiB/s, done. Total 4124 (delta 825), reused 0 (delta 0) To /discover/swdev/adasilva/bridge/GEOSagcm * [new branch] master -> master $ git push warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git) Everything up-to-date
Clone the model from the repo and try to build it
Now let's clone the model in a new directory:
$ cd /discover/swdev/mathomp4/Models $ mkdir Ganymed-4_0-from-git $ cd Ganymed-4_0-from-git $ git clone /discover/swdev/adasilva/bridge/GEOSagcm Cloning into 'GEOSagcm'... done. Checking out files: 100% (4324/4324), done. $ ls -l total 0 drwxr-xr-x 5 mathomp4 g0620 512 2014-07-16 12:51 GEOSagcm/
Now let's try building it. Use geostag or setenv ESMADIR and sourcing g5_modules to initialize the model setup and let's run parallel_build.csh:
$ cd /discover/swdev/mathomp4/Models/Ganymed-4_0-from-git/GEOSagcm/src $ ./parallel_build.csh g5_modules: Setting BASEDIR and modules for discover18 ================ PARALLEL BUILD ================ The build will proceed with 10 parallel processes on 12 CPUs. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LOG and info will be written to the src/BUILD_LOG_DIR directory. Do the following to check the status/success of the build: cd BUILD_LOG_DIR ./gmh.pl [-v] LOG[.n] Note: Check the latest version of LOG for the most recent build info. Sp Code| Org | Sponsor | Research -------+-------+--------------------+---------------------------------- g0620 | 610.1 | William Putman | GMAO - Systems and Data Synthesis select group: [g0620] qsub -W group_list=g0620 -N parallel_build -o parallel_build.o%j -l select=1:ncpus=12:mpiprocs=10:proc=west -l walltime=1:00:00 -V ./parallel_build.csh 1944599 unset echo 1944599 mathomp4 general parallel_build -- 1 1 -- 01:00 Q 00:00 $