diff --git a/docs/Developer.md b/docs/Developer.md index c63d54493b172b925f6860ce3925693466c0582c..798d1a5c824835a2e0a97aedc3cebee5628c2f64 100644 --- a/docs/Developer.md +++ b/docs/Developer.md @@ -1,6 +1,6 @@ # PHYEX developer documentation -# ABOUT THIS DOCUMENT +## ABOUT THIS DOCUMENT This document is intended for developers who want to contribute to the PHYEX package. Developer who is interested in plugging the physics in a new model can refere to the Plugging documentation. @@ -11,14 +11,14 @@ The topics covered are as follows: - [Coding norms](#coding-norms) - [Pull requests](#pull-requests) -This document is written using the markdown "language". With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). -# PACKAGE ORGANISATION +## PACKAGE ORGANISATION The package contains the folowing directories: - docs: for documentation - - build: an autonomous build system is included in the package. Its usage is covered in the Offline documentation + - build: an autonomous build system is included in the package. Its usage is covered in the [Offline documentation](./Offline.md) - src/common: the main source code which is the basis for all models - src/\<model\>: the source code specific to one model that must replace source code found in the common directory @@ -26,25 +26,23 @@ In addition to this organisation, the package uses git branches. The main branch - main: source code without rewriting for GPU transformation (used for official Meso-NH source code) - GPU: source code adapted for GPU transformations (used for official AROME source code, starting from the 48t3 cycle) - - arome\_\<commit\>: source code ready for inclusion in the AROME compilation environment (the generation of such a branch is described in [Code preparation](#CODE-PREPARATION)) - - testprogs\_data: modified source code used to generate samples for the test programs (more on this topic in the Offline documentation) + - arome\_\<commit\>: source code ready for inclusion in the AROME compilation environment (the generation of such a branch is described in [Code preparation](#code-preparation)) + - testprogs\_data: modified source code used to generate samples for the test programs (more on this topic in the [Offline documentation](./Offline.md)) -# CODE PREPARATION +## CODE PREPARATION The source code stored in the main and GPU branches must be usable by all the models. But these models can have contradictory constraints. To bypass this difficulty, the source code is preprocessed before being included in the compilation environment of each model. -This preprocessing step can be done on the fly (in this case the preprocessing tools must be available aside of the compilation tools), or the result of the preprocessing can be stored in the PHYEX package (in this case, the proeprocessing is done once and can be used by several users). +This preprocessing step can be done on the fly (in this case the preprocessing tools must be available aside of the compilation tools), or the result of the preprocessing can be stored in the PHYEX package (in this case, the preprocessing is done once and can be used by several users). This second possibility is usefull to historize the source code really used during the model compilation and enables contributions to the PHYEX package without the need of the preprocessing tools. The preprocessed versions of the source code are put in branches named \<model\>\_\<commit\> where \<model\> is the name of the model for which the source code have been preprocessed and \<commit\> is the commit hash used as a basis. -During the initial development step, it was found easier to store the preprocessing tools outside of the PHYEX repository in the [PHYEX\_tools](https://github.com/SebastienRietteMTO/PHYEX_tools) repository. In the future, they will be moved in the PHYEX repository. +The preprocessing tools are described in the [Tools documentation](./Tools.md). -Installation and usage of the preprocessing tools are described in the PHYEX\_tools package. +## CODING NORMS -# CODING NORMS - -## File names +### File names The fortran file names use a capital F letter (eg: foo.F90) except if working a branch (mesonh\_\<commit\>) or in the folder (src/mesonh) specifci to the Meso-NH model. Names for the module: @@ -54,13 +52,13 @@ Names for the module: - modn\_ for namelist declaration - mode\_ for module containing executable source code (subroutine or function) -## When using mode\_ or modi\_? +### When using mode\_ or modi\_? When writing a new subroutine, should we put it in a module (in a mode\_ file) or should we write the subroutine in a file and write the interface bloc in another file (modi\_ file)? The answer depends on whether the routine is the 'main' routine of the parameterisation or not. If it is the 'main' routine, the interface bloc is declared apart, if not we can use a module. The idea behind is to break compilation dependency at the parameterisation level, and to isolate the interface declaration of the different routines that must be pluged in the hosting model. -## Norm +### Norm Several constraints are imposed: - The code must be written with up to 132 characters per line. @@ -100,7 +98,7 @@ Call to external subroutine in loop on horizontal or vertical dimensions must be - the subroutine use local arrays but it is called from only one place in the code: the source code of the subroutine is moved (no INCLUDE) in the CONTAINS part and the array declarations are moved in the main subroutine. - the subroutine use local arrays and is called from several places: the previous technique is not recommended. The source code is put in an include file (with the .h extension) and an extra argument is provided to the subroutine and is used as a buffer so there is no more need to declare local arrays in the called subroutine. -## Budgets +### Budgets In Meso-NH, the budget can be used in two ways: @@ -131,7 +129,7 @@ computation of delta tempo_s budget_store_add(delta tempo_s) ``` -# PULL REQUESTS +## PULL REQUESTS This section deals with the pull request procedure from the developer point of view. The integrator point of view is described in the Intergator documentation. To contribute to the PHYEX repository, developer must fork the repository, contribute on the main or on the GPU branch and send a pull request. Alternatively, a contribution on a model specific branch is also possible (especially for minor modifications). diff --git a/docs/Integrator.md b/docs/Integrator.md index 6bceda0be2d0999aed1cab4caeac9dbc743c65e3..cb1a84aeeae326f524eebcc821041a85c4c30af2 100644 --- a/docs/Integrator.md +++ b/docs/Integrator.md @@ -1,12 +1,12 @@ # PHYEX integrator documentation -# ABOUT THIS DOCUMENT +## ABOUT THIS DOCUMENT This document is intended for integrators who are in charge of assembling contributions received through pull requests. -This document is written using the markdown "language". With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). -# BRANCHES AND NORMS +## BRANCHES AND NORMS Regarding array-syntax, the applicalble norm depends on the branch: @@ -17,9 +17,9 @@ Regarding array-syntax, the applicalble norm depends on the branch: Pull requests can be received on all these kind of branches and must be merged into the main or the GPU branch with according norm. -# TESTS +## TESTS -The source code must follow strict mnh\_expand directives (described in the Developer documentation). The script verify\_mnh\_expand.py must be used to give an additional check. +The source code must follow strict mnh\_expand directives (described in the [Developer documentation](./Developer.md)). The script verify\_mnh\_expand.py must be used to give an additional check. In addition to the scientific validation, the folowing tests must give the same results (with bit-reproducibility) in each of the model: diff --git a/docs/Offline.md b/docs/Offline.md index 0c190f4d988d99e9f27dedbf6e3618f81436b685..5df0dd653e1ab5be192ff9ea357abb12e66f09a9 100644 --- a/docs/Offline.md +++ b/docs/Offline.md @@ -1,13 +1,13 @@ # OFFLINE documentation -# ABOUT THIS DOCUMENT +## ABOUT THIS DOCUMENT This document is intended for persons who want to use PHYEX in an offline mode. Some offline test programs are provided with the package and a library suitable for use with python is also available. -This document is written using the markdown "language". With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). -# COMPILATION +## COMPILATION The build/with\_fcm directory contains a build system. This build system has two dependencies (installation is done automatically by the compilation script): @@ -18,9 +18,9 @@ This build system has two dependencies (installation is done automatically by th The script build/with\_fcm/make\_fcm.sh uses a configuration file and build the library and test programs. They can be found in the build/bin sudirectory in the architecture specific directory arch\_\<achitecture name\>. -# TEST PROGRAM +## TEST PROGRAM -## Data generation +### Data generation The branch testprogs\_data contains modified source code for the AROME model to enable the generation of data samples. Using this branch, in the drivers of the different parameterisations (aro\_\* files), output can be enable for the AROME model. @@ -30,17 +30,11 @@ This must be done once by parametrisation (note that the check\_commit\_ial.sh s These files should be renamed with the folowing command: i=0; for file in ????_??_????????.dat; do mv $file `printf %08d $i`.dat; i=$((i+1)); done -## Data storage for check\_commit\_testprogs.sh - -To be usable by the check\_commit\_testprogs.sh script, these data must be put in the corresponding directory under tools/testprogs\_data - -## Usage +### Usage directly with the testprogs executables The different main\_\*.exe programs obtained by the compilation can be run. Each of these executables is expecting the presence of a 'data' directory in their working directory containing the different files. -In addition, these data files can be used through the check\_commit\_testprogs.sh script (if installed accordingly). - -# PYTHON BINDING +## PYTHON BINDING **TODO** This section must be written. Key ideas are: diff --git a/docs/PHYEX.md b/docs/PHYEX.md index 24b101e881c0dd38adaecea4b8b421f25c62eec4..0515f017ca3c3b5ec92ba2baf2ee9a4ac1f4c2ab 100644 --- a/docs/PHYEX.md +++ b/docs/PHYEX.md @@ -1,24 +1,26 @@ # PHYEX PHYsique EXternalisée -# ABOUT THIS DOCUMENT +## ABOUT THIS DOCUMENT This document is a general presentation of the PHYEX package. More specific documentation can be found: - - Developer: package organisation, how to contribute, coding norms - - Integrator: how to merge contributions - - Offline: how to compile the library and the test programs, how to use the library with python, how to use the test programs - - Plugging : how to plug the physics package in a model -This document is written using the markdown "language". With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). + - [Developer](./Developer.md): package organisation, how to contribute, coding norms + - [Integrator](./Integrator.md): how to merge contributions + - [Offline](./Offline.md): how to compile the library and the test programs, how to use the library with python, how to use the test programs + - [Plugging](./Plugging.md) : how to plug the physics package in a model + - [Tools](./Tools.md): description of the check\_commit\_\*.sh scripts (to check bit reproducibility between two commits) and of the prep\_code.sh script -# HISTORY +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). + +## HISTORY The physics was first developed for the Meso-NH model (http://mesonh.aero.obs-mip.fr/). Then, a part of the physics have been used to build the AROME model ([Seity et al, 2011](http://dx.doi.org/10.1175/2010MWR3425.1)). The last step was to extract the physics to build the independent PHYEX package. -# CONTENT +## CONTENT The folowing paramerisations are included in the PHYEX package (see the MesoNH documentation for references): - turbulence scheme diff --git a/docs/Plugging.md b/docs/Plugging.md index c863e6a63e6c93a8175957025aef7a441b64923f..79657aeb86730770741d1533ae429f711de16740 100644 --- a/docs/Plugging.md +++ b/docs/Plugging.md @@ -1,14 +1,14 @@ # PHYEX plugging documentation -# ABOUT THIS DOCUMENT +## ABOUT THIS DOCUMENT The PHYEX parameterizations can be called from the Meso-NH and AROME models, from test programs and from a driver. This document is intended for developers who want to plug in the physics in a new model or program. -This document is written using the markdown "language". With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). -# INTERFACES +## INTERFACES The folowing routines are identified as the interface of the physics: @@ -22,7 +22,7 @@ The folowing routines are identified as the interface of the physics: This interface is declared in the corresponding modi\_\* files. -# HOOKS +## HOOKS The code provided in the common directory is independent, it can be compiled and used without dependency except the [fiat package](https://github.com/ecmwf-ifs/fiat). diff --git a/docs/TODO b/docs/TODO index 2817d6232c3bbfd76d51c0ea518c66205d94c3bc..624ff395f6c03c934c22fe6fa4786da35855bebe 100644 --- a/docs/TODO +++ b/docs/TODO @@ -46,3 +46,10 @@ Budgets/DDH inutile car très peu de code semble réellement utile pour AROME Initialiser dans AROME la variable ldiag_in_run de MODD_DIAG_IN_RUN pour pouvoir phaser le modd, ou passer la variable par l'interface + +Enable mnh_expand with fcm build + +Reprendre les différents outils en deux scripts principaux: +- outil pour reprendre toutes les fonctionnalités sur le code: filepp, MNH_Expand_Array, correct_indent.py, verify_mnh_expand.py et renommage +- outil prep_code débarrassé du renommage pour ne faire que la gestion des commit et lancer la manipulation sur le code +Il restera, à part, les scripts de comparaison des résultats (à moins qu'ils puissent être placés dans les check_commit correspondant) diff --git a/docs/Tools.md b/docs/Tools.md new file mode 100644 index 0000000000000000000000000000000000000000..2f444c240dc243abc90e7b1c105f3e6d3335dcee --- /dev/null +++ b/docs/Tools.md @@ -0,0 +1,74 @@ +# TOOLS DOCUMENTATION + +## ABOUT THIS DOCUMENT + +This document is intended for persons who want to use the prep\_code.sh or the check\_commit\_\*.sh scripts. + +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). + +## INSTALLATION, PATH... + +Installation is covered in the [INSTALL documentation](../tools/INSTALL.md). + +Environment variables can be set with: + +``` +. <git repository>/tools/env.sh +``` + +## TOOLS + +### check\_commit\_ial.sh + +The check\_commit\_ial script compiles, executes IAL test cases and compare the results against a reference simulations. + +Script options can be displayed with the -h option. + +Before being usable, the AROME model must be installed following the [INSTALL\_pack\_ial documentation](../tools/INSTALL_pack\_ial.md). + +### check\_commit\_mesonh.sh + +The check\_commit\_mesonhsh script compiles, runs a test case of the Meso-NH model and compares the results against a reference simulation. + +Script options can be displayed with the -h option. + +Before being usable, the mesonh model must be installed following the [INSTALL\_pack\_mesonh documentation](../tools/INSTALL_pack_mesonh.md). + +For check\_commit\_mesonh.sh the following environment variables can be set: + + - MNHPACK: directory in which MNH pack will be created (default is $HOME/MesoNH/PHYEX) + - REFDIR: directory in which reference pack can be found (default is the pack directory near the check\_commit\_mesonh.sh file) + - TARGZDIR: directory in which the tar.gz file can be found (default is the pack directory near the check\_commit\_mesonh.sh file) + +### check\_commit\_testprogs.sh + +The check\_commit\_testprogs.sh script runs offline simulations in the directory given +by the environment variable TESTPROGSDIR ($HOME/TESTPROGS will be used if the variable is not set). +This directory must exist. + +Script options can be displayed with the -h option. + +To be usable the check\_commit\_testprogs.sh script needs input data. The generation and installation of these data are described in the [INSTALL\_testprogs documentation](../tools/INSTALL_testprogs.md). + +The goal of the script is to compare outputs between two simulations (to check if bit-reproducibilty is achieved or not). +A reference simulation must be performed and save. This reference simulation is run the same way as the +test experiment but cannot be compared to something else: +check\_commit\_testprogs.sh -c -r <reference_commit> + +If this reference simulation must become the 'absolute' reference (used when invoking the check\_commit\_testprogs.sh +script with the 'REF' argument), the reference simulation directory (under $TESTPROGSDIR) must be renamed 'ref'. + +### prep\_code.sh + +This script is used by the different check\_commit\_\* scripts and can be used directly to pre-process the source code. + The installation is described in the [INSTALL\_mnh\_expand documentation](../tools/INSTALL_mnh_expand.md) + +### others + +Other scripts are: + + - comp\_DDH.py: compare DDH outputs (used by check\_commit\_ial.sh) + - compare.py: compare MESO-NH outputs (used by check\_commit\_mesonh.sh) + - correct\_indent.py: correct source code indentation in mnh\_expand blocs + - diffNODE.001\_01: compare NODE.0001\_01 output files + - verify\_mnh\_expand.py: check syntax in mnh\_expand blocs diff --git a/tools/INSTALL b/tools/INSTALL deleted file mode 100644 index 8e988c4f20799bfecb741701d90e0edf6a2e0a71..0000000000000000000000000000000000000000 --- a/tools/INSTALL +++ /dev/null @@ -1,18 +0,0 @@ -Some installations are needed: - -1) IAL REFERENCE PACK - The check_commit_ial.sh script, by default, build a pack on top of a precompiled pack. - This precompiled pack must be build beforehand. Instructions can be found in - ** INSTALL_pack_ial ** - -2) MESONH REFERENCE PACK - The reference pack for Meso-NH must be installed. Instructions can be found in - ** INSTALL_pack_mesonh ** - -3) MNH_EXPAND - This tool is composed of two parts: the filepp software, and the MNH_Expand_Array package. - Installation is described in ** INSTALL_mnh_expand ** - -4) TESTPROGS REFERENCE DATA - The script check\_commit\_testprogs.sh needs reference data. - The data generation is explained in ** INSTALL_testprogs ** diff --git a/tools/INSTALL.md b/tools/INSTALL.md new file mode 100644 index 0000000000000000000000000000000000000000..d72e545e0d96de5134d589210a44fc9b514dab63 --- /dev/null +++ b/tools/INSTALL.md @@ -0,0 +1,27 @@ +# TOOLS INSTALLATION + +## ABOUT THIS DOCUMENT + +This document is intended for persons who want to install part or all of the tools provided with the PHYEX package. + +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). + +## INSTALLATIONS + +1. IAL REFERENCE PACK + The check\_commit\_ial.sh script, by default, build a pack on top of a precompiled pack. + This precompiled pack must be build beforehand. Instructions can be found in + [INSTALL\_pack\_ial](./INSTALL_pack_ial.md) + +2. MESONH REFERENCE PACK + The reference pack for Meso-NH must be installed. Instructions can be found in + [INSTALL\_pack\_mesonh](./INSTALL_pack_mesonh.md) + +3. MNH\_EXPAND + This tool is composed of two parts: the filepp software, and the MNH\_Expand\_Array package. + It is needed by the different check\_commit\_\*.sh scripts, depending on options used at execution. + Installation is described in [INSTALL\_mnh\_expand](./INSTALL_mnh_expand.md) + +4. TESTPROGS REFERENCE DATA + The script check\_commit\_testprogs.sh needs reference data. + The data generation is explained in [INSTALL\_testprogs](./INSTALL_testprogs.md) diff --git a/tools/INSTALL_mnh_expand b/tools/INSTALL_mnh_expand deleted file mode 100644 index 585ea4fe0161a0400fb02f706e7f468ef768a0dd..0000000000000000000000000000000000000000 --- a/tools/INSTALL_mnh_expand +++ /dev/null @@ -1,27 +0,0 @@ -Two packages must be installed: -- filepp -- MNH_Expand_Array - - -################ -filepp -################ -In the mnh_expand directory: - -wget https://www-users.york.ac.uk/~dm26/filepp/filepp-1.8.0.tar.gz -tar xvf filepp-1.8.0.tar.gz -cd filepp-1.8.0 -./configure --prefix=$PWD -make install - -Go back one directory upper and create a link: -cd .. -ln -s filepp-1.8.0 filepp - -################ -MNH_Expand_Array -################ -In the mnh_expand directory, clone the repository found at -https://github.com/JuanEscobarMunoz/MNH_Expand_Array.git - - diff --git a/tools/INSTALL_mnh_expand.md b/tools/INSTALL_mnh_expand.md new file mode 100644 index 0000000000000000000000000000000000000000..406b1f53e21d7966a5b866c9d8dc04e8b12a24b8 --- /dev/null +++ b/tools/INSTALL_mnh_expand.md @@ -0,0 +1,34 @@ +# INSTALLATION NEEDED THE prep\_code.sh script + +## ABOUT THIS DOCUMENT + +This document is intended for persons who want to use the prep\_code.sh script (directly or through a check\_commit\_\*.sh script). + +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). + +Two packages must be installed: + + - [filepp](#filepp) + - [MNH\_Expand\_Array](#mnh\_expand\_array) + +## filepp +In the \<git repository\>/tools/mnh\_expand directory: + +``` +wget https://www-users.york.ac.uk/~dm26/filepp/filepp-1.8.0.tar.gz +tar xvf filepp-1.8.0.tar.gz +cd filepp-1.8.0 +./configure --prefix=$PWD +make install +cd .. +ln -s filepp-1.8.0 filepp +``` + +## MNH\_Expand\_Array +In the \<git repository\>/tools/mnh\_expand directory, clone the MNH\_Expand\_Array repository: + +``` +git clone https://github.com/JuanEscobarMunoz/MNH_Expand_Array.git +``` + + diff --git a/tools/INSTALL_pack_ial b/tools/INSTALL_pack_ial deleted file mode 100644 index e80afc74c193e3fd381a9728a5f5f82d1bdc2e4c..0000000000000000000000000000000000000000 --- a/tools/INSTALL_pack_ial +++ /dev/null @@ -1,209 +0,0 @@ -####################################################################### -Pack creation -####################################################################### -This document describes how to build reference packs on sxphynh and belenos. -The following instructions focuse on the 'phyex' pack in which the physics -have been put in a new gmkpack project, named phyex. - -Another pack ('main') have been produced as a super-reference without code -move. Only a recompilation has been done. - -This document ends with instruction on how to use these packs. This step -is now automatically performed with the prep_code.sh script. - -In these instructions, the git package have been installed in: -sxphynh:/cnrm/phynh/data1/riette/DATA/202005_externalisation_physique -belenos:/scratch/work/riette/202005_externalisation_physique -Pathes must be adapted. - -####################################################################### -Creation on sxphynh, to be done only once and to be shared among users: -####################################################################### -version=01 - -#Get source code -getpack 48t1_main.01.MPIGFORTRAN920DBL.xfftw - -export GMKTMP=/dev/shm - -#Create main pack -(. berootpack) -gmkpack -a -r 48t1 -b phyex -n $version -l MPIGFORTRAN920DBL -o xfftw -p masterodb -h /cnrm/phynh/data1/riette/DATA/202005_externalisation_physique/pack/ - -#populate main pack with source code -cd /cnrm/phynh/data1/riette/DATA/202005_externalisation_physique/pack/48t1_phyex.${version}.MPIGFORTRAN920DBL.xfftw/src/local -wget http://anonymous:mto@webdav.cnrm.meteo.fr/public/algo/khatib/src/48t1_main.01.tgz -tar xf 48t1_main.01.tgz -rm -f 48t1_main.01.tgz -for rep in turb micro conv; do - mkdir -p phyex/$rep - mv mpa/$rep/internals/* phyex/$rep/ - mv mpa/$rep/module/* phyex/$rep/ - rmdir mpa/$rep/internals mpa/$rep/module -done -tar xf /cnrm/algo/khatib/drhook.c_for_ubuntu.tar -sed -i 's/IF (LBUDGET_RH)/IF (LBUDGET_RH .AND. KRR==7)/' mpa/micro/externals/aro_rain_ice.F90 -Édition de apl_arome.F90 pour modifier: - IF (LMFSHAL .AND. (CMF_CLOUD=='DIRE'.OR.CMF_CLOUD=='BIGA')) THEN - IOFF_MFSHAL=IOFF_MFSHAL+3 - ... - ENDIF -en: - IF (LMFSHAL .AND. (CMF_CLOUD=='DIRE'.OR.CMF_CLOUD=='BIGA')) THEN - IOFF_MFSHAL=IOFF_MFSHAL+3 - ... - ELSE - DO JLEV = 1, KLEV - ZRC_MF_(KIDIA:KFDIA,JLEV)=0._JPRB - ZRI_MF_(KIDIA:KFDIA,JLEV)=0._JPRB - ZCF_MF_(KIDIA:KFDIA,JLEV)=0._JPRB - ENDDO - ENDIF -Édition de apl_arome.F90 pour modifier: - IF ( LKFBCONV.AND.LOSUBG_COND.AND..NOT.LOSIGMAS) THEN - DO JLEV = 1, KLEV - ZMFM_(KIDIA:KFDIA,JLEV)=PSIGM(KIDIA:KFDIA,JLEV) - ENDDO - ENDIF -en: - IF (LOSUBG_COND.AND..NOT.LOSIGMAS) THEN - IF (LKFBCONV) THEN - DO JLEV = 1, KLEV - ZMFM_(KIDIA:KFDIA,JLEV)=PSIGM(KIDIA:KFDIA,JLEV) - ENDDO - ELSE - DO JLEV = 1, KLEV - ZMFM_(KIDIA:KFDIA,JLEV)=0._JPRB - ENDDO - ENDIF - ENDIF - -#Compilation -cd /cnrm/phynh/data1/riette/DATA/202005_externalisation_physique/pack/48t1_phyex.${version}.MPIGFORTRAN920DBL.xfftw -grep MPA .gmkfile/MPIGFORTRAN920DBL.GMAP | sed 's/MPA/PHYEX/g' >> .gmkfile/MPIGFORTRAN920DBL.GMAP # <-------------------- to be modified by Ryad -édition pour ajouter -DREPRO48 à la variable MACROS_FRT supprimer les corrections de bugs et assurer la reproduction avec le cy48 -édition pour retirer (ubuntu) -ftree-vectorize -sed -i 's/GMK_THREADS=1/GMK_THREADS=10/' ics_masterodb -cleanpack -f -resetpack -f -./ics_masterodb - -####################################################################### -Creation on belenos, to be done only once and to be shared among users: -####################################################################### -version=01 - -#Create main pack -(. berootpack) -gmkpack -a -r 48t1 -b phyex -n $version -l MIMPIIFC1805 -o 2y -p masterodb -h /scratch/work/riette/202005_externalisation_physique/pack/ - -#populate main pack with source code -cd /scratch/work/riette/202005_externalisation_physique/pack/48t1_phyex.${version}.MIMPIIFC1805.2y/src/local/ -ssh sxphynh.cnrm.meteo.fr "wget http://anonymous:mto@webdav.cnrm.meteo.fr/public/algo/khatib/src/48t1_main.01.tgz -O -" > 48t1_main.01.tg -tar xf 48t1_main.01.tgz -rm -f 48t1_main.01.tgz -for rep in turb micro conv; do - mkdir -p phyex/$rep - mv mpa/$rep/internals/* phyex/$rep/ - mv mpa/$rep/module/* phyex/$rep/ - rmdir mpa/$rep/internals mpa/$rep/module -done -sed -i 's/IF (LBUDGET_RH)/IF (LBUDGET_RH .AND. KRR==7)/' mpa/micro/externals/aro_rain_ice.F90 -Édition de apl_arome.F90 pour modifier: - IF (LMFSHAL .AND. (CMF_CLOUD=='DIRE'.OR.CMF_CLOUD=='BIGA')) THEN - IOFF_MFSHAL=IOFF_MFSHAL+3 - ... - ENDIF -en: - IF (LMFSHAL .AND. (CMF_CLOUD=='DIRE'.OR.CMF_CLOUD=='BIGA')) THEN - IOFF_MFSHAL=IOFF_MFSHAL+3 - ... - ELSE - DO JLEV = 1, KLEV - ZRC_MF_(KIDIA:KFDIA,JLEV)=0._JPRB - ZRI_MF_(KIDIA:KFDIA,JLEV)=0._JPRB - ZCF_MF_(KIDIA:KFDIA,JLEV)=0._JPRB - ENDDO - ENDIF -Édition de apl_arome.F90 pour modifier: - IF ( LKFBCONV.AND.LOSUBG_COND.AND..NOT.LOSIGMAS) THEN - DO JLEV = 1, KLEV - ZMFM_(KIDIA:KFDIA,JLEV)=PSIGM(KIDIA:KFDIA,JLEV) - ENDDO - ENDIF -en: - IF (LOSUBG_COND.AND..NOT.LOSIGMAS) THEN - IF (LKFBCONV) THEN - DO JLEV = 1, KLEV - ZMFM_(KIDIA:KFDIA,JLEV)=PSIGM(KIDIA:KFDIA,JLEV) - ENDDO - ELSE - DO JLEV = 1, KLEV - ZMFM_(KIDIA:KFDIA,JLEV)=0._JPRB - ENDDO - ENDIF - ENDIF - -#Compilation -cd /scratch/work/riette/202005_externalisation_physique/pack/48t1_phyex.${version}.MIMPIIFC1805.2y/ -grep MPA .gmkfile/MIMPIIFC1805.EPONA | sed 's/MPA/PHYEX/g' >> .gmkfile/MIMPIIFC1805.EPONA # <-------------------- to be modified by Ryad -édition pour ajouter -DREPRO48 à la variable MACROS_FRT supprimer les corrections de bugs et assurer la reproduction avec le cy48 -sed -i 's/GMK_THREADS=1/GMK_THREADS=10/' ics_masterodb -cleanpack -f -resetpack -f -sbatch --wait ics_masterodb - -################################### -Usage on any computer (with /cnrm): -################################### - -getpack 48t1_main.01.MPIGFORTRAN920DBL.xfftw - -commit=9ce8119430dd603d35308d8ae94cf18636157473 - -name="commit=$commit" -gmkpack -r 48t1 -b phyex -v 01 -l MPIGFORTRAN920DBL -o xfftw -p masterodb -f /cnrm/phynh/data1/riette/DATA/202005_externalisation_physique/pack/ -u PHYEX/$name - -cd $HOMEPACK/PHYEX/$name/src/local/phyex -git clone git@github.com:QuentinRodier/PHYEX.git -cd PHYEX -git checkout $commit -for rep in turb micro conv; do - mv -f src/common/$rep/* ../$rep/ - mv -f src/arome/$rep/* ../$rep/ - touch ../$rep/* -done -cd .. -rm -rf PHYEX - -cd $HOMEPACK/PHYEX/$name -sed -i 's/GMK_THREADS=1/GMK_THREADS=10/' ics_masterodb -cleanpack -f -./ics_masterodb - -#################### -Usage on any belenos -#################### - -commit=9ce8119430dd603d35308d8ae94cf18636157473 - -name="commit=$commit" -gmkpack -r 48t1 -b phyex -v 01 -l MIMPIIFC1805 -o 2y -p masterodb -f /scratch/work/riette/202005_externalisation_physique/pack/ -u PHYEX/$name - -cd $HOMEPACK/PHYEX/$name/src/local/phyex -git clone git@github.com:QuentinRodier/PHYEX.git -cd PHYEX -git checkout $commit -for rep in turb micro conv; do - mv -f src/common/$rep/* ../$rep/ - mv -f src/arome/$rep/* ../$rep/ - touch ../$rep/* -done -cd .. -rm -rf PHYEX - -cd $HOMEPACK/PHYEX/$name -sed -i 's/GMK_THREADS=1/GMK_THREADS=10/' ics_masterodb -cleanpack -f -sbatch --wait ics_masterodb - diff --git a/tools/INSTALL_pack_ial.md b/tools/INSTALL_pack_ial.md new file mode 100644 index 0000000000000000000000000000000000000000..60e553f070e584767b60f990390523182c4b0177 --- /dev/null +++ b/tools/INSTALL_pack_ial.md @@ -0,0 +1,158 @@ +# INSTALLATION NEEDED FOR AROME COMPILATION WITH PHYEX + +## ABOUT THIS DOCUMENT + +This document is intended for persons who want to compile the AROME model using the PHYEX package. +The installation described here is also needed in order to use the check\_commit\_ial.sh script which enable to check if a given commit reproduces a reference version. + +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -V geometry:landscape -s \<filename\>.md -o \<filename\>.pdf). + +This document describes how to build reference packs on sxphynh (ubuntu) and belenos. +The following instructions focuse on the 'phyex' pack in which the physics +have been put in a new gmkpack project, named phyex. + +Another pack ('main') have been produced as a super-reference without code +move. Only a recompilation has been done. + +This document ends with instruction on how to use these packs. This step +is now automatically performed with the prep\_code.sh script. + +The same installation guide applies to sxphynh and belenos except for some commands. +The directory in which the repository lies is designated by the TRUNK variable. +The $TRUNK dir can be put on a shared directory to share this installation among several users. + +## REFERENCE PACK CREATION + +### Create the pack + +``` +version=01 +compiler=MPIGFORTRAN920DBL on ubuntu, MIMPIIFC1805 on belenos +gmkfile=${compiler}.GMAP on ubuntu, ${compiler}.EPONA on belenos +option=xfftw on ubuntu, 2y on belenos +getpack 48t1_main.01.${compiler}.${option} #get source code on ubuntu, is it really necessary? +export GMKTMP=/dev/shm +(. berootpack) +gmkpack -a -r 48t1 -b phyex -n $version -l ${compiler} -o ${option} -p masterodb -h $TRUNK/tools/pack/ #create main pack +``` + +### Populate main pack with source code + +``` +cd $TRUNK/tools/pack/48t1_phyex.${version}.${compiler}.${option}/src/local +if sxphynh; then + wget http://anonymous:mto@webdav.cnrm.meteo.fr/public/algo/khatib/src/48t1_main.01.tgz #only available at MF but equivalent must exist elsewhere +else + ssh sxphynh.cnrm.meteo.fr "wget http://anonymous:mto@webdav.cnrm.meteo.fr/public/algo/khatib/src/48t1_main.01.tgz -O -" > 48t1_main.01.tgz +fi +tar xf 48t1_main.01.tgz +rm -f 48t1_main.01.tgz +for rep in turb micro conv; do + mkdir -p phyex/$rep + mv mpa/$rep/internals/* phyex/$rep/ + mv mpa/$rep/module/* phyex/$rep/ + rmdir mpa/$rep/internals mpa/$rep/module +done +tar xf /cnrm/algo/khatib/drhook.c_for_ubuntu.tar #only on ubuntu +``` + +### Apply some bug corrections + +``` +sed -i 's/IF (LBUDGET_RH)/IF (LBUDGET_RH .AND. KRR==7)/' mpa/micro/externals/aro_rain_ice.F90 +``` + +Edition of arpifs/phys\_dmn/apl\_arome.F90 to modift (line 1573): + + ``` + IF (LMFSHAL .AND. (CMF_CLOUD=='DIRE'.OR.CMF_CLOUD=='BIGA')) THEN + IOFF_MFSHAL=IOFF_MFSHAL+3 + ... + ENDIF + ``` + +into: + + ``` + IF (LMFSHAL .AND. (CMF_CLOUD=='DIRE'.OR.CMF_CLOUD=='BIGA')) THEN + IOFF_MFSHAL=IOFF_MFSHAL+3 + ... + ELSE + DO JLEV = 1, KLEV + ZRC_MF_(KIDIA:KFDIA,JLEV)=0._JPRB + ZRI_MF_(KIDIA:KFDIA,JLEV)=0._JPRB + ZCF_MF_(KIDIA:KFDIA,JLEV)=0._JPRB + ENDDO + ENDIF + ``` + +Edition of apl\_arome.F90 to modify (line 1406): + + ``` + IF ( LKFBCONV.AND.LOSUBG_COND.AND..NOT.LOSIGMAS) THEN + DO JLEV = 1, KLEV + ZMFM_(KIDIA:KFDIA,JLEV)=PSIGM(KIDIA:KFDIA,JLEV) + ENDDO + ENDIF + ``` + +into: + + ``` + IF (LOSUBG_COND.AND..NOT.LOSIGMAS) THEN + IF (LKFBCONV) THEN + DO JLEV = 1, KLEV + ZMFM_(KIDIA:KFDIA,JLEV)=PSIGM(KIDIA:KFDIA,JLEV) + ENDDO + ELSE + DO JLEV = 1, KLEV + ZMFM_(KIDIA:KFDIA,JLEV)=0._JPRB + ENDDO + ENDIF + ENDIF + ``` + +### Compilation + +``` +cd $TRUNK/tools/pack/48t1_phyex.${version}.${compiler}.${option} +#Not needed anymore: grep MPA .gmkfile/${compiler}.GMAP | sed 's/MPA/PHYEX/g' >> .gmkfile/${gmkfile} +Edition of .gmkfile/${gmkfile} to add -DREPRO48 to the MACROS_FRT variable in order to suppress bug corrections and be able to reproduce the original cy48 +#Not needed anymore: Edition of .gmkfile/${gmkfile} to suppress on ubuntu -ftree-vectorize +sed -i 's/GMK_THREADS=1/GMK_THREADS=10/' ics_masterodb +cleanpack -f +resetpack -f +./ics_masterodb +``` + +## USER\'S PACK CREATION + +``` +version=01 +compiler=MPIGFORTRAN920DBL on ubuntu, MIMPIIFC1805 on belenos +gmkfile=${compiler}.GMAP on ubuntu, ${compiler}.EPONA on belenos +option=xfftw on ubuntu, 2y on belenos +getpack 48t1_main.01.${compiler}.${option} #get source code on ubuntu, is it really necessary? + +commit=9ce8119430dd603d35308d8ae94cf18636157473 #exemple of commit to test against the reference pack + +gmkpack -r 48t1 -b phyex -v ${version} -l ${compiler} -o ${option} -p masterodb -f $TRUNK/tools/pack/ -u PHYEX/$commit + +cd $HOMEPACK/PHYEX/$commit/src/local/phyex +git clone git@github.com:QuentinRodier/PHYEX.git +cd PHYEX +git checkout $commit +#The exact manipulation to perform depends on the commit to test. For a full description, please see the check\_commit\_ial.sh script +for rep in turb micro conv; do + mv -f src/common/$rep/* ../$rep/ + mv -f src/arome/$rep/* ../$rep/ + touch ../$rep/* +done +cd .. +rm -rf PHYEX + +cd $HOMEPACK/PHYEX/$commit +sed -i 's/GMK_THREADS=1/GMK_THREADS=10/' ics_masterodb +cleanpack -f +./ics_masterodb +``` diff --git a/tools/INSTALL_pack_mesonh b/tools/INSTALL_pack_mesonh deleted file mode 100644 index bfe6651c5096f111e471777c3ecb36ffa0d9ea88..0000000000000000000000000000000000000000 --- a/tools/INSTALL_pack_mesonh +++ /dev/null @@ -1,28 +0,0 @@ - -1) Compilation de la master -Il faut installer dans le répertoire pack une version de mesonh officielle: -cd <git repository>/pack -scp sxphynh.cnrm.meteo.fr:/home/rodierq/MNH-V5-5-0.tar.gz . -tar xvfz MNH-V5-5-0.tar.gz -cd MNH-V5-5-0/src -./configure -. ../conf/profile_mesonh-* -make -j 8 -make installmaster - -2) Lancer les étapes de pré-processing au moins une fois en master sur le KTEST : -cd ../MY_RUN/KTEST/007_16janvier -# J'ai modifié la namelists du cas pour activer plus d'option, récupérer le nouveau dossier de run : -rm -Rf 008_run2; scp -r sxphynh.cnrm.meteo.fr:/home/rodierq/MNH-V5-5-0/MY_RUN/KTEST/007_16janvier/008_run2 . -make clean -make #l'étape 10 ne se déroule sans erreur que si un display (X11) est disponible - #après l'erreur, les étapes suivantes peuvent être lancées par "make E011_ncl E012_spectre" - -3) Récupérer le pack modifie pour accueillir PHYEX (essentiellement le makefile modifié et le répertoire PHYEX créé) -cd <git repository>/pack -scp sxphynh.cnrm.meteo.fr:/home/rodierq/MNH-V5-5-0_PHYEX.tar.gz . - -4) Certains commits ne reproduisent pas le commit de référence. En attendant la résolution du problème ces - commits sont contrôlés par rapport au b1e20 mais ce commit n'est pas compilable directement. Pour le - compiler, il faut inverser l'ordre des arguments d'appel des fonctions DZM_MF, MZM_MF, GZ_M_W_MF - dans les sources compute_bl89_ml, tridiag_massflux.f90 et shuman_mf.f90 diff --git a/tools/INSTALL_pack_mesonh.md b/tools/INSTALL_pack_mesonh.md new file mode 100644 index 0000000000000000000000000000000000000000..50da84d8a177fd4f9922545cc3cb116a2e6176b7 --- /dev/null +++ b/tools/INSTALL_pack_mesonh.md @@ -0,0 +1,57 @@ +# INSTALLATION NEEDED FOR MESONH COMPILATION WITH PHYEX + +## ABOUT THIS DOCUMENT + +This document is intended for persons who want to compile the MESONH model using the PHYEX package. +The installation described here is also needed in order to use the check\_commit\_mesonh.sh script which enable to check if a given commit reproduces a reference version. + +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -V geometry:landscape -s \<filename\>.md -o \<filename\>.pdf). + +The directory in which the repository lies is designated by the TRUNK variable. +The $TRUNK dir can be put on a shared directory to share this installation among several users. + +## COMPILATION OF THE MASTER + +An official version of Meso-Nh is installed in the pack directory: + +``` +cd $TRUNK/tools/pack +scp sxphynh.cnrm.meteo.fr:/home/rodierq/MNH-V5-5-0.tar.gz . #For MF users, can be retrieve on the Meso-NH website +tar xvfz MNH-V5-5-0.tar.gz +cd MNH-V5-5-0/src +./configure +. ../conf/profile_mesonh-* +make -j 8 +make installmaster +``` + +## PREPROCESSING STEPS FOR THE TEST CASE + +The preprocessing steps must be done at least once on the master pack: + +``` +cd ../MY_RUN/KTEST/007_16janvier +#The official namelist can be modified to enable more options +rm -Rf 008_run2; scp -r sxphynh.cnrm.meteo.fr:/home/rodierq/MNH-V5-5-0/MY_RUN/KTEST/007_16janvier/008_run2 . + +make clean +make #the step #10 succeed only if a isplay (X11) is available + #after the error, the next steps can be executed by "make E011_ncl E012_spectre" +``` + +## GET A MODIFIED PACK SUITABLE FOR PHYEX + +The master pack cannot be used directly to compile Meso-NH using PHYEX, the Makefile must be modified +``` +cd $TRUNK/pack +scp sxphynh.cnrm.meteo.fr:/home/rodierq/MNH-V5-5-0_PHYEX.tar.gz . +``` + +## MESONH COMPILATION WITH PHYEX + +To compile MESONH using the PHYEX package, some manipulation is needed. +The easiest way is to use the check\_commit\_mesonh.sh script. + +## COMPARISON OF SOME COMMITS +Some commits doesn't reproduce the reference commit but are comparable to the b1e20 commit. +If someone is interested in compiling this commit, the argument order of the functions DZM\_MF, MZM\_MF, GZ\_M\_W\_MF must be reversed in compute\_bl89\_ml, tridiag\_massflux.f90 and shuman\_mf.f90 diff --git a/tools/INSTALL_testprogs b/tools/INSTALL_testprogs deleted file mode 100644 index eed314f13a5e3376d7d350e78236d9e432fd52db..0000000000000000000000000000000000000000 --- a/tools/INSTALL_testprogs +++ /dev/null @@ -1,15 +0,0 @@ -The testprogs_data directory must be filled by reference data. -These data are generated according to the description provided in the Offline documentation. - -The check_commit_testprogs.sh script will run offline simulations in the directory given -by the environment variable TESTPROGSDIR ($HOME/TESTPROGS will be used if the variable is not set). -This directory must exist. - -The goal of the script is to compare outputs between two simulations (to check if bit-reproducibilty -is achieved or not). -A reference simulation must be performed and save. This reference simulation is run the same way as the -test experiment but cannot be compared to something else: -check_commit_testprogs.sh -c -r <reference_commit> - -If this reference simulation must become the 'absolute' reference (used when invoking the check_commit_testprogs.sh -script with the 'REF' argument), the reference simulation directory (under $TESTPROGSDIR) must be renamed 'ref'. diff --git a/tools/INSTALL_testprogs.md b/tools/INSTALL_testprogs.md new file mode 100644 index 0000000000000000000000000000000000000000..6429882e255ff00c15ec28bbea218a81824692cf --- /dev/null +++ b/tools/INSTALL_testprogs.md @@ -0,0 +1,17 @@ +# INSTALLATION NEEDED FOR THE TEST PROGRAMS + +## ABOUT THIS DOCUMENT + +This document is intended for persons who want to use the testprogs programs. +These programs need data. This document describes how to generate the data, the the programs can be used directly or through the check\_commit\_testprogs.sh script. + +This document is written using the markdown language. With pandoc, it can be converted to HTML (pandoc -s \<filename\>.md -o \<filename\>.html) or PDF (pandoc -s \<filename\>.md -o \<filename\>.pdf). + + +## DATA GENERATION + +Please, refer to the [Offline](../docs/Offline.md) documentation. + +## DATA INSTALLATION + +Once produced, the data must be put in the corresponding directories under tools/testprogs\_data. diff --git a/tools/README.md b/tools/README.md deleted file mode 100644 index 55c75db8985e0736bd90ae41cd1bfd19126e47ac..0000000000000000000000000000000000000000 --- a/tools/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# PHYEX\_tools - -This package contains tools related to the PHYEX package (https://github.com/QuentinRodier/PHYEX). -Specifically, the prep\_code.sh scripts prepare the source code for inclusion in the compilation machinery -of the different models. - -And, the check\_commit\_ial.sh script compiles, executes IAL test cases and compares the results againts a reference simulation. - -Moreover, the check\_commit\_mesonh.sh script compiles, executes a test case and compares the results againts a reference simulation. - -The check\_commit\_testprogs.sh does the same for the offline test programs. - -verify\_mnh\_expand.py checks the conformace of the code regarding mnh\_expand directives. - -## Installation - -Instructions can be found in INSTALL file. - -## Usage - -Help on check\_commit\_ial.sh, check\_commit\_mesonh.sh, check\_commit\_testprogs.sh, -verify\_mnh\_expand.py and prep\_code.sh can be printed with the '-h' option. - -For check\_commit\_mesonh.sh the following environment variables can be set: -* MNHPACK: directory in which MNH pack will be created (default is $HOME/MesoNH/PHYEX) -* REFDIR: directory in which reference pack can be found (default is the pack directory near the check\_commit\_mesonh.sh file) -* TARGZDIR: directory in which the tar.gz file can be found (default is the pack directory near the check\_commit\_mesonh.sh file) diff --git a/tools/check_commit_ial.sh b/tools/check_commit_ial.sh index 193dd313e2a2880f6ae3cc440f9971661c8a70a6..65f286a7107f85c386483112847f39eead333e91 100755 --- a/tools/check_commit_ial.sh +++ b/tools/check_commit_ial.sh @@ -245,7 +245,8 @@ if [ $compilation -eq 1 ]; then fi else echo "Copy $fromdir" - scp -q -r $fromdir PHYEX + mkdir PHYEX + scp -q -r $fromdir/src PHYEX/ $prep_code $expand_options $subs -m arome PHYEX fi find PHYEX -type f -exec touch {} \; #to be sure a recompilation occurs diff --git a/tools/check_commit_mesonh.sh b/tools/check_commit_mesonh.sh index fc995dab341dde6226ef48735c395cdcb20573e3..0b1d7287ebce24f8b1f41127f5f1e9e06f2415b3 100755 --- a/tools/check_commit_mesonh.sh +++ b/tools/check_commit_mesonh.sh @@ -179,7 +179,8 @@ if [ $compilation -eq 1 ]; then fi else echo "Copy $fromdir" - scp -q -r $fromdir PHYEX + mkdir PHYEX + scp -q -r $fromdir/src PHYEX/ $prep_code --renameFf $expand_options $subs -m mesonh PHYEX fi rm -rf PHYEX/.git diff --git a/tools/check_commit_testprogs.sh b/tools/check_commit_testprogs.sh index 16a70e2bd970041372894a1f224096969dedf245..ceb4b57e753d6914d040cdd251a1169569a705f6 100755 --- a/tools/check_commit_testprogs.sh +++ b/tools/check_commit_testprogs.sh @@ -176,7 +176,9 @@ if [ $compilation -eq 1 ]; then $prep_code -c $commit $expand_options $subs src else echo "Copy $fromdir" - scp -q -r $fromdir src + mkdir src + scp -q -r $fromdir/src src/ + scp -q -r $fromdir/build src/ $prep_code $expand_options $subs src fi diff --git a/tools/prep_code.sh b/tools/prep_code.sh index 1e7672b58be4f333aa8823cfa5f849a8fbdd60d8..9d069e009aae06ade6afd0e2bc00bc9ba29d6110 100755 --- a/tools/prep_code.sh +++ b/tools/prep_code.sh @@ -160,7 +160,7 @@ if [ -n "${model-}" ]; then #Cleaning [ $verbose -gt 0 ] && echo "Cleaning unrelevant files" #multiple checks to prevent error - if [ $from == 'git' -a ! $(git config --get remote.origin.url) == "$repository" ]; then + if [ $from == 'git' -a ! "$(git config --get remote.origin.url)" == "$repository" ]; then echo "Not inside the right git!!!!!!!!!!!!!!!!" exit 8 fi