170 likes | 321 Views
The ARPS System − CVS Repository, Current Status and Further Plan. Yunheng Wang October 2007 Last modified on 01/03/2008. What is CVS. A version control system Not a build system Not a substitute for management Not a substitute for developer communication A replacement – Subversion (SVN)
E N D
The ARPS System −CVS Repository, Current Status and Further Plan Yunheng Wang October 2007 Last modified on 01/03/2008
What is CVS • A version control system • Not a build system • Not a substitute for management • Not a substitute for developer communication • A replacement – Subversion (SVN) • SVN based on the same ideas as CVS, but without the bugs and misfeatures • CVS users could switch to SVN with little effort • Reasons about why we are still using CVS • It is contained in all the Linux systems (no install required) • We do not use those new features of SVN currently. • Most important, I just start learning SVN myself☺. • Documentation • CVS - http://ximbiot.com/cvs/cvshome/docs/ • SVN – http://throttle.ou.edu/temp/manuals/svn-book.pdf
CVS Key components • Key components • Repository (file server? database? Time machine?) • Working copies • Network • Multiple users • File-sharing • Copy-Modify-Merge • Check out • Resolve Conflicts • Check in (commit) • Locking Repository Write Read Read Client Client Client
The ARPS CVS Repository • The ARPS CVS repository is hosted on downdraft.caps.ou.edu (or arps.caps.ou.edu) currently. • To work with the ARPS repository, Set environment first • For csh/tcsh put the following in .cshrc, .tcshrc or .login (.login is preffered) • setenvCVSROOT :ext:arps.caps.ou.edu:/export/arpsofficial/arpscvsroot • setenvCVS_RSH ssh • For bash put the following in .bashrc or .profile • exportCVSROOT= :ext:arps.caps.ou.edu:/export/arpsofficial/arpscvsroot • exportCVS_RSH=ssh • Anonymous access is still not available and is planed with SVN when we have a dedicated ARPS server. • So you should maintain an account on downdraft(arps.caps.ou.edu). Otherwise, ask Scott or Don for an account.
Checking out • To export a copy (a clear copy without CVS tags etc. Will not be possible to compare with the files in repository later) • cvsexport –d arps5.2.x –D now arps5.2 • You will get a sub-directory in your current working directory, which contains the latest ARPS file from the repository. • Check out a working copy (this copy can be synchronized with the CVS repository later – update, compare, log etc.) • cvsco –d arps5.2.x arps5.2 • Do not want a working copy? Ok, we have a web portal to compare each version and check logs etc. http://www.caps.ou.edu/ARPS/cgi-bin/cvsweb.cgi
Working with your own copy • You can do whatever you usually do with this working copy “arps5.2.x” and ignore those subdirectories named “CVS”. For examples • Compile programs • Run simulations • Add, modify or delete any files • Check the status of your local files • cvs –n update(update local working copy but without actually doing it) • cvsstatusfile_name(s)(list the status of file(s)) • cvslogfile_name(s) (list change logs of file(s)) • Check out one specific version only • cvsco –r 1.version_number arps5.2/file_name(Check out the file) • cvsupdate –r 1.version_number file_name(update the specific file)
Merging Working Copy • To see which files have been changed since you last checkout • cvsupdate –n (update local working copy but without actually doing it) • To merge the latest file in CVS repository with your working copy • cvsupdate (update local working copy with latest files in CVS repository) • The output prefix with each file has the following means • P – the working copy has been updated • U – the file is missed in working copy and has been checked out • M – Your working copy contains modifications which is not available in the CVS repository (should be checked in) • C – CVS tried to merge the working copy with the cvs repository, but find conflicts. The file should be edited manually by searching “<<<<<“, “======“,”>>>>>>” etc. • To check the file updating history • cvshistory –e –D <date> (List all changes to the repository since <date>) • cvshistory –help (for more options and flags)
Comparison • To compare two ARPS packages • Script in the ARPS package • scripts/getdiff arps1 arps2 • Use my csh scripts (installed on most local machines, search directory /home/ywang/bin) • cmparps arps1 arps2 (Compare two ARPS packages) • cparps arps1 arps2 (Copy one ARPS package to another name – only ARPS significant files will be copied) • lnarps arps1 arps2 (Link ARPS package to another name – again only source code and significant files) • To compare any two (three) files or directories graphically • xxdiff found in /home/ywang/bin on most platforms • You may need to copy .xxdiffrcand .xxdiffignoreto your home directory for better appearance. • To compare your working copy with the repository • cvsdifffile_or_directory_name • cvsxdifffile_or_directory_name(uses graphical diff tool xxdiff and you should put /home/ywang/bin in your PATH)
CVS GUI • For Windows – WinCVS • For Linux – gCVS • Both from the CvsGui project
Make mechanism • makearps – a csh script, a combination of the functionalities of configure & compile in WRF • Compiler flags • Loader flags • Macro definition • Libraries to be linked • makearps calls make which uses rules in Makefile. Makefile calls make again by passing MACRO definitions to the Makefile in each source directory make src/arps Makefile make make make makearps Makefile src/adas Makefile others Makefile
makearps useful options • A useful trick - makearpsclean • It solves about 80% of compilation problems come to my attention. Please remember to use it as frequently as possible. • Use “clean” for WRF or “clean –a”. • “-d” option for debug mode – quick compilation • Option “-p” on shared memory machines, for example tornado, cyclone • “-nointelopt” option to avoid interprocedural optimizations with Intel compiler (default on Itanium processors). For best performance, try the following steps • makearps arps (compile arps with IPO) • Save what you have got (arps or arps_mpi) to another name • makearpsclean(clean the compiled objects) • makearps–nointelopt libarps (compile libarps without IPO) • makearps arpsenkf (adas, ext2arps etc.) (compile arpsenkf with IPO)
External Libraries • ARPS Quick guide http://www.caps.ou.edu/ARPS/arpsqg/ • Environments for makearps • First, you do not have to use environment variables on most machines. However, if you encounter a problem, try these environment variables • HDFPATH • NETCDF • NCARG_ROOT • HDF_GOOD_WITH_NET(Do not set if you do not know what it is) • PNGPATH(for GRIB2 decoding with ext2arps) • JASPER(for GRIB2 decoding with ext2arps) • NAWIPS(GEMPAK library path) • On topdawg, tornado, cyclone, vortex you should set • MPI_COMPILER(makearps will set it automatically) • MPI_INTERCONNECT (ib or p4, not required on cyclone/tornador) • If you use /home/ywang/bin/mpif90, the script will remind you to set proper environment before compiling.
Current ARPS Version • The latest release – arps5.2.8 • Soon to be released – arps5.3 • Access to the code • Locally on downdraft: /import/arps/official • Or /export/arpsofficial another mount point of the file system • Also arps.caps.ou.edu, an alias of downdraft • HTTP protocol: http://www.caps.ou.edu/ARPS/downloadarps.html • Or access it from cyclone:/arpsofficial/
The ARPS Hosting Plan • We will soon have a dedicated machine for the ARPS system, which hosts • Official ARPS code • ARPS web pages • ARPSSUPPORT mailing list • ARPS CVS repository (may be changed to Subversion later) • The ARPS ftp server will be remained the same: ftp caps.ou.edu/ARPS/ • This was a promise one year ago (?)
ARPS5.3 • A new extendable 5D scalar array is added to replace all hydrometeors variables in the ARPS system • All programs with dtaread/dtadump calls should be rewritten • The ARPS history (restart, external boundary) file format will also be changed, but should be compatible with previous format • The computation of reflectivity is changed (work by Dan Dawson) to reflect the microphysics scheme used. Will affect ARPSPLT mainly. • Added new microphysics options • WRF WSM6 scheme with updates by Dr. Zhang • simplified gamma distribution constraint for rain • Diagnostic N0 • Multimoment bulk microphysics parameterization by Dr. Milbrandt • 1-moment • 2-moment with fixed alpha • 2-moment with diagnostic alpha • 3-moment
ARPS5.3 • QSCALAR replaces QC, QR, QI, QS, QH etc. originally present in the ARPS system • QSCALAR can be extended up to 30 4D arrays • NSCALAR denotes the size of QSCALAR • P_Q[crisgh], P_N[crisgh], P_Z[risgh] etc. denotes the pointer for each 4D variable (Note that they are integers instead of Fortran pointers). • They should be included from file “globcst.inc” • Basically all subroutines with Q[CRISH] in the dummy parameter list should be changed • All programs call subroutine dtaread/dtadump should be rewritten
ARPS5.3 • Finished programs • arps • ext2arps • arpscvt • arpsplt • Adas (work in process) • Plus many works have been done by Dan Dawson. I am trying to merge it with our latest official version – arps5.2.8. • To be done – all other programs in the ARPS package