Changes between Version 13 and Version 14 of doc/app/userint/comp


Ignore:
Timestamp:
Nov 22, 2018 11:39:20 AM (6 years ago)
Author:
scharf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/app/userint/comp

    v13 v14  
    22[[TracNav(doc/userint/toc)]]
    33
    4 You can use your user-interface within a PALM-run by carrying out the following steps:\\\\
    5    1. Copy the appropriate default (empty) user-interface files {{{user_***.f90}}} to the folder that has been defined in the configuration file  by variable {{{user_source_path}}}. The default for this folder is {{{$HOME/palm/current_version/JOBS/$run_identifier/USER_CODE}}}, so in case the run identifier is {{{example}}}:
     4You can use your user-interface within a PALM-run by carrying out the following steps:\\
     5
     6   1. **Copy** the appropriate default (empty) user-interface files {{{user_***.f90}}} to the folder that has been defined in the configuration file  by variable {{{user_source_path}}}. The default for this folder is {{{$HOME/palm/current_version/JOBS/$run_identifier/USER_CODE}}}, so in case the run identifier is {{{example}}}:
    67{{{
    78   cd ~/palm/current_version
     
    910   cp trunk/SOURCE/user_***.f90  JOBS/example/USER_CODE
    1011}}}
    11       '''Attention: do not change the names of the user-interface files! '''
     12      [[span(style=color: #FF0000, Attention: do not change the names of the user-interface files!)]]
    1213
    13    2. Modify the interface routines according to your needs.\\
     14   2. **Modify** the interface routines according to your needs.\\
    1415
    15    3. Start a PALM run by entering
     16   3. **Start** a PALM run by entering
    1617{{{
    1718   palmrun -r example ...
    1819}}}
    19       The files {{{user_***.f90}}} will be automatically compiled as part of this run, before PALM is executed, and will replace {{{PALM}}}‘s respective default user-interface routines. The compiled binaries are put into a folder named {{{SOURCES_FOR_RUN_$configuration_identifier_$run_identifier}}}, where they replace the default binaries that have been created via {{{palmbuild}}}. The {{{SOURCES_FOR_RUN}}} folder is created in the directory defined by variable {{{fast_io_catalog}}} in the configuration file. It is newly created for each manual call of {{{palmrun}}}. \\\\
    2020
    21 Since the run identifier is part of the user-interface's SOURCE path, you can use different interfaces for different runs at the same time. Just store the respective interface-files in sub-folders {{{JOB/abcd/USER_CODE}}}, {{{JOBS/cdef/USER_CODE}}}, etc. and call {{{palmrun}}} with option "{{{-r abcd}}}", "{{{-r cdef}}}", etc. \\\\
    22 If you like to add additional routines which are not part of the default user-interface (see the [wiki:doc/app/userint/int list of available interface routines]), you can a) append this routines to the default user-interface file {{{user_additional_routines.f90}}} or b) create new files in your user-interface folder. These files must have names different from the default {{{PALM}}} source code files. In case of b), you must also copy the default {{{Makefile}}} into the user-interface folder, e.g.:
     21The files {{{user_***.f90}}} will be **automatically compiled** as part of this run, before PALM is executed, and will **replace** PALM‘s respective default user-interface routines in {{{/trunk/SOURCE/}}}. The compiled binaries are put into a folder named {{{SOURCES_FOR_RUN_$configuration_identifier_$run_identifier}}}, where they replace the default binaries that have been created via {{{palmbuild}}}. The {{{SOURCES_FOR_RUN}}} folder is created in the directory defined by variable {{{fast_io_catalog}}} in the configuration file. It is newly created for each manual call of {{{palmrun}}}. Since the run identifier is part of the user-interface's SOURCE path, you can use different interfaces for different runs at the same time. \\\\
     22
     23If you like to add **additional routines** which are not part of the default user-interface (see the [wiki:doc/app/userint/int list of available interface routines]), you can
     24   a) **append** this routines to the default user-interface file {{{user_additional_routines.f90}}} or \\
     25
     26   b) **create** new files in your user-interface folder. \\
     27
     28These files must have names different from the default PALM source code files. In case of b), you must also copy the default {{{Makefile}}} into the user-interface folder, e.g.:
    2329{{{
    2430   cp trunk/SOURCE/Makefile  JOBS/example/USER_CODE
     
    2632Edit the {{{Makefile}}} and add your new files and possible dependencies, following the standard "make"-rules.\\\\
    2733
     34
    2835== How to avoid re-compilation of user-interfaces
    2936
    30 It is important to know, that in general '''the modified user-interface files cannot be pre-compiled''' with {{{palmbuild}}}. This would not make sense because your user-interface may differ among your PALM runs, so you would need different {{{MAKE_DEPOSITORIES}}} depending on the run-identifier (option {{{-r}}}). Therefore, {{{palmrun}}} compiles the user-interface each time you call the script. Strictly speaking, {{{palmrun}}} internally calls {{{palmbuild}}} with special options, and {{{palmbuild}}} then compiles the user-interface and generates the {{{SOURCES_FOR_RUN}}} folder (see above).
     37It is important to know, that in general the modified user-interface files cannot be pre-compiled with {{{palmbuild}}}. This would not make sense because your user-interface may differ among your PALM runs, so you would need different {{{MAKE_DEPOSITORIES}}} depending on the run-identifier (option {{{-r}}}). Therefore, {{{palmrun}}} compiles the user-interface each time you call the script. Strictly speaking, {{{palmrun}}} internally calls {{{palmbuild}}} with special options, and {{{palmbuild}}} then compiles the user-interface and generates the {{{SOURCES_FOR_RUN}}} folder (see above).
    3138
    32 In case you carry out a large number of test runs and don't want the user-interface to be compiled each time again (because it may take a lot of time, and you didn't change it), you can suppress compilation by adding {{{palmrun}}} option {{{-V}}}. Then, {{{palmrun}}}/{{{palmbuild}}} tries to re-use the compiled interface from the last call of {{{palmrun}}} with same configuration identifier and run identifier (given by options {{{-c}}} and {{{-r}}}), by re-using the respective {{{SOURCES_FOR_RUN}}} folder that has been generated by the previous run. Automatically generated calls of {{{palmrun}}} (restart runs in job chains) use the same method, so they do not need to compile the user-interface again. \\\\
    33 
    34 For debugging user-defined code, see section [../../intdbg Debugging].
    35 
     39In case you carry out a large number of test runs and you **don't want the user-interface to be compiled each time** again (because it may take a lot of time, and you didn't change it), you can suppress compilation by adding {{{palmrun}}} option {{{-V}}}. Then, {{{palmrun}}}/{{{palmbuild}}} tries to re-use the compiled interface from the last call of {{{palmrun}}} with same configuration identifier and run identifier (given by options {{{-c}}} and {{{-r}}}), by re-using the respective {{{SOURCES_FOR_RUN}}} folder that has been generated by the previous run. Automatically generated calls of {{{palmrun}}} (restart runs in job chains) use the same method, so they do not need to compile the user-interface again. \\\\