/[MITgcm]/MITgcm/doc/devel_HOWTO.sgml
ViewVC logotype

Diff of /MITgcm/doc/devel_HOWTO.sgml

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.15 by jmc, Tue Mar 1 01:33:19 2011 UTC revision 1.16 by jmc, Sun Apr 24 00:04:40 2011 UTC
# Line 31  Line 31 
31          <date>2010-01-21</date>          <date>2010-01-21</date>
32          <authorinitials>jmc</authorinitials>          <authorinitials>jmc</authorinitials>
33          <revremark>          <revremark>
34            update links.            Update links.
35          </revremark>          </revremark>
36        </revision>        </revision>
37        <revision>        <revision>
# Line 42  Line 42 
42            Add subsection "Developer settings" (under CVS Repository).            Add subsection "Developer settings" (under CVS Repository).
43          </revremark>          </revremark>
44        </revision>        </revision>
45          <revision>
46            <revnumber>0.04</revnumber>
47            <date>2011-04-24</date>
48            <authorinitials>jmc</authorinitials>
49            <revremark>
50              Update subsection "The verification suite".
51            </revremark>
52          </revision>
53      </revhistory>      </revhistory>
54    
55      <abstract>      <abstract>
# Line 132  Line 140 
140         doc                      basic developpment documentation         doc                      basic developpment documentation
141         eesupp                   execution environment support code (wrapper)         eesupp                   execution environment support code (wrapper)
142         exe                      empty         exe                      empty
143         jobs                     runtime shell scripts for         jobs                     runtime shell scripts for
144                                    various platforms (not maintained)                                    various platforms (not maintained)
145         lsopt                    line search         lsopt                    line search
146         model                    main dynamics (core)         model                    main dynamics (core)
# Line 151  Line 159 
159    gfd_lab               -?-    gfd_lab               -?-
160    manual                source of MITgcm documentation    manual                source of MITgcm documentation
161    mitgcm.org            build web site    mitgcm.org            build web site
162    old_develop           old and early development source    old_develop           old and early development source
163         misc                 -?-         misc                 -?-
164         models               -?-         models               -?-
165         packages             -?-         packages             -?-
# Line 220  Line 228 
228      <sect2>      <sect2>
229        <title> Developer settings </title>        <title> Developer settings </title>
230    
231        <para>CVS is a convenient tool to keep up-to-date a personal copy of the        <para>CVS is a convenient tool to keep up-to-date a personal copy of the
232        MITgcm code (see: <ulink url="http://mitgcm.org/public/using_cvs.html">        MITgcm code (see: <ulink url="http://mitgcm.org/public/using_cvs.html">
233        using CVS </ulink>). The same tool is used by developers to        using CVS </ulink>). The same tool is used by developers to
234        incorporate any change into the repository. However, this later        incorporate any change into the repository. However, this later
235        function requires specific settings, as detailed here after:</para>        function requires specific settings, as detailed here after:</para>
236        <orderedlist>        <orderedlist>
237          <listitem>          <listitem>
238            <para> You will need an account (loggin access) to the server            <para> You will need an account (loggin access) to the server
239             "mitgcm.org" with the proper group setting (e.g.,             "mitgcm.org" with the proper group setting (e.g.,
240              group "gcmctrb" to add/modify code into MITgcm_contrib).              group "gcmctrb" to add/modify code into MITgcm_contrib).
241              This kind of account is granted only upon well motivated request.              This kind of account is granted only upon well motivated request.
242              The access to the server mitgcm.org is through ssh-key authorization              The access to the server mitgcm.org is through ssh-key authorization
243              which will need to be set properly on both side (on your local machine              which will need to be set properly on both side (on your local machine
244              and on your server account). You need to be able to              and on your server account). You need to be able to
245              to ssh to mitgcm.org (or <filename>ssh MY_USER_NAME@mitgcm.org</filename>              to ssh to mitgcm.org (or <filename>ssh MY_USER_NAME@mitgcm.org</filename>
246              in case of different user-name on both sides) to proceed further.</para>              in case of different user-name on both sides) to proceed further.</para>
247          </listitem>          </listitem>
248    
249          <listitem>          <listitem>
250            <para> You need to register to the            <para> You need to register to the
251          <ulink url="http://mitgcm.org/mailman/listinfo/mitgcm-cvs">          <ulink url="http://mitgcm.org/mailman/listinfo/mitgcm-cvs">
252        mitgcm-cvs </ulink> mailing list.        mitgcm-cvs </ulink> mailing list.
253            This ensures that other developers will receive email notification            This ensures that other developers will receive email notification
254             when you make changes; you will also receive as well such email             when you make changes; you will also receive as well such email
255             when others make changes to the repository.             when others make changes to the repository.
256            </para>            </para>
257          </listitem>          </listitem>
258    
259          <listitem>          <listitem>
260            <para> It is highly recommended that you register also to the            <para> It is highly recommended that you register also to the
261          <ulink url="http://mitgcm.org/mailman/listinfo/mitgcm-devel">          <ulink url="http://mitgcm.org/mailman/listinfo/mitgcm-devel">
262        mitgcm-devel </ulink> mailing list (expect a short delay for        mitgcm-devel </ulink> mailing list (expect a short delay for
263         this request to be processed).         this request to be processed).
264            This list is intended for developer discussions.            This list is intended for developer discussions.
# Line 259  Line 267 
267    
268          <listitem>          <listitem>
269            <para> The standard anonymous mode (using "cvsanon", as mentionned            <para> The standard anonymous mode (using "cvsanon", as mentionned
270          <ulink url="http://mitgcm.org/public/source_code.html">          <ulink url="http://mitgcm.org/public/source_code.html">
271        here </ulink>) does not allow check-in ("cvs commit") permission.        here </ulink>) does not allow check-in ("cvs commit") permission.
272           Instead, you will need to set our CVS environment as follow:</para>           Instead, you will need to set our CVS environment as follow:</para>
273  <screen>  <screen>
# Line 272  Line 280 
280  <screen>  <screen>
281    $ cvs co -P -d myCopy MITgcm_contrib/thisPart    $ cvs co -P -d myCopy MITgcm_contrib/thisPart
282  </screen>  </screen>
283            <para> the type of CVS environment which has been used            <para> the type of CVS environment which has been used
284             is stored in the file <filename>myCopy/CVS/Root</filename>             is stored in the file <filename>myCopy/CVS/Root</filename>
285             and makes it difficult to re-use, for cvs-commit purpose,             and makes it difficult to re-use, for cvs-commit purpose,
286             a cvs local copy (<filename>myCopy</filename>) which was obtained             a cvs local copy (<filename>myCopy</filename>) which was obtained
287             using the CVS anonymous mode.</para>             using the CVS anonymous mode.</para>
288          </listitem>          </listitem>
289    
290          <listitem>          <listitem>
291            <para> At this stage, you should be able to send your modified source            <para> At this stage, you should be able to send your modified source
292            file (e.g., <filename>src_file</filename>) from your local copy directory            file (e.g., <filename>src_file</filename>) from your local copy directory
293            (<filename>myCopy</filename>) to the CVS repository            (<filename>myCopy</filename>) to the CVS repository
294            (<filename>MITgcm_contrib/thisPart</filename>) using the command            (<filename>MITgcm_contrib/thisPart</filename>) using the command
295            "cvs commit":</para>            "cvs commit":</para>
# Line 291  Line 299 
299    $ cvs diff src_file    (optional; list your changes)    $ cvs diff src_file    (optional; list your changes)
300    $ cvs commit src_file    $ cvs commit src_file
301  </screen>  </screen>
302            <para> It is essential that you provide a short description of the            <para> It is essential that you provide a short description of the
303            changes you made to <filename>src_file</filename> as you check-in            changes you made to <filename>src_file</filename> as you check-in
304            this file (the "cvs commit" command automatically opens your standard            this file (the "cvs commit" command automatically opens your standard
305            editor for this purpose).</para>            editor for this purpose).</para>
306          </listitem>          </listitem>
307    
# Line 357  checkpoint50e_post Line 365  checkpoint50e_post
365  o make KPP work with PTRACERS  o make KPP work with PTRACERS
366   - fix gad_calc_rhs to call new routine kpp_transport_ptr, which is   - fix gad_calc_rhs to call new routine kpp_transport_ptr, which is
367     nearly a copy of kpp_transport_s     nearly a copy of kpp_transport_s
368   - there is no analogue to SurfaceTendencyS, so I have to use   - there is no analogue to SurfaceTendencyS, so I have to use
369     gPtr(of the surface layer) instead     gPtr(of the surface layer) instead
370  o add a new platform SunFire+mpi (SunFire 15000) to genmake  o add a new platform SunFire+mpi (SunFire 15000) to genmake
371  checkpoint50e_pre  checkpoint50e_pre
372    
373  checkpoint50d_post  checkpoint50d_post
374  o change kpp output from multiple-record state files to single-record state  o change kpp output from multiple-record state files to single-record state
375    files analogous to write_state.F    files analogous to write_state.F
376  o reduce the output frequency of cg3d-related stuff to the monitor frequency,  o reduce the output frequency of cg3d-related stuff to the monitor frequency,
377    analogous to the cg2d-related output.    analogous to the cg2d-related output.
378  o fix small problem with in ptracers_write_checkpoint.F: len(suff)=512,  o fix small problem with in ptracers_write_checkpoint.F: len(suff)=512,
379    so that writing to internal file fn (with length 512) fails.    so that writing to internal file fn (with length 512) fails.
380  checkpoint50d_pre  checkpoint50d_pre
381  </programlisting>  </programlisting>
# Line 401  checkpoint50d_pre Line 409  checkpoint50d_pre
409    
410        <para>The following sections describe the individual steps in the build        <para>The following sections describe the individual steps in the build
411          process.</para>          process.</para>
412          
413        <sect3 id="genmake">        <sect3 id="genmake">
414          <title>The <filename>genmake2</> Utility</title>          <title>The <filename>genmake2</> Utility</title>
415    
# Line 554  checkpoint50d_pre Line 562  checkpoint50d_pre
562                  <listitem><para>Packages either explicitly specified or                  <listitem><para>Packages either explicitly specified or
563                      provided by default (in the order given)</para></listitem>                      provided by default (in the order given)</para></listitem>
564                  <listitem><para>Packages included due to package dependencies                  <listitem><para>Packages included due to package dependencies
565                      (in the order that that package dependencies are                      (in the order that that package dependencies are
566                      parsed)</para></listitem>                      parsed)</para></listitem>
567                  <listitem><para>The "standard dirs" (which may have been                  <listitem><para>The "standard dirs" (which may have been
568                      specified by the "-standarddirs" option)</para></listitem>                      specified by the "-standarddirs" option)</para></listitem>
# Line 638  checkpoint50d_pre Line 646  checkpoint50d_pre
646            files, and links.  It is strongly recommended for "un-clean"            files, and links.  It is strongly recommended for "un-clean"
647            directories which may contain the (perhaps partial) results of            directories which may contain the (perhaps partial) results of
648            previous builds. Such "debris" can interfere with the next stage of            previous builds. Such "debris" can interfere with the next stage of
649            the build.            the build.
650            A more agressive cleaning option, "make CLEAN", can be used to also            A more agressive cleaning option, "make CLEAN", can be used to also
651            remove the executable and output files from a previous run.</para>            remove the executable and output files from a previous run.</para>
652    
653          <para>The "make depend" step will create a large number of symbolic          <para>The "make depend" step will create a large number of symbolic
# Line 673  checkpoint50d_pre Line 681  checkpoint50d_pre
681              <listitem>              <listitem>
682                <para>This target produces an <filename>mitgcmuv_ad</> executable                <para>This target produces an <filename>mitgcmuv_ad</> executable
683                  using the <filename>taf</> or <filename>staf</> adjoint                  using the <filename>taf</> or <filename>staf</> adjoint
684                  compiler.  See the <filename>genmake2</> "-adof" option for                  compiler.  See the <filename>genmake2</> "-adof" option for
685                  compiler selection.</para>                  compiler selection.</para>
686              </listitem>              </listitem>
687            </varlistentry>            </varlistentry>
# Line 700  checkpoint50d_pre Line 708  checkpoint50d_pre
708    
709        <para>The MITgcm CVS tree (within the <filename>$ROOTDIR/verification/</>        <para>The MITgcm CVS tree (within the <filename>$ROOTDIR/verification/</>
710          directory) includes many (> 90) examples intended for regression          directory) includes many (> 90) examples intended for regression
711          testing.  Each one of these example directories contains "known-good"          testing.  Each one of these test-experiment directories contains "known-good"
712          output files along with all the input (including both code and data          output files along with all the input (including both code and data
713          files) required for their re-calculation.  These example directories are          files) required for their re-calculation.
714          further broken down into sets of subdirectories          Also included in <filename>$ROOTDIR/verification/</> is the shell
715          (eg. <filename>/input</>, <filename>/code</>) intended to expedite the          script <filename>testreport</> to perform regression tests.</para>
716          testing process.</para>  
717          <sect3 id="test-experiment">
718            <title>Test-experiment Directory Content</title>
719    
720              <para> Each test-experiment directory (<filename>TESTDIR</>) contains
721              several standard subdirectories and files which <filename>testreport</>
722              recognizes and uses when running a regression test.
723              The directories/files that <filename>testreport</> uses are different
724              for a forward test and an adjoint test (<filename>testreport -adm</>)
725              and some test-experiments are set-up for only one type of regression
726              test whereas others allow both types of tests (forward and adjoint).</para>
727              <para>Also some test-experiment allows, using the same MITgcm executable,
728              to perform multiple tests using different parameters and input files,
729              with a primary input set-up
730              (<filename>input/ </> or <filename>input_ad/ </>)
731              and corresponding results (<filename>results/output.txt</> or
732              <filename>results/output_adm.txt</>) and with one or several secondary
733              inputs (<filename>input.OTHER/ </> or <filename>input_ad.OTHER/ </>)
734              and corresponding results (<filename>results/output.OTHER.txt </>
735              or <filename>results/output_adm.OTHER.txt</>).</para>
736            <variablelist>
737    
738              <varlistentry>
739                <term>directory <filename>TESTDIR/results/</></term>
740                <listitem>
741                  <para>contains reference standard output used for test comparison.
742                    <filename>results/output.txt</> and
743                    <filename>results/output_adm.txt</>
744                    correspond respectively to primary forward and adjoint test
745                    run on the reference platform (currently
746                    <filename>baudelaire.csail.mit.edu</>)
747                    on one processor (no MPI, single thread)
748                    using the reference compiler (curently the GNU fortran
749                    compiler <filename>gfortran</>).
750                    The presence of these files determines whether or not
751                    <filename>testreport</> is testing or skipping
752                    this test-experiment.
753                    Reference standard output for secondary tests
754                    (<filename>results/output.OTHER.txt</>
755                    or <filename>results/output_adm.OTHER.txt</>) are
756                    also expected here.</para>
757                  <para>The test comparison involves few model variables output, which are,
758                    by default and for a forward test, the 2-D solver initial residual
759                    (<filename>cg2d_init_res</>) and 3-D state variables (T,S,U,V)
760                    monitor output, and, by default and for an adjoint test, the
761                    cost-function and gradient-check. However, some test-experiments
762                    use some package-specific variable/monitor output according to
763                    the file <filename>TESTDIR/input[_ad][.OTHER]/tr_checklist</>
764                    specification.</para>
765                </listitem>
766              </varlistentry>
767    
768              <varlistentry>
769                <term>directory <filename>TESTDIR/build/</></term>
770                <listitem>
771                  <para> initially empty directory where <filename>testreport</>
772                    will build the MITgcm executable for forward and adjoint test.
773                    It might contains an experiment specific
774                    <filename>genmake_local</> file (see <xref linkend="genmake">).
775                    </para>
776                  <para> Note that the original <filename>code[_ad]/SIZE.h_mpi</>
777                    is not directly used as "SIZE.h" to build an MPI-executable ;
778                    instead, a local copy <filename>build/SIZE.h.mpi</> is derived
779                    from <filename>code[_ad]/SIZE.h_mpi</>
780                    by adjusting the number of processors (nPx,nPy) according to
781                    <filename>NUMBER_OF_PROCS</> (see <xref linkend="testreport">,
782                    <filename>testreport -MPI</>) ; then it is linked to "SIZE.h"
783                    (<filename> ln -s SIZE.h.mpi SIZE.h </>) before building
784                    the MPI-executable.</para>
785                </listitem>
786              </varlistentry>
787    
788              <varlistentry>
789                <term>directory <filename>TESTDIR/code/</></term>
790                <listitem>
791                  <para>contains the test-experiment specific source code
792                    used to build the MITgcm executable (<filename>mitgcmuv</>)
793                    for forward-test (using <filename>genmake2 -mods=../code</>).
794                    </para>
795                    <para> It can also contain specific source files with the suffix
796                    "<filename>_mpi</>" to be used
797                    <!--
798                    in the <filename>TESTDIR/build/</> directory
799                    -->
800                    in place of the corresponding file (without suffix)
801                    for an MPI test (see <xref linkend="testreport">).
802                    The presence or absence of <filename>SIZE.h_mpi</>
803                    determines whether or not an MPI test on this
804                    test-experiment is performed or skipped.</para>
805                </listitem>
806              </varlistentry>
807    
808              <varlistentry>
809                <term>directory <filename>TESTDIR/code_ad/</></term>
810                <listitem>
811                  <para>contains the test-experiment specific source code
812                    used to build the MITgcm executable (<filename>mitgcmuv_ad</>)
813                    for adjoint-test (using <filename>genmake2 -mods=../code_ad</>).
814                    It can also contain specific source files with the suffix
815                    "<filename>_mpi</>" (see above).</para>
816                </listitem>
817              </varlistentry>
818    
819              <varlistentry>
820                <term>directory <filename>TESTDIR/input/</></term>
821                <listitem>
822                  <para>contains the input and parameter files
823                    used to run the primary forward test of this test-experiment.
824                    </para>
825                  <para>It can also contain specific parameter files with the suffix
826                    "<filename>.mpi</>" to be used
827                    <!--
828                    in the <filename>TESTDIR/run/</> directory
829                    -->
830                    in place of the corresponding file (without suffix) for MPI
831                    test, or with suffix "<filename>.mth</>" to be used for
832                    multi-threaded test (see <xref linkend="testreport">).
833                    The presence or absence of <filename>eedata.mth</>
834                    determines whether or not a multi-threaded test on this
835                    test-experiment is performed or skipped.</para>
836                  <para>To save disk space and reduce downloading time, multiple
837                    copies of the same input file is avoided by using a shell
838                    script <filename>prepare_run</>.
839                    When such a script is found in <filename>TESTDIR/input/ </>,
840                    <filename>testreport</> run this script in directory
841                    <filename>TESTDIR/run/ </> after linking all the input file
842                    from <filename>TESTDIR/input/ </>.
843                    </para>
844                </listitem>
845              </varlistentry>
846    
847              <varlistentry>
848                <term>directory <filename>TESTDIR/input_ad/</></term>
849                <listitem>
850                  <para>contains the input and parameter files
851                    used to run the primary adjoint test of this test-experiment.
852                    It can also contain specific parameter files with the suffix
853                    "<filename>.mpi</>" and shell script <filename>prepare_run</>
854                    as described above.</para>
855                </listitem>
856              </varlistentry>
857    
858              <varlistentry>
859                <term>directory <filename>TESTDIR/input.OTHER/</></term>
860                <listitem>
861                  <para>contains the input and parameter files
862                    used to run the secondary OTHER forward test of this test-experiment.
863                    It can also contain specific parameter files with suffix
864                    "<filename>.mpi</>" or "<filename>.mth</>" and shell script
865                    <filename>prepare_run</> (see above).</para>
866                    <para> The presence or absence the file <filename>eedata.mth</>
867                    determines whether or not a secondary multi-threaded test on this
868                    test-experiment is performed or skipped.</para>
869                </listitem>
870              </varlistentry>
871    
872              <varlistentry>
873                <term>directory <filename>TESTDIR/input_ad.OTHER/</></term>
874                <listitem>
875                  <para>contains the input and parameter files
876                    used to run the secondary OTHER adjoint test of this test-experiment.
877                    It can also contain specific parameter files with the suffix
878                    "<filename>.mpi</>" and shell script <filename>prepare_run</>
879                    (see above).</para>
880                </listitem>
881              </varlistentry>
882                    <!--
883                    -->
884              <varlistentry>
885                <term>directory <filename>TESTDIR/run/</></term>
886                <listitem>
887                  <para> initially empty directory where <filename>testreport</>
888                    will run the MITgcm executable for primary forward and adjoint
889                    test.</para>
890                  <para>Symbolic links (using command "<filename>ln -s</>") are made
891                    for input and parameter files (from <filename>../input/ </>
892                    or from <filename>../input_ad/ </>) and for MITgcm executable
893                    (from <filename>../build/ </>) before the run proceeds.
894                    The sequence of links (function <filename>linkdata</> within shell
895                    script <filename>testreport</>) for a forward test is:</para>
896    <screen>
897    * link+rename or remove links
898           to special files with suffix ".mpi" or ".mth" from ../input/
899    * link files from ../input/
900    * execute ../input/prepare_run (if it exists)
901    </screen>
902                  <para>The sequence for an ajoint test is similar, with
903                    <filename>../input_ad/ </> replacing <filename>../input/ </>.
904                    </para>
905                </listitem>
906              </varlistentry>
907    
908              <varlistentry>
909                <term>directory <filename>TESTDIR/tr_run.OTHER/</></term>
910                <listitem>
911                  <para> directory created by <filename>testreport</>
912                    to run the MITgcm executable for secondary "OTHER" forward
913                    or adjoint test.</para>
914                  <para> The sequence of links for a forward secondary test is:</para>
915    <screen>
916    * link+rename or remove links
917           to special files with suffix ".mpi" or ".mth" from ../input.OTHER/
918    * link files from ../input.OTHER/
919    * execute ../input.OTHER/prepare_run (if it exists)
920    * link files from ../input/
921    * execute ../input/prepare_run (if it exists)
922    </screen>
923                  <para>The sequence for an ajoint test is similar, with
924                    <filename>../input_ad.OTHER/ </> and <filename>../input_ad/ </>
925                    replacing <filename>../input.OTHER/ </> and <filename>../input/ </>.
926                    </para>
927                </listitem>
928              </varlistentry>
929    
930            </variablelist>
931          </sect3>
932    
933        <sect3 id="testreport">        <sect3 id="testreport">
934          <title>The <filename>testreport</> Utility</title>          <title>The <filename>testreport</> Utility</title>
935    
936          <para>Also included in <filename>$ROOTDIR/verification/</> are shell          <para> The shell script  <filename>testreport</> (in
937            scripts for automated testing.  The script (which was written            <filename>$ROOTDIR/verification/</>), which was written to work with
938            to work with <filename>genmake2</>) is called <filename>testreport</>.            <filename>genmake2</>, can be used to build different versions
939            This script can be used to build different versions of the MITgcm            of the MITgcm code, run the various examples, compare the output,
940            code, run the various examples, compare the output, and (if specified)            and (if specified) email the results of each one of these tests to a
941            email the results of each one of these tests to a central            central repository.</para>
           repository.</para>  
942    
943          <para>On some systems, the testreport script can be run with a command          <para>On some systems, the testreport script can be run with a command
944          line as simple as:</para>          line as simple as:</para>
# Line 744  checkpoint50d_pre Line 966  checkpoint50d_pre
966              <term><filename>-ieee</> (default) / <filename>-noieee</></term>              <term><filename>-ieee</> (default) / <filename>-noieee</></term>
967              <listitem>              <listitem>
968                <para>If allowed by the compiler (as defined in the "optfile"),                <para>If allowed by the compiler (as defined in the "optfile"),
969                  use IEEE arithmetic (<filename>genmake2 -ieee</>).                  use IEEE arithmetic (<filename>genmake2 -ieee</>).
970                  This option, along with the gfortran / gcc compiler,                  This option, along with the gfortran / gcc compiler,
971                  is how the standard results are produced.</para>                  is how the standard results are produced.</para>
972              </listitem>              </listitem>
# Line 794  checkpoint50d_pre Line 1016  checkpoint50d_pre
1016              <term><filename>-MPI NUMBER_OF_PROCS</></term>              <term><filename>-MPI NUMBER_OF_PROCS</></term>
1017              <term><filename>-mpi</></term>              <term><filename>-mpi</></term>
1018              <listitem>              <listitem>
1019                <para>If the necessary file (<filename>TESTDIR/code/SIZE.h_mpi</>)                <para>If the necessary file (<filename>TESTDIR/code/SIZE.h_mpi</>)
1020                exists, then use it (and all <filename>TESTDIR/code/*_mpi</> files)                exists, then use it (and all <filename>TESTDIR/code/*_mpi</> files)
1021                for an MPI--enabled run.  The new option (<filename>-MPI</> followed                for an MPI--enabled run.  The new option (<filename>-MPI</> followed
1022                by the maximum number of processors) enable to build and run each                by the maximum number of processors) enable to build and run each
1023                test-experiment using variable number of MPI processors (multiple                test-experiment using variable number of MPI processors (multiple
1024                of <filename>nPx*nPy</> from <filename>TESTDIR/code/SIZE.h_mpi</>                of <filename>nPx*nPy</> from <filename>TESTDIR/code/SIZE.h_mpi</>
1025                and not larger than <filename>NUMBER_OF_PROCS</>).                and not larger than <filename>NUMBER_OF_PROCS</>).
1026                The short option ("-mpi") can only be used to build and run on 2 MPI                The short option ("-mpi") can only be used to build and run on 2 MPI
1027                processors (equivalent to "<filename>-MPI 2</>").</para>                processors (equivalent to "<filename>-MPI 2</>").</para>
1028                <para>Note that the use of MPI typically requires a                <para>Note that the use of MPI typically requires a
1029                special command option (see "-command" below) to invoke the MPI                special command option (see "-command" below) to invoke the MPI
1030                executable.  Examples of PBS scripts using testreport with MPI can be                executable.  Examples of PBS scripts using testreport with MPI can be
# Line 821  checkpoint50d_pre Line 1043  checkpoint50d_pre
1043                using testreport with MPI can be found in the <ulink                using testreport with MPI can be found in the <ulink
1044                url="http://mitgcm.org/viewvc/MITgcm/MITgcm/tools/example_scripts/">                url="http://mitgcm.org/viewvc/MITgcm/MITgcm/tools/example_scripts/">
1045                tools/example_scripts directory</ulink>.</para>                tools/example_scripts directory</ulink>.</para>
1046                  <para>
1047                    For the case where the number of MPI processors varies according
1048                    to each test-experiment, some key-words within the command-to-run
1049                    argument will be replaced by their effective value:</para>
1050                  <para>
1051                    <filename>TR_NPROC </> will be replaced by the actual number
1052                    of MPI processors needed to run the current test-experiment.</para>
1053                  <para>
1054                    <filename>TR_MFILE </> will be replaced by the name of local-file
1055                    that testreport creates from the full list of machines which
1056                    "<filename>testreport -mf MACHINE_FILE</>" provides, but truncated
1057                    to the exact number of machines.</para>
1058                </listitem>
1059              </varlistentry>
1060    
1061              <varlistentry>
1062                <term><filename>-mf MACHINE_FILE</></term>
1063                <listitem>
1064                  <para>
1065                    To use with <filename>-MPI NUMBER_OF_PROCS</> option, to specify
1066                    the file containing the full list of <filename>NUMBER_OF_PROCS</>
1067                    machines to use for the MPI runs.</para>
1068                </listitem>
1069              </varlistentry>
1070    
1071              <varlistentry>
1072                <term><filename>-mth</></term>
1073                <listitem>
1074                  <para>compile (with <filename>genmake2 -omp</>) and run with
1075                    multiple threads (using eedata.mth).</para>
1076              </listitem>              </listitem>
1077            </varlistentry>            </varlistentry>
1078    
1079          </variablelist>          </variablelist>
1080    
1081          <para>The <filename>testreport</> script will write progress to the          <para>The <filename>testreport</> script will create an output directory
1082            screen (stdout) as it runs.  In addition, it will create a            <filename>tr_NAME_DATE_N/ </>, with <filename>hostname</> as default
1083            <filename>tr_out.txt</> file that contains a brief comparison of the            <filename>NAME</>, <filename>DATE</> the current date followed by
1084            current output with the "known-good" output.</para>            a suffix number "N" to distinguish from previous
1085              <filename>testreport</> output directories.
1086              <filename>testreport</> writes progress to the screen (stdout)
1087              and reports into the ouput directory as it runs.
1088              In particular, one can find, in the ouput directory,
1089              the <filename>summary.txt</> file that contains a brief comparison
1090              of the current output with the "known-good" output.
1091              At the end of the testing process, the <filename>tr_out.txt</> file
1092              is generated in <filename>$ROOTDIR/verification/ </>
1093              as a compact version of <filename>summry.txt</> file.</para>
1094    
1095          </sect3>
1096    
1097          <sect3 id="tst_2plus2">
1098            <title>The <filename>do_tst_2+2</> Utility</title>
1099            <para> The shell script  <filename>do_tst_2+2</> (in
1100              <filename>$ROOTDIR/tools/ </>)
1101              can be used to check the accuracy of the restart procedure.
1102            </para>
1103        </sect3>        </sect3>
1104    
1105      </sect2>      </sect2>
# Line 871  separated from the generic fluid dynamic Line 1140  separated from the generic fluid dynamic
1140  below using generic package names ${pkg}.  below using generic package names ${pkg}.
1141  A concrete examples of a package is the code  A concrete examples of a package is the code
1142  for implementing GM/Redi mixing. This code uses  for implementing GM/Redi mixing. This code uses
1143  the package name  the package name
1144  *   ${PKG} = GMREDI  *   ${PKG} = GMREDI
1145  *   ${pkg} = gmredi  *   ${pkg} = gmredi
1146  *   ${Pkg} = gmRedi  *   ${Pkg} = gmRedi
# Line 906  o  Each package gets its runtime configu Line 1175  o  Each package gets its runtime configu
1175     Package runtime config. options are imported     Package runtime config. options are imported
1176     into a common block held in a header file     into a common block held in a header file
1177     called "${PKG}.h".     called "${PKG}.h".
1178     Note: In some packages, the header file "${PKG}.h" is splitted     Note: In some packages, the header file "${PKG}.h" is splitted
1179     into "${PKG}_PARAMS.h" that contains the package parameters and     into "${PKG}_PARAMS.h" that contains the package parameters and
1180     ${PKG}_VARS.h" for the field arrays.     ${PKG}_VARS.h" for the field arrays.
1181    
1182  o  The core driver part of the model can check  o  The core driver part of the model can check
# Line 931  CPP Flags Line 1200  CPP Flags
1200      1. Within the core driver code flags of the form      1. Within the core driver code flags of the form
1201         ALLOW_${PKG} are used to include or exclude         ALLOW_${PKG} are used to include or exclude
1202         whole packages. The ALLOW_${PKG} flags are included         whole packages. The ALLOW_${PKG} flags are included
1203         from a PACKAGES_CONFIG.h file that is automatically         from a PACKAGES_CONFIG.h file that is automatically
1204         generated by genmake2 (see genmake2 section).         generated by genmake2 (see genmake2 section).
1205         held in-line in the CPP_OPTIONS.h header file.         held in-line in the CPP_OPTIONS.h header file.
1206         e.g.         e.g.
# Line 950  CPP Flags Line 1219  CPP Flags
1219    
1220      2. Within an individual package a header file,      2. Within an individual package a header file,
1221         "${PKG}_OPTIONS.h", is used to set CPP flags         "${PKG}_OPTIONS.h", is used to set CPP flags
1222         specific to that package. It also includes         specific to that package. It also includes
1223         "PACKAGES_CONFIG.h" and "CPP_OPTIONS.h".         "PACKAGES_CONFIG.h" and "CPP_OPTIONS.h".
1224    
1225    
# Line 964  Package Boot Sequence Line 1233  Package Boot Sequence
1233      1. S/R PACKAGES_BOOT()      1. S/R PACKAGES_BOOT()
1234              :              :
1235          CALL OPEN_COPY_DATA_FILE( 'data.pkg', 'PACKAGES_BOOT', ... )          CALL OPEN_COPY_DATA_FILE( 'data.pkg', 'PACKAGES_BOOT', ... )
1236    
1237    
1238      2. S/R PACKAGES_READPARMS()      2. S/R PACKAGES_READPARMS()
1239              :              :
# Line 1016  Package Output Line 1285  Package Output
1285  Description  Description
1286  ===========  ===========
1287    
1288        - ${PKG}_READPARMS()        - ${PKG}_READPARMS()
1289      is responsible for reading      is responsible for reading
1290      in the package parameters file data.${pkg}, and storing      in the package parameters file data.${pkg}, and storing
1291      the package parameters in "${PKG}.h" (or in "${PKG}_PARAMS.h").      the package parameters in "${PKG}.h" (or in "${PKG}_PARAMS.h").
1292      -> called from INITIALISE_FIXED in PACKAGES_READPARMS      -> called from INITIALISE_FIXED in PACKAGES_READPARMS
1293    
1294       - ${PKG}_INIT_FIXED()       - ${PKG}_INIT_FIXED()
1295      is responsible for completing the internal setup of a package.      is responsible for completing the internal setup of a package.
1296      -> called from INITIALISE_FIXED in PACKAGES_INIT_FIXED      -> called from INITIALISE_FIXED in PACKAGES_INIT_FIXED
1297      note: 1) some pkg use instead:      note: 1) some pkg use instead:
1298               CALL ${PKG}_INITIALISE  ( or the old form CALL ${PKG}_INIT )               CALL ${PKG}_INITIALISE  ( or the old form CALL ${PKG}_INIT )
1299            2) for simple pkg setup, this part is done inside ${PKG}_READPARMS            2) for simple pkg setup, this part is done inside ${PKG}_READPARMS
1300    
1301       - ${PKG}_CHECK()       - ${PKG}_CHECK()
1302      is responsible for validating      is responsible for validating
1303      basic package setup and inter-package dependencies.      basic package setup and inter-package dependencies.
1304      ${PKG}_CHECK can import other package parameters it may      ${PKG}_CHECK can import other package parameters it may
# Line 1038  Description Line 1307  Description
1307      will not be reset during ${PKG}_CHECK().      will not be reset during ${PKG}_CHECK().
1308      -> called from INITIALISE_FIXED in PACKAGES_CHECK      -> called from INITIALISE_FIXED in PACKAGES_CHECK
1309    
1310       - ${PKG}_INIT_VARIA()       - ${PKG}_INIT_VARIA()
1311      is responsible for fill-in all package variables with an initial value.      is responsible for fill-in all package variables with an initial value.
1312      Contains eventually a call to ${PKG}_READ_PICKUP that will read      Contains eventually a call to ${PKG}_READ_PICKUP that will read
1313      from a pickup file the package variables required to restart the model.      from a pickup file the package variables required to restart the model.
1314      This routine is called after the core model state has been completely      This routine is called after the core model state has been completely
1315      initialised but before the core model timestepping starts.      initialised but before the core model timestepping starts.
1316      -> called from INITIALISE_VARIA in PACKAGES_INIT_VARIABLES      -> called from INITIALISE_VARIA in PACKAGES_INIT_VARIABLES
1317      note: the name ${PKG}_INIT_VARIA is not yet standard and some pkg      note: the name ${PKG}_INIT_VARIA is not yet standard and some pkg
1318       use for e.g. ${PKG}_INI_VARS, ${PKG}_INIT_VARIABLES, or the old       use for e.g. ${PKG}_INI_VARS, ${PKG}_INIT_VARIABLES, or the old
1319       form ${PKG}_INIT       form ${PKG}_INIT
1320    
1321       - ${PKG}_OUTPUT( )       - ${PKG}_OUTPUT( )
1322       is responsible for writing time-average fields to output files       is responsible for writing time-average fields to output files
1323       (but the cumulating step is done within the package main S/R).       (but the cumulating step is done within the package main S/R).
1324       Can also contain other diagnostics (.e.g. CALL ${PKG}_MONITOR)       Can also contain other diagnostics (.e.g. CALL ${PKG}_MONITOR)
1325       and write snap-shot fields that are hold in common blocks. Other       and write snap-shot fields that are hold in common blocks. Other
1326       temporary fields are directly dump to file where they are available.       temporary fields are directly dump to file where they are available.
1327       NOTE: 1) the S/R old name ${PKG}_DIAGS is used in some packages       NOTE: 1) the S/R old name ${PKG}_DIAGS is used in some packages
1328                but is beeing replaced by ${PKG}_OUTPUT                but is beeing replaced by ${PKG}_OUTPUT
1329                to avoid confusion with pkg/diagnostics functionality.                to avoid confusion with pkg/diagnostics functionality.
1330             2) the output part is not yet in a standard form and might still             2) the output part is not yet in a standard form and might still
1331                evolve a lot.                evolve a lot.
1332      -> called within DO_THE_MODEL_IO      -> called within DO_THE_MODEL_IO
1333    
1334       - ${PKG}_WRITE_PICKUP()       - ${PKG}_WRITE_PICKUP()
1335       is responsible for writing a package pickup file when necessary for       is responsible for writing a package pickup file when necessary for
1336       a restart. (found also the old name: ${PKG}_WRITE_CHECKPOINT )       a restart. (found also the old name: ${PKG}_WRITE_CHECKPOINT )
1337      -> called from FORWARD_STEP and THE_MODEL_MAIN in PACKAGES_WRITE_PICKUP      -> called from FORWARD_STEP and THE_MODEL_MAIN in PACKAGES_WRITE_PICKUP
1338    
# Line 1099  Summary Line 1368  Summary
1368    * ${pkg}_output.F       write output to file.    * ${pkg}_output.F       write output to file.
1369    * ${pkg}_write_pickup.F write a package pickup file to restart the model    * ${pkg}_write_pickup.F write a package pickup file to restart the model
1370    
1371    New: Subroutine in one package (pkgA) that only contains code which    New: Subroutine in one package (pkgA) that only contains code which
1372         is connected to a 2nd package (pkgB) (e.g.: gmredi_diagnostics_init.F)         is connected to a 2nd package (pkgB) (e.g.: gmredi_diagnostics_init.F)
1373         will be named: pkgA_pkgB_something.F         will be named: pkgA_pkgB_something.F
1374    
# Line 1156  Summary Line 1425  Summary
1425        the CVS tree.</para>        the CVS tree.</para>
1426    
1427        <para>The result is a command that resembles either</para>        <para>The result is a command that resembles either</para>
1428          
1429        <orderedlist>        <orderedlist>
1430          <listitem>          <listitem>
1431            <para>a reference to a variable or subroutine name such as            <para>a reference to a variable or subroutine name such as
# Line 1175  Summary Line 1444  Summary
1444                into a "-")</para>                into a "-")</para>
1445          </listitem>          </listitem>
1446        </orderedlist>        </orderedlist>
1447                      
1448    
1449    
1450      </sect2>      </sect2>
1451    
1452      <sect2>      <sect2>
1453        <title>Building the Documentation</title>        <title>Building the Documentation</title>
1454          
1455        <para>Given the directory structure of <xref        <para>Given the directory structure of <xref
1456        linkend="documentation_getting">, the entire documentation for the web        linkend="documentation_getting">, the entire documentation for the web
1457        site can be built using:</para>        site can be built using:</para>

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.22