Commit 03a16503 authored by HOURDIN Christophe's avatar HOURDIN Christophe
Browse files

sync can11sen2 (Senegal - P Chabert) with ASAP2020 (South Africa -S. Pous) config

parent 3184b62a
#-------------------------------------------------------------------------------
# Croco
#-------------------------------------------------------------------------------
export CROCO="${WORKDIRS}/Locean_croco_pisces/croco_v1.00"
alias croco="cd ${CROCO}"
export OCEAN="${CROCO}/OCEAN"
alias ocean="cd ${OCEAN}"
export PISCES="${CROCO}/PISCES"
alias pisces="cd ${PISCES}"
......@@ -5,12 +5,29 @@
11/11/2020 : Version croco + agrif + pisces
philosophie:
Mode production OU mode test (à utiliser pour tunner avant la production)
MODE_TEST=true
On peut compiler et exectuer autant de tests que l'on veut en même temps en
mettant une extension TEST_NAME dans namelist_exp.sh... ca créera autant de
scratch_dir que de tests.
Le mode test tourne sur 1 job seulemnent. Pas de calendrier de re soumission.
MODE_TEST=false => production de l'expérience.
Le mode production tourne sur tous les jobs de l'exp
Une exp doit se faire avec le même croco.exe ou nemo.exe et les mêmes inputs.
=> test a la submission que scripts param et compile sont identiques au premier job sinon stop!
Une fois la production lancée, ne plus toucher les répertoires ascii, sinon test qui bloquera le job suivant.
Garant que toute l'exp s'est fait dans les mêmes conditions
Si on veut faire des modifs, on copie l'exxp et on fait des séries de test avec l'option MODE_TEST
Si on veut quand même faire des modifs en cours d'exp, on force la re soumission et une trace du changement est gardée dans jobs
...trace dans exp_ascii_dir_img_10010101/
debug few times ... pour développement des scripts
Option de tests
......@@ -7,5 +7,11 @@
! [ -d $2 ] && mkdir -p $2
rsync -a $1/scripts $2
rsync -a $1/param_inputs $2
rsync -a $1/compile $2
mkdir $2/compile
rsync -a $1/compile/croco $2/compile
rsync -a $1/bin $2
rsync -a $1/archives $2
rsync -a $1/README.txt $2
rsync -a $1/INSTALL.txt $2
rsync -a $1/.git $2
mkdir $2/jobs
......@@ -44,8 +44,10 @@ compile/nemo/MY_SRC \
compile/nemo/nemo.exe"
files_compile_croco="\
compile/croco/MY_SRC \
compile/croco/MY_SRC"
compile/croco/cppdefs.h \
compile/croco/param.h \
compile/croco/jobcomp \
compile/croco/croco"
......@@ -85,48 +87,47 @@ if ${USE_OCE_1} && ${USE_OCE_2} ; then
fi
done
if false ; then
eval "files_compile=\${files_compile_${MODEL}}"
printf "\n\n================================================================================\n"
printf " OCEAN (${MODEL} compile) : diff %9s / %9s\n" $1 $2
printf "================================================================================\n"
for file in ${files_compile} ; do
diff -b -w -r -x *.swp $1/${file} $2/${file} > ~/tmp_diff 2>&1
if [ -s ~/tmp_diff ] ; then
printf "\n--------------------------------------------------------------------------------\n"
printf " ${file}"
printf "\n--------------------------------------------------------------------------------\n"
printf " diff -b -w -r $1/${file} $2/${file}\n"
cat ~/tmp_diff
rm -f ~/tmp_diff
else
printf "\n--------------------------------------------------------------------------------\n"
printf " ${file} : same files"
printf "\n--------------------------------------------------------------------------------\n"
fi
done
printf "\n\n================================================================================\n"
printf " OCEAN (xios param) : diff %9s / %9s\n" $1 $2
printf "================================================================================\n"
for file in ${files_xios} ; do
diff -b -w -r -x *.swp $1/${file} $2/${file} > ~/tmp_diff 2>&1
if [ -s ~/tmp_diff ] ; then
printf "\n--------------------------------------------------------------------------------\n"
printf " ${file}"
printf "\n--------------------------------------------------------------------------------\n"
printf " diff -b -w -r $1/${file} $2/${file}\n"
cat ~/tmp_diff
rm -f ~/tmp_diff
else
printf "\n--------------------------------------------------------------------------------\n"
printf " ${file} : same files"
printf "\n--------------------------------------------------------------------------------\n"
fi
done
fi
diff -b -w -r -x *.swp $1/compile/${MODEL} $2/compile/${MODEL}
# for file in ${files_compile} ; do
# diff -b -w -r -x *.swp $1/${file} $2/${file} > ~/tmp_diff 2>&1
# if [ -s ~/tmp_diff ] ; then
# printf "\n--------------------------------------------------------------------------------\n"
# printf " ${file}"
# printf "\n--------------------------------------------------------------------------------\n"
# printf " diff -b -w -r $1/${file} $2/${file}\n"
# cat ~/tmp_diff
# rm -f ~/tmp_diff
# else
# printf "\n--------------------------------------------------------------------------------\n"
# printf " ${file} : same files"
# printf "\n--------------------------------------------------------------------------------\n"
# fi
# done
# printf "\n\n================================================================================\n"
# printf " OCEAN (xios param) : diff %9s / %9s\n" $1 $2
# printf "================================================================================\n"
# for file in ${files_xios} ; do
# diff -b -w -r -x *.swp $1/${file} $2/${file} > ~/tmp_diff 2>&1
# if [ -s ~/tmp_diff ] ; then
# printf "\n--------------------------------------------------------------------------------\n"
# printf " ${file}"
# printf "\n--------------------------------------------------------------------------------\n"
# printf " diff -b -w -r $1/${file} $2/${file}\n"
# cat ~/tmp_diff
# rm -f ~/tmp_diff
# else
# printf "\n--------------------------------------------------------------------------------\n"
# printf " ${file} : same files"
# printf "\n--------------------------------------------------------------------------------\n"
# fi
# done
else
printf "\n\n================================================================================\n"
......
#!/bin/sh -x
printf "\n\n================================================================================\n"
printf "===== rename $1 $2 =====\n"
printf "================================================================================\n"
mv ${EXPDIR}/${EXPER}/jobs/$1 ${EXPDIR}/${EXPER}/jobs/$2
mv ${EXEDIR}/$1 ${EXEDIR}/$2
mv ${OUTDIR}/$1 ${OUTDIR}/$2
rst1=`echo $1 | cut -c 10-`
rst2=`echo $2 | cut -c 10-`
mv ${RSTDIR}/${rst1} ${RSTDIR}/${rst2}
#!/bin/sh -x
printf "\n\n================================================================================\n"
printf "===== remove $1 =====\n"
printf "================================================================================\n"
rm -rf ${EXPDIR}/${EXPER}/jobs/$1
rm -rf ${EXEDIR}/$1
rm -rf ${OUTDIR}/$1
rst1=`echo $1 | cut -c 10-`
rm -rf ${RSTDIR}/${rst1}
This diff is collapsed.
This diff is collapsed.
......@@ -109,7 +109,7 @@
# define CURVGRID
# define SPHERICAL
# define MASKING
# define WET_DRY
# define WET_DRY
# define NEW_S_COORD
/* Model dynamics */
# define SOLVE3D
......@@ -188,7 +188,7 @@
# define QCORRECTION
# define SFLX_CORR
# undef SFLX_CORR_COEF
# define ANA_DIURNAL_SW
# undef ANA_DIURNAL_SW
# endif
# undef SMFLUX_CFB
# undef SEA_ICE_NOFLUX
......@@ -325,7 +325,7 @@
# ifdef PISCES
# undef DIURNAL_INPUT_SRFLX
# define key_pisces
# undef key_ligand
# define key_ligand
# endif
# ifdef BIO_NChlPZD
# define OXYGEN
......
......@@ -63,7 +63,7 @@
# undef NBQ
/* Nesting */
# undef AGRIF
# undef AGRIF_2WAY
# define AGRIF_2WAY
/* OA and OW Coupling via OASIS (MPI) */
# undef OA_COUPLING
# undef OW_COUPLING
......@@ -109,7 +109,7 @@
# define CURVGRID
# define SPHERICAL
# define MASKING
# define WET_DRY
# define WET_DRY
# define NEW_S_COORD
/* Model dynamics */
# define SOLVE3D
......@@ -188,7 +188,7 @@
# define QCORRECTION
# define SFLX_CORR
# undef SFLX_CORR_COEF
# define ANA_DIURNAL_SW
# undef ANA_DIURNAL_SW
# endif
# undef SMFLUX_CFB
# undef SEA_ICE_NOFLUX
......@@ -325,7 +325,7 @@
# ifdef PISCES
# undef DIURNAL_INPUT_SRFLX
# define key_pisces
# undef key_ligand
# define key_ligand
# endif
# ifdef BIO_NChlPZD
# define OXYGEN
......
......@@ -698,7 +698,7 @@
======================================================================
*/
#if defined LMD_SKPP
# define LMD_SKPP2005
# undef LMD_SKPP2005
#endif
#ifdef LMD_BKPP
# undef LMD_BKPP2005 /*<- unresolved problems with bkpp2005 at depth
......
! $Id: cross_matrix.F 1458 2014-02-03 15:01:25Z gcambon $
!
!======================================================================
! CROCO is a branch of ROMS developped at IRD and INRIA, in France
! The two other branches from UCLA (Shchepetkin et al)
! and Rutgers University (Arango et al) are under MIT/X style license.
! CROCO specific routines (nesting) are under CeCILL-C license.
!
! CROCO website : http://www.croco-ocean.org
!======================================================================
!
! This is "cross_matrix": analyzer of dependencies to build
! table of dependencies "Make.depend"
!------------------------------------------------------------------
! Usage:
!-------- cross_matrix list_of_files
! for example
! cross_matrix *.F
! or
! cross_matrix *.F *.h
! or
! cross_matrix $(SRCS) inside a makefile
!
! Algorithm:
!-----------
! cross_matrix reads all files from the list arguments it is given,
! and searches for the CPP command #include. If #include commands
! are found, in interprets names within the "..." as new files to be
! open and searched for #include inside it and so on.
!
! cross_matrix investigates chained include statements, for example,
! if file1 contains statement #include "file2", and file2 contains
! statement #include "file3", therefore file3 will be included into
! list of dependencies of "file1"
!
! Optionally, files which are not in the list of arguments AND
! which are not in the present working directory can be excluded
! from the list of dependencies (CPP switch EXCLUDE). A warning
! message will be issued about each file excluded from analysis.
!
#define EXCLUDE
implicit none
integer max_name_size, max_names, max_string_size, input,iout
parameter (max_name_size=62, max_names=956, max_string_size=300,
& input=11, iout=12)
character*300 fname(max_names)
logical ismodule(max_names,max_names)
character*300 modname
character*4 sufname
character string*300, quote*1, double_quote*1, backslash*1
integer nsize(max_names), size, lines, nmax, n_disc, n_excl,
& last_arg, iargc, iocheck, i,j,k,n,
& my_iostat
logical matrix(max_names,max_names), new_name, not_end_of_file
character ctoupper,tab
tab=char(9)
last_arg=iargc()
if (last_arg.eq.0) then
write(*,*) 'ERROR IN cross_matrix: NO FILE NAMES ARE GIVEN'
stop
endif
ismodule(:,:)=.false.
write(*,'(/1x,A,1x,A/)') 'This is CROSS_MATRIX: Creating',
& 'new version of Make.depend.'
quote=char(39) !
double_quote=char(34) ! Reset everything:
backslash=char(92) !
lines=0 ! <-- line counter all files altogether
n_disc=0 ! <-- counter of newly discovered files
n_excl=0 ! <-- counter of excluded files
do j=1,max_names !
nsize(j)=0 ! <-- array of sizes of filenames
do i=1,max_name_size !
fname(j)(i:i)=' ' ! <-- character array of filenames
enddo !
do i=1,max_names !
matrix(i,j)=.false. ! <-- matrix of dependencies:
enddo !
enddo ! Note: matrix(i,j)=.eq..true. means
! that file j depends on i.
do n=1,last_arg
call getarg(n,fname(n))
i=max_name_size+1
1 i=i-1
if (fname(n)(i:i).eq.' ' .and. i.gt.1) goto 1
nsize(n)=i
enddo
nmax=last_arg
open(unit=iout, file='Make.depend', form='formatted')
write(iout,'(3(A,1x,A/),A/A/A/A/A/A)')
& '# Make.depend: list of dependencies generated by',
& 'cross_matrix.', '# WARNING: THIS IS A MACHINE',
& 'GENERATED FILE: DO NOT EDIT !!!!!', '# To create',
& 'or update this file use commands:', '#',
& '# cross_matrix *.F', '# or',
& '# cross_matrix *.F *.h', '# or',
& '# make depend'
n=0
2 n=n+1
not_end_of_file=.true.
IF (n.GT.nmax) GOTO 29
IF (fname(n)(nsize(n)-3:nsize(n)).EQ.'.mod') goto 2
open(unit=input, file=fname(n), form='formatted',
& status='old', err=3)
goto 4
3 continue
#ifdef EXCLUDE
n_excl=n_excl+1
write(iout,'(A/A,2x,A/A)') '#',
& '# WARNING: File is not found:',fname(n)(1:nsize(n)),
& '# This file is excluded from the dependency list.'
do i=1,nsize(n)
fname(n)(i:i)=' '
enddo
nsize(n)=0
goto 2
#endif
4 string(1:1)=' '
read(input,'(A)',iostat=iocheck,end=5) string
lines=lines+1
if (iocheck.eq.0 .and. string(1:1).ne.'#') goto 19
goto 6 ! Search for word include,
5 not_end_of_file=.false. ! then search for double
6 i=2 ! quotation marks, then
7 if (string(i:i).ne.'i') then ! read portion of the
i=i+1 ! string between "..."s.
if (i.lt.max_string_size) goto 7
elseif (string(i:i+6) .eq. 'include') then
i=i+7
8 if (string(i:i).eq.double_quote) then
j=i+2
9 if (string(j:j).eq.double_quote) then
size=j-i-1 ! Presume that the newly
new_name=.true. ! encountered name does
do k=1,nmax ! not exist in catalog.
if (size .eq. nsize(k)) then
if (string(i+1:j-1) .eq. fname(k)(1:size)) then
new_name=.false. !
matrix(k,n)=.true. ! Then test the new name
endif ! against those already in
endif ! catalog. If matches were
enddo ! found, reject it as a
if (new_name) then ! new name and make entry
n_disc=n_disc+1 ! in dependency in matrix.
nmax=nmax+1 ! Record the new name and
matrix(nmax,n)=.true. ! its size into catalog,
nsize(nmax)=size ! if it was not rejected.
fname(nmax)(1:size)=string(i+1:j-1)
do i=size+1,max_name_size
fname(nmax)(i:i)=' '
enddo
endif
elseif (j.lt.max_string_size) then
j=j+1
goto 9
endif
elseif (i.lt.max_string_size) then
i=i+1
goto 8
endif
endif
19 continue
if (iocheck.eq.0 .and.
& ((string(1:1).ne.' ').AND.
& (string(1:1).ne.tab))) goto 4
i=2
17 if ((string(i:i).eq.' ').OR.(string(i:i).eq.tab)) then
i=i+1
if (i.lt.max_string_size) goto 17
elseif ((string(i:i+3) .eq. 'USE ').or.
& (string(i:i+3) .eq. 'use ')) then
sufname=string(i:i+3)
i=i+4
j=i
18 j=j+1
if ((string(j:j).EQ.' ').or.(string(j:j).EQ.tab)) then
j=j-1
size=j-i+1
do k=1,size
! modname(k:k)=ctoupper(string(i+k-1:i+k-1))
modname(k:k)=string(i+k-1:i+k-1)
end do
modname(size+1:size+4)='.F90'
size=size+4
open(unit=125, file=modname(1:size), form='formatted',
& status='old', iostat=my_iostat)
close(125)
if(my_iostat /= 0) then
size=size-4
modname(size+1:size+2)='.F'
size=size+2
endif
new_name=.true. ! encountered name does
do k=1,nmax ! not exist in catalog.
if (size .eq. nsize(k)) then
if (modname(1:size) .eq. fname(k)(1:size)) then
new_name=.false. !
matrix(k,n)=.true. ! Then test the new name
ismodule(k,n)=.true.
endif ! against those already in
endif ! catalog. If matches were
enddo ! found, reject it as a
if (new_name) then ! new name and make entry
n_disc=n_disc+1 ! in dependency in matrix.
nmax=nmax+1 ! Record the new name and
matrix(nmax,n)=.true. ! its size into catalog,
nsize(nmax)=size ! if it was not rejected.
fname(nmax)(1:size)=modname(1:size)
ismodule(nmax,n)=.true.
do i=size+1,max_name_size
fname(nmax)(i:i)=' '
enddo
endif
elseif (j.lt.max_string_size) then
goto 18
end if
end if
if (not_end_of_file) goto 4
close (unit=input)
if (n.lt.nmax) goto 2
29 continue
i=0 ! Investigate possible secondary
10 do n=1,nmax ! dependencies. This is equivalent
do k=1,nmax ! to operation of logical addition:
if (matrix(k,n)) then !
do j=1,nmax ! if
if (matrix(j,k)) then ! file1 depends on file2
matrix(j,n)=.true.
if (ismodule(j,k)) ismodule(j,n)=.true.
endif
! and
enddo ! file2 depends on file3
endif ! then
enddo ! file1 depends on file3
enddo !
j=0 ! This is an iterative
do n=1,nmax ! procedure, since staged
do k=1,nmax ! include statements are
if (matrix(k,n)) j=j+1 ! possible. The number of .true.
enddo ! elements in the matrix grows
enddo ! when new dependencies are
if (i.ne.j) then ! discovered. The procedure
i=j ! repeats itself until the next
goto 10 ! iteration does not discover
endif ! any new dependencies.
!
! Report statistics of the files:
!
write(iout,'(A/A,5x,I4/A/A,18x,I4/A/A,1x,I4)') '#',
& '# Number of files given for dependency analysis:', last_arg,
& '#', '# Number of newly discovered files:', n_disc, '#',
& '# Number of files excluded from dependency analysis:',n_excl
write(iout,'(A/A,3x,I4/A/A,9x,I6/A)') '#',
& '# Total number of files analyzed for dependencies:', nmax,
& '#', '# Total number of code lines in all files:', lines, '#'
!
! Generate list of dependencies. Two styles are supported, both
! work just fine. If XCOMM_FORMAT is defined, the style of the list
! is similar to that of makefiles generated by imake utility
! recommended by $XConsortium. In this case the target file name
! and the column separator ':' are repeated in all lines which
! correspond to the target dependencies, and its name is also
! repeated one time more wit no characters after ':'.
! If XCOMM_FORMAT is NOT defined, the target file name and the
! column separator ':' are not repeated, while backslach symbol is
! used in the end of each line, if the line needs to be continued
! on the next line.
do n=1,last_arg !!! nmax
if (nsize(n).gt.0) then
#define XCOMM_FORMAT
#ifdef XCOMM_FORMAT
write(iout,'(A1)') '#'
k=0
11 i=nsize(n)
string(1:i)=fname(n)(1:i)
if (string(i-1:i).eq.'.F') string(i:i)='o'
if (string(i-3:i).eq.'.F90') string(i-2:i)='o'
i=i+1
string(i:i)=':'
12 i=i+1
string(i:i)=' '
if (k.eq.0) then
if (fname(n)(nsize(n)-1:nsize(n)).eq.'.F') then
string(i+1:i+nsize(n))=fname(n)(1:nsize(n))
i=i+nsize(n)+1
string(i:i)=' '
endif
if (fname(n)(nsize(n)-3:nsize(n)).eq.'.F90') then
string(i+1:i+nsize(n))=fname(n)(1:nsize(n))
i=i+nsize(n)+1
string(i:i)=' '
endif
endif
13 k=k+1
if (matrix(k,n)) then
if (i+nsize(k).lt.max_string_size) then
string(i+1:i+nsize(k))=fname(k)(1:nsize(k))
if(ismodule(k,n))then
if(string(i+nsize(k)-1:i+nsize(k)).eq.'.F') then
string(i+nsize(k)-1:i+nsize(k))= '.o'
endif
if(string(i+nsize(k)-3:i+nsize(k)).eq.'.F90') then
string(i+nsize(k)-3:i+nsize(k))='.o '
endif
endif
i=i+nsize(k)
goto 12