Changes between Version 1 and Version 2 of doc/app/palmbuild_quickstart


Ignore:
Timestamp:
Aug 30, 2018 8:40:48 AM (6 years ago)
Author:
raasch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/app/palmbuild_quickstart

    v1 v2  
    11= Quickstart guide for compiling PALM with {{{palmbuild}}} =
    22
    3 == Introduction ==
    4 PALM can be run in different modes:
    5 * [#interactive interactive mode] | PALM executes (almost) immediately within your terminal session after entering the {{{palmrun}}} command.
    6 * [#batch batch mode] | PALM job is submitted by {{{palmrun}}} to a queuing/batch system (e.g. PBS, ...), where it is scheduled for execution.
    73
    8 A batch system is a must-have on high-performance computers, and a nice-to-have for computers that are shared among a larger number of users.
    9 The handling of PALM differs between interactive and batch mode, and it slightly varies, depending if the PALM job is submitted to the
     4{{{palmbuild}}} is the shell script to compile PALM.
     5
     6Manual calls of {{{palmbuild}}} are used to generate or update the compiled PALM sources (binaries). Specific informations e.g. about the compiler and the compiler options to be used need to be specified in the [wiki:doc/app/palm_config configuration file]. Relevant variables to be specified are ''source_path'', ''user_source_path'', ''compiler_name'', ''compiler_name_ser'', ''cpp_options'', ''make_options'', ''compiler_options'' and ''linker_options''. See [wiki:doc/app/palm_config configuration file] for a description of these variables. Since you can have different configuration files (for different compilers, compiler options, or hosts), you need to specify the configuration file to be used by {{{palmbuild}}}. Assuming a configuration file {{{.palm.config.abcde}}}, you need to enter
     7{{{
     8   palmbuild -h abcde
     9}}}
     10{{{abcde}}} is the so-called ''configuration identifier''. {{{default}}} is assumed as configuration identifier, if option {{{-h}}} is omitted. After entering the command, informative messages will appear in the terminal:
     11{{{
     12#------------------------------------------------------------------------#
     13| palmbuild  1.0  Rev: 3210 $              Thu Aug 30 09:29:56 CEST 2018 |
     14| PALM code       Rev: 3220                                              |
     15|                                                                        |
     16| called on:   bora (IP:130.75.105.103)                                  |
     17| config file: /home/raasch/palm/current_version/.palm.config.abcde      |
     18| makefile:    /home/raasch/palm/current_version/trunk/SOURCE/Makefile   |
     19| source path: /home/raasch/palm/current_version/trunk/SOURCE            |
     20|                                                                        |
     21| config. identifier: abcde                                              |
     22| local depository:   /home/raasch/palm/current_version/MAKE_DEPOSITORY_ |
     23|                     abcde                                              |
     24| username:           raasch                                             |
     25| address:            130.75.105.103                                     |
     26| compiler:           mpif90                                             |
     27| serial compiler:    ifort                                              |
     28| make options:       -j 8                                               |
     29| cpp options:        -cpp -D__parallel ......                           |
     30| compiler options:   -fpe0 -O3 ......                                   |
     31| linker options:     -fpe0 -O3 ......                                   |
     32#------------------------------------------------------------------------#
     33
     34 >>> continue (y(es)/c(ontinue)/a(bort)) ? 
     35}}}
     36If {{{y}}} is entered, compilation will be started and compiler messages will appear. After successful completion, you will find the binaries in the directory given in the configuration file by {{{base_directory}}} under the folder name {{{MAKE_DEPOSITORY_abcde}}}.
     37
     38In case of a configuration file for PALM runs on a remote host, sources are copied via {{{scp}}} to the remote host and the compiler is called via {{{ssh}}} on the remote host too. Folder {{{MAKE_DEPOSITORY_abcde}}} is created under {{{base_directory}}} on the remote host.
     39
     40In case you have updated the PALM code, you need to call {{{palmbuild}}} again:
     41{{{
     42   cd ~/palm/current_version
     43   svn update trunk
     44   palmbuild -h abcde
     45}}}
     46
     47If you have changed the compiler options in the configuration file and like to re-compile the PALM code with the new options, you need to touch the source code files in your working copy of the repository first,
     48{{{
     49   touch trunk/SOURCE/*.f90
     50   palmbuild -h abcde
     51}}}
     52because otherwise the make mechanism would see no changes in the source code and would not compile at all (message {{{make: Nothing to be done}}}). Alternatively, you may delete the MAKE_DEPOSITORY folder:
     53{{{
     54   rm -rf MAKE_DEPOSITORY_abcde
     55   palmbuild -h abcde
     56}}}
     57
     58If you have more than one configuration file, you need to call {{{palmbuild}}} separately for each configuration.
     59
     60For further information see the [wiki:doc/app/palmbuild detailed palmbuild description].