Creating the GEOSagcm bridge repo: Difference between revisions
Added Tagging section |
Add section for updating repo |
||
Line 381: | Line 381: | ||
(1391) $ git log --decorate=full | (1391) $ git log --decorate=full | ||
commit a803acd43fc803511fdac603a6912ebc1b95f41b (HEAD, tag: refs/tags/Ganymed-4_0, refs/heads/master) | commit a803acd43fc803511fdac603a6912ebc1b95f41b (HEAD, tag: refs/tags/Ganymed-4_0, refs/heads/master) | ||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Thu Sep 4 13:07:59 2014 -0400 | |||
MAT: Add .gitignore file | |||
commit c13a2dc367c3c709e21a82b7f8c858486c292acd | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Thu Sep 4 13:06:40 2014 -0400 | |||
Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04 | |||
</nowiki> | |||
== Updating the bridge repo == | |||
At some point, you will need to update the repo. For example, if there is a patch to Ganymed-4_0, called Ganymed-4_0_p1. To do so, let's check out the model (note, it might be good to copy the bridge repo in case you...mess up): | |||
<nowiki>(1281) $ mkdir GEOSagcm-Bridge-Repo | |||
(1282) $ cd GEOSagcm-Bridge-Repo/ | |||
total 0 | |||
Directory: /discover/swdev/mathomp4/Models/GEOSagcm-Bridge-Repo | |||
(1283) $ git clone /discover/swdev/adasilva/bridge/GEOSagcm | |||
Cloning into 'GEOSagcm'... | |||
done. | |||
Checking out files: 100% (4327/4327), done. | |||
(1284) $ cd GEOSagcm/src/ | |||
total 160K | |||
drwxr-xr-x 4 mathomp4 g0620 512 2014-12-03 08:50 Applications/ | |||
-rwxr-xr-x 1 mathomp4 g0620 7.3K 2014-12-03 08:50 Assert.pl* | |||
drwxr-xr-x 2 mathomp4 g0620 512 2014-12-03 08:50 CVS/ | |||
drwxr-xr-x 3 mathomp4 g0620 8.0K 2014-12-03 08:50 Config/ | |||
drwxr-xr-x 4 mathomp4 g0620 512 2014-12-03 08:50 GEOSgcs_GridComp/ | |||
drwxr-xr-x 16 mathomp4 g0620 8.0K 2014-12-03 08:50 GMAO_Shared/ | |||
-rwxr-xr-x 1 mathomp4 g0620 4.1K 2014-12-03 08:50 GNUmakefile* | |||
-rwxr-xr-x 1 mathomp4 g0620 13K 2014-12-03 08:50 g5_modules* | |||
-rw-r--r-- 1 mathomp4 g0620 1.2K 2014-12-03 08:50 g5_modules.sh | |||
-rwxr-xr-x 1 mathomp4 g0620 19K 2014-12-03 08:50 parallel_build.csh* | |||
Directory: /discover/swdev/mathomp4/Models/GEOSagcm-Bridge-Repo/GEOSagcm/src | |||
</nowiki> | |||
Now let's update the checkout: | |||
<nowiki>(1285) $ ecvs -q upd -kk -r Ganymed-4_0_p1 | |||
P g5_modules | |||
U Applications/GEOSgcm_App/.AGCM_VERSION | |||
P Applications/GEOSgcm_App/AGCM.rc.tmpl | |||
P Applications/GEOSgcm_App/ChangeLog | |||
P Applications/GEOSgcm_App/GEOSgcm.F90 | |||
P Applications/GEOSgcm_App/HISTORY.AGCM.rc.tmpl | |||
... | |||
P GMAO_Shared/MAPL_Base/hash.c | |||
P GMAO_Shared/MAPL_Base/hinterp.F | |||
U GMAO_Shared/MAPL_Base/quicksort.c | |||
P GMAO_Shared/MAPL_Base/sort.c | |||
U GMAO_Shared/MAPL_Base/swap_shuffle.c | |||
(1286) $ cvscmp Ganymed-4_0_p1 | |||
(1287) $ | |||
</nowiki> | |||
Looks good. Now let's push the update to the bridge: | |||
<nowiki>(1287) $ git status | |||
On branch master | |||
Your branch is up-to-date with 'origin/master'. | |||
Changes not staged for commit: | |||
(use "git add/rm <file>..." to update what will be committed) | |||
(use "git checkout -- <file>..." to discard changes in working directory) | |||
modified: Applications/CVS/Entries | |||
deleted: Applications/CVS/Entries.Static | |||
modified: Applications/GEOSgcm_App/.AGCM_VERSION | |||
modified: Applications/GEOSgcm_App/AGCM.rc.tmpl | |||
modified: Applications/GEOSgcm_App/CVS/Entries | |||
... | |||
Untracked files: | |||
(use "git add <file>..." to include in what will be committed) | |||
GMAO_Shared/GEOS_Shared/sphere.F | |||
GMAO_Shared/MAPL_Base/quicksort.c | |||
GMAO_Shared/MAPL_Base/swap_shuffle.c | |||
no changes added to commit (use "git add" and/or "git commit -a") | |||
(1288) $ git add . | |||
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', | |||
whose behaviour will change in Git 2.0 with respect to paths you removed. | |||
Paths like 'src/Applications/CVS/Entries.Static' that are | |||
removed from your working tree are ignored with this version of Git. | |||
* 'git add --ignore-removal <pathspec>', which is the current default, | |||
ignores paths you removed from your working tree. | |||
* 'git add --all <pathspec>' will let you also record the removals. | |||
Run 'git status' to check the paths you removed from your working tree. | |||
</nowiki> | |||
Huh...interesting message. | |||
<nowiki>(1290) $ git status | |||
On branch master | |||
Your branch is up-to-date with 'origin/master'. | |||
Changes to be committed: | |||
(use "git reset HEAD <file>..." to unstage) | |||
modified: Applications/CVS/Entries | |||
modified: Applications/GEOSgcm_App/.AGCM_VERSION | |||
modified: Applications/GEOSgcm_App/AGCM.rc.tmpl | |||
modified: Applications/GEOSgcm_App/CVS/Entries | |||
... | |||
modified: GMAO_Shared/MAPL_cfio/CVS/Tag | |||
modified: GMAO_Shared/MAPL_cfio/examples/CVS/Entries | |||
modified: GMAO_Shared/MAPL_cfio/examples/CVS/Tag | |||
modified: g5_modules | |||
Changes not staged for commit: | |||
(use "git add/rm <file>..." to update what will be committed) | |||
(use "git checkout -- <file>..." to discard changes in working directory) | |||
deleted: Applications/CVS/Entries.Static | |||
(1291) $ | |||
</nowiki> | |||
Now the commit: | |||
<nowiki>(1292) $ git commit -m "MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03" | |||
[master 2515d09] MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03 | |||
743 files changed, 19995 insertions(+), 7179 deletions(-) | |||
rewrite src/Applications/GEOSgcm_App/CVS/Entries (99%) | |||
rewrite src/CVS/Entries (81%) | |||
rewrite src/Config/CVS/Entries (99%) | |||
rewrite src/GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSchem_GridComp/CARMAchem_GridComp/CARMA/CVS/Entries (91%) | |||
... | |||
create mode 100644 src/GMAO_Shared/MAPL_Base/quicksort.c | |||
rewrite src/GMAO_Shared/MAPL_Base/sort.c (94%) | |||
create mode 100644 src/GMAO_Shared/MAPL_Base/swap_shuffle.c | |||
rewrite src/GMAO_Shared/MAPL_Base/tests/CVS/Entries (99%) | |||
rewrite src/GMAO_Shared/MAPL_cfio/CVS/Entries (98%) | |||
rewrite src/GMAO_Shared/MAPL_cfio/examples/CVS/Entries (99%) | |||
(1293) $ git status | |||
On branch master | |||
Your branch is ahead of 'origin/master' by 1 commit. | |||
(use "git push" to publish your local commits) | |||
Changes not staged for commit: | |||
(use "git add/rm <file>..." to update what will be committed) | |||
(use "git checkout -- <file>..." to discard changes in working directory) | |||
deleted: Applications/CVS/Entries.Static | |||
no changes added to commit (use "git add" and/or "git commit -a") | |||
</nowiki> | |||
Huh. Well, I don't like to see any messages: | |||
<nowiki>(1294) $ git rm Applications/CVS/Entries.Static | |||
rm 'src/Applications/CVS/Entries.Static' | |||
(1295) $ git status | |||
On branch master | |||
Your branch is ahead of 'origin/master' by 1 commit. | |||
(use "git push" to publish your local commits) | |||
Changes to be committed: | |||
(use "git reset HEAD <file>..." to unstage) | |||
deleted: Applications/CVS/Entries.Static | |||
(1296) $ git commit -m "MAT: Remove deleted file shown by git status" | |||
[master bf2b958] MAT: Remove deleted file shown by git status | |||
1 file changed, 0 insertions(+), 0 deletions(-) | |||
delete mode 100644 src/Applications/CVS/Entries.Static | |||
(1297) $ git status | |||
On branch master | |||
Your branch is ahead of 'origin/master' by 2 commits. | |||
(use "git push" to publish your local commits) | |||
nothing to commit, working directory clean | |||
</nowiki> | |||
That last message is good. | |||
Now let's tag and push: | |||
<nowiki>(1298) $ git tag -a Ganymed-4_0_p1 -m "MAT: Tag Ganymed-4_1" | |||
(1299) $ git log --decorate=full | |||
commit bf2b9584f29972078803985791b0df0b68a74a83 (HEAD, tag: refs/tags/Ganymed-4_0_p1, refs/heads/master) | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Wed Dec 3 09:03:20 2014 -0500 | |||
MAT: Remove deleted file shown by git status | |||
commit 2515d09f0085fd9370e0b39c538793c9c5ce753d | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Wed Dec 3 09:01:27 2014 -0500 | |||
MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03 | |||
commit a803acd43fc803511fdac603a6912ebc1b95f41b (tag: refs/tags/Ganymed-4_0, refs/remotes/origin/master, refs/remotes/origin/HEAD) | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Thu Sep 4 13:07:59 2014 -0400 | |||
MAT: Add .gitignore file | |||
commit c13a2dc367c3c709e21a82b7f8c858486c292acd | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Thu Sep 4 13:06:40 2014 -0400 | |||
Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04 | |||
(1300) $ 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) | |||
Counting objects: 1727, done. | |||
Delta compression using up to 8 threads. | |||
Compressing objects: 100% (1056/1056), done. | |||
Writing objects: 100% (1059/1059), 259.46 KiB | 0 bytes/s, done. | |||
Total 1059 (delta 395), reused 0 (delta 0) | |||
To /discover/swdev/adasilva/bridge/GEOSagcm | |||
a803acd..bf2b958 master -> master | |||
(1301) $ git push origin --tags | |||
Counting objects: 1, done. | |||
Writing objects: 100% (1/1), 178 bytes | 0 bytes/s, done. | |||
Total 1 (delta 0), reused 0 (delta 0) | |||
To /discover/swdev/adasilva/bridge/GEOSagcm | |||
* [new tag] Ganymed-4_0_p1 -> Ganymed-4_0_p1 | |||
</nowiki> | |||
Back at the repo, let's see what we see: | |||
<nowiki>(1403) $ pwd | |||
/gpfsm/dswdev/adasilva/bridge/GEOSagcm | |||
(1404) $ git log --decorate=full | |||
commit bf2b9584f29972078803985791b0df0b68a74a83 (HEAD, tag: refs/tags/Ganymed-4_0_p1, refs/heads/master) | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Wed Dec 3 09:03:20 2014 -0500 | |||
MAT: Remove deleted file shown by git status | |||
commit 2515d09f0085fd9370e0b39c538793c9c5ce753d | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | |||
Date: Wed Dec 3 09:01:27 2014 -0500 | |||
MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03 | |||
commit a803acd43fc803511fdac603a6912ebc1b95f41b (tag: refs/tags/Ganymed-4_0) | |||
Author: Matthew Thompson <matthew.thompson@nasa.gov> | Author: Matthew Thompson <matthew.thompson@nasa.gov> | ||
Date: Thu Sep 4 13:07:59 2014 -0400 | Date: Thu Sep 4 13:07:59 2014 -0400 |
Revision as of 07:16, 3 December 2014
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/ $ chmod -R g+w 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/ drwxrwxr-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 $
It should build just fine. Now, for kicks, let's run git status:
$ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) ../Config ../Linux/ Applications/GEOSgcm_App/GEOSgcm.o Applications/GEOSgcm_App/GEOSgcm.x Applications/GEOSgcm_App/idfupd.x BUILD_LOG_DIR/ ... GMAO_Shared/MAPL_Base/sort.d GMAO_Shared/MAPL_Base/sort.o GMAO_Shared/MAPL_cfio/r4/ GMAO_Shared/MAPL_cfio/r8/ parallel_build.o1944599 nothing added to commit but untracked files present (use "git add" to track)
Ah. I seem to have forgotten a .gitignore file. Luckily, one just happens to be around:
$ cp ~/GEOSagcm_src.gitignore ./.gitignore $ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) ../Config ../Linux/ .gitignore BUILD_LOG_DIR/ GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/mk_restarts/Scale_Catch GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/mk_restarts/mk_CatchRestarts GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/mk_restarts/mk_LakeLandiceSaltRestarts GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/mk_restarts/newcatch GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/mk_restarts/strip_vegdyn GMAO_Shared/GMAO_etc/argopt GMAO_Shared/GMAO_etc/rst_date GMAO_Shared/GMAO_gfio/r4/ GMAO_Shared/GMAO_gfio/r8/ nothing added to commit but untracked files present (use "git add" to track)
Oops. The problem is our .gitignore was in the wrong place. Let's move it down below src/:
$ mv .gitignore .. $ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) ../.gitignore nothing added to commit but untracked files present (use "git add" to track)
Well, let's add that and push it to our repo!
$ git add ../.gitignore $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: ../.gitignore $ git commit -m 'MAT: Add .gitignore file' [master 9692fd5] MAT: Add .gitignore file 1 file changed, 47 insertions(+) create mode 100644 .gitignore $ 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) Counting objects: 4, done. Delta compression using up to 8 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 656 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To /discover/swdev/adasilva/bridge/GEOSagcm 8afb4e9..9692fd5 master -> master $ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean $ git log commit 9692fd59ca22172aa3e84d2d4c279b7eceda92d7 Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Wed Jul 16 13:14:06 2014 -0400 MAT: Add .gitignore file 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 out and build on JIBB
Now we need to see if we can clone the model on JIBB into it's bridge location:
Directory: /jibb/nobackup/gmaosi/bridge $ git clone discover:/discover/swdev/adasilva/bridge/GEOSagcm Cloning into 'GEOSagcm'... This U.S. Government resource is for authorized users only. By accessing this system you are consenting to complete monitoring with no expectation of privacy. Unauthorized access or use may subject you to disciplinary action and criminal prosecution. PASSCODE: Password: remote: Counting objects: 4127, done. remote: Compressing objects: 100% (3076/3076), done. remote: Total 4127 (delta 825), reused 4124 (delta 825) Killed by signal 1. Receiving objects: 100% (4127/4127), 37.11 MiB | 33.25 MiB/s, done. Resolving deltas: 100% (825/825), done. Checking connectivity... done. Checking out files: 100% (4325/4325), done.
Hmm. Good. Now let's clone on JIBB:
$ cd /jibb/nobackup/mathomp4/Models $ mkdir Ganymed-4_0 $ cd Ganymed-4_0 total 0 Directory: /jibb/nobackup/mathomp4/Models/Ganymed-4_0 $ git clone /jibb/nobackup/gmaosi/bridge/GEOSagcm/ Cloning into 'GEOSagcm'... done. Checking out files: 100% (4325/4325), done. (1022) $ ls -l total 0 drwxr-xr-x 5 mathomp4 j1066 512 2014-07-16 13:21 GEOSagcm/
Tagging
One thing forgotten is tagging after doing a good check in. To do so, add an annotated tag:
(1389) $ git log --decorate=full commit a803acd43fc803511fdac603a6912ebc1b95f41b (HEAD, refs/heads/master) Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:07:59 2014 -0400 MAT: Add .gitignore file commit c13a2dc367c3c709e21a82b7f8c858486c292acd Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:06:40 2014 -0400 Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04 (1390) $ git tag -a Ganymed-4_0 -m "MAT: Before updating to Ganymed-4_1, tag as Ganymed-4_0" (1391) $ git log --decorate=full commit a803acd43fc803511fdac603a6912ebc1b95f41b (HEAD, tag: refs/tags/Ganymed-4_0, refs/heads/master) Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:07:59 2014 -0400 MAT: Add .gitignore file commit c13a2dc367c3c709e21a82b7f8c858486c292acd Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:06:40 2014 -0400 Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04
Updating the bridge repo
At some point, you will need to update the repo. For example, if there is a patch to Ganymed-4_0, called Ganymed-4_0_p1. To do so, let's check out the model (note, it might be good to copy the bridge repo in case you...mess up):
(1281) $ mkdir GEOSagcm-Bridge-Repo (1282) $ cd GEOSagcm-Bridge-Repo/ total 0 Directory: /discover/swdev/mathomp4/Models/GEOSagcm-Bridge-Repo (1283) $ git clone /discover/swdev/adasilva/bridge/GEOSagcm Cloning into 'GEOSagcm'... done. Checking out files: 100% (4327/4327), done. (1284) $ cd GEOSagcm/src/ total 160K drwxr-xr-x 4 mathomp4 g0620 512 2014-12-03 08:50 Applications/ -rwxr-xr-x 1 mathomp4 g0620 7.3K 2014-12-03 08:50 Assert.pl* drwxr-xr-x 2 mathomp4 g0620 512 2014-12-03 08:50 CVS/ drwxr-xr-x 3 mathomp4 g0620 8.0K 2014-12-03 08:50 Config/ drwxr-xr-x 4 mathomp4 g0620 512 2014-12-03 08:50 GEOSgcs_GridComp/ drwxr-xr-x 16 mathomp4 g0620 8.0K 2014-12-03 08:50 GMAO_Shared/ -rwxr-xr-x 1 mathomp4 g0620 4.1K 2014-12-03 08:50 GNUmakefile* -rwxr-xr-x 1 mathomp4 g0620 13K 2014-12-03 08:50 g5_modules* -rw-r--r-- 1 mathomp4 g0620 1.2K 2014-12-03 08:50 g5_modules.sh -rwxr-xr-x 1 mathomp4 g0620 19K 2014-12-03 08:50 parallel_build.csh* Directory: /discover/swdev/mathomp4/Models/GEOSagcm-Bridge-Repo/GEOSagcm/src
Now let's update the checkout:
(1285) $ ecvs -q upd -kk -r Ganymed-4_0_p1 P g5_modules U Applications/GEOSgcm_App/.AGCM_VERSION P Applications/GEOSgcm_App/AGCM.rc.tmpl P Applications/GEOSgcm_App/ChangeLog P Applications/GEOSgcm_App/GEOSgcm.F90 P Applications/GEOSgcm_App/HISTORY.AGCM.rc.tmpl ... P GMAO_Shared/MAPL_Base/hash.c P GMAO_Shared/MAPL_Base/hinterp.F U GMAO_Shared/MAPL_Base/quicksort.c P GMAO_Shared/MAPL_Base/sort.c U GMAO_Shared/MAPL_Base/swap_shuffle.c (1286) $ cvscmp Ganymed-4_0_p1 (1287) $
Looks good. Now let's push the update to the bridge:
(1287) $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: Applications/CVS/Entries deleted: Applications/CVS/Entries.Static modified: Applications/GEOSgcm_App/.AGCM_VERSION modified: Applications/GEOSgcm_App/AGCM.rc.tmpl modified: Applications/GEOSgcm_App/CVS/Entries ... Untracked files: (use "git add <file>..." to include in what will be committed) GMAO_Shared/GEOS_Shared/sphere.F GMAO_Shared/MAPL_Base/quicksort.c GMAO_Shared/MAPL_Base/swap_shuffle.c no changes added to commit (use "git add" and/or "git commit -a") (1288) $ git add . warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed. Paths like 'src/Applications/CVS/Entries.Static' that are removed from your working tree are ignored with this version of Git. * 'git add --ignore-removal <pathspec>', which is the current default, ignores paths you removed from your working tree. * 'git add --all <pathspec>' will let you also record the removals. Run 'git status' to check the paths you removed from your working tree.
Huh...interesting message.
(1290) $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: Applications/CVS/Entries modified: Applications/GEOSgcm_App/.AGCM_VERSION modified: Applications/GEOSgcm_App/AGCM.rc.tmpl modified: Applications/GEOSgcm_App/CVS/Entries ... modified: GMAO_Shared/MAPL_cfio/CVS/Tag modified: GMAO_Shared/MAPL_cfio/examples/CVS/Entries modified: GMAO_Shared/MAPL_cfio/examples/CVS/Tag modified: g5_modules Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) deleted: Applications/CVS/Entries.Static (1291) $
Now the commit:
(1292) $ git commit -m "MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03" [master 2515d09] MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03 743 files changed, 19995 insertions(+), 7179 deletions(-) rewrite src/Applications/GEOSgcm_App/CVS/Entries (99%) rewrite src/CVS/Entries (81%) rewrite src/Config/CVS/Entries (99%) rewrite src/GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSchem_GridComp/CARMAchem_GridComp/CARMA/CVS/Entries (91%) ... create mode 100644 src/GMAO_Shared/MAPL_Base/quicksort.c rewrite src/GMAO_Shared/MAPL_Base/sort.c (94%) create mode 100644 src/GMAO_Shared/MAPL_Base/swap_shuffle.c rewrite src/GMAO_Shared/MAPL_Base/tests/CVS/Entries (99%) rewrite src/GMAO_Shared/MAPL_cfio/CVS/Entries (98%) rewrite src/GMAO_Shared/MAPL_cfio/examples/CVS/Entries (99%) (1293) $ git status On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) deleted: Applications/CVS/Entries.Static no changes added to commit (use "git add" and/or "git commit -a")
Huh. Well, I don't like to see any messages:
(1294) $ git rm Applications/CVS/Entries.Static rm 'src/Applications/CVS/Entries.Static' (1295) $ git status On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) Changes to be committed: (use "git reset HEAD <file>..." to unstage) deleted: Applications/CVS/Entries.Static (1296) $ git commit -m "MAT: Remove deleted file shown by git status" [master bf2b958] MAT: Remove deleted file shown by git status 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/Applications/CVS/Entries.Static (1297) $ git status On branch master Your branch is ahead of 'origin/master' by 2 commits. (use "git push" to publish your local commits) nothing to commit, working directory clean
That last message is good.
Now let's tag and push:
(1298) $ git tag -a Ganymed-4_0_p1 -m "MAT: Tag Ganymed-4_1" (1299) $ git log --decorate=full commit bf2b9584f29972078803985791b0df0b68a74a83 (HEAD, tag: refs/tags/Ganymed-4_0_p1, refs/heads/master) Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Wed Dec 3 09:03:20 2014 -0500 MAT: Remove deleted file shown by git status commit 2515d09f0085fd9370e0b39c538793c9c5ce753d Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Wed Dec 3 09:01:27 2014 -0500 MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03 commit a803acd43fc803511fdac603a6912ebc1b95f41b (tag: refs/tags/Ganymed-4_0, refs/remotes/origin/master, refs/remotes/origin/HEAD) Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:07:59 2014 -0400 MAT: Add .gitignore file commit c13a2dc367c3c709e21a82b7f8c858486c292acd Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:06:40 2014 -0400 Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04 (1300) $ 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) Counting objects: 1727, done. Delta compression using up to 8 threads. Compressing objects: 100% (1056/1056), done. Writing objects: 100% (1059/1059), 259.46 KiB | 0 bytes/s, done. Total 1059 (delta 395), reused 0 (delta 0) To /discover/swdev/adasilva/bridge/GEOSagcm a803acd..bf2b958 master -> master (1301) $ git push origin --tags Counting objects: 1, done. Writing objects: 100% (1/1), 178 bytes | 0 bytes/s, done. Total 1 (delta 0), reused 0 (delta 0) To /discover/swdev/adasilva/bridge/GEOSagcm * [new tag] Ganymed-4_0_p1 -> Ganymed-4_0_p1
Back at the repo, let's see what we see:
(1403) $ pwd /gpfsm/dswdev/adasilva/bridge/GEOSagcm (1404) $ git log --decorate=full commit bf2b9584f29972078803985791b0df0b68a74a83 (HEAD, tag: refs/tags/Ganymed-4_0_p1, refs/heads/master) Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Wed Dec 3 09:03:20 2014 -0500 MAT: Remove deleted file shown by git status commit 2515d09f0085fd9370e0b39c538793c9c5ce753d Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Wed Dec 3 09:01:27 2014 -0500 MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03 commit a803acd43fc803511fdac603a6912ebc1b95f41b (tag: refs/tags/Ganymed-4_0) Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:07:59 2014 -0400 MAT: Add .gitignore file commit c13a2dc367c3c709e21a82b7f8c858486c292acd Author: Matthew Thompson <matthew.thompson@nasa.gov> Date: Thu Sep 4 13:06:40 2014 -0400 Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04