Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Showing
with 376 additions and 416 deletions
......@@ -59,46 +59,46 @@
!------------------------------------ -1th-order basis !
select case (ndof)
case (+1)
bfun(1) = sval**1 / 1.e0
bfun(1) = sval**1 / 1.e0_8
case (+2)
bfun(1) = sval**1 / 1.e0
bfun(2) = sval**2 / 2.e0
bfun(1) = sval**1 / 1.e0_8
bfun(2) = sval**2 / 2.e0_8
case (+3)
bfun(1) = sval**1 / 1.e0
bfun(2) = sval**2 / 2.e0
bfun(3) = sval**3 / 3.e0
bfun(1) = sval**1 / 1.e0_8
bfun(2) = sval**2 / 2.e0_8
bfun(3) = sval**3 / 3.e0_8
case (+4)
bfun(1) = sval**1 / 1.e0
bfun(2) = sval**2 / 2.e0
bfun(3) = sval**3 / 3.e0
bfun(4) = sval**4 / 4.e0
bfun(1) = sval**1 / 1.e0_8
bfun(2) = sval**2 / 2.e0_8
bfun(3) = sval**3 / 3.e0_8
bfun(4) = sval**4 / 4.e0_8
case (+5)
bfun(1) = sval**1 / 1.e0
bfun(2) = sval**2 / 2.e0
bfun(3) = sval**3 / 3.e0
bfun(4) = sval**4 / 4.e0
bfun(5) = sval**5 / 5.e0
bfun(1) = sval**1 / 1.e0_8
bfun(2) = sval**2 / 2.e0_8
bfun(3) = sval**3 / 3.e0_8
bfun(4) = sval**4 / 4.e0_8
bfun(5) = sval**5 / 5.e0_8
case (+6)
bfun(1) = sval**1 / 1.e0
bfun(2) = sval**2 / 2.e0
bfun(3) = sval**3 / 3.e0
bfun(4) = sval**4 / 4.e0
bfun(5) = sval**5 / 5.e0
bfun(6) = sval**6 / 6.e0
bfun(1) = sval**1 / 1.e0_8
bfun(2) = sval**2 / 2.e0_8
bfun(3) = sval**3 / 3.e0_8
bfun(4) = sval**4 / 4.e0_8
bfun(5) = sval**5 / 5.e0_8
bfun(6) = sval**6 / 6.e0_8
case (+7)
bfun(1) = sval**1 / 1.e0
bfun(2) = sval**2 / 2.e0
bfun(3) = sval**3 / 3.e0
bfun(4) = sval**4 / 4.e0
bfun(5) = sval**5 / 5.e0
bfun(6) = sval**6 / 6.e0
bfun(7) = sval**7 / 7.e0
bfun(1) = sval**1 / 1.e0_8
bfun(2) = sval**2 / 2.e0_8
bfun(3) = sval**3 / 3.e0_8
bfun(4) = sval**4 / 4.e0_8
bfun(5) = sval**5 / 5.e0_8
bfun(6) = sval**6 / 6.e0_8
bfun(7) = sval**7 / 7.e0_8
end select
......@@ -106,46 +106,46 @@
!------------------------------------ +0th-order basis !
select case (ndof)
case (+1)
bfun(1) = 1.e0
bfun(1) = 1.e0_8
case (+2)
bfun(1) = 1.e0
bfun(2) = sval**1 * 1.e0
bfun(1) = 1.e0_8
bfun(2) = sval**1 * 1.e0_8
case (+3)
bfun(1) = 1.e0
bfun(2) = sval**1 * 1.e0
bfun(3) = sval**2 * 1.e0
bfun(1) = 1.e0_8
bfun(2) = sval**1 * 1.e0_8
bfun(3) = sval**2 * 1.e0_8
case (+4)
bfun(1) = 1.e0
bfun(2) = sval**1 * 1.e0
bfun(3) = sval**2 * 1.e0
bfun(4) = sval**3 * 1.e0
bfun(1) = 1.e0_8
bfun(2) = sval**1 * 1.e0_8
bfun(3) = sval**2 * 1.e0_8
bfun(4) = sval**3 * 1.e0_8
case (+5)
bfun(1) = 1.e0
bfun(2) = sval**1 * 1.e0
bfun(3) = sval**2 * 1.e0
bfun(4) = sval**3 * 1.e0
bfun(5) = sval**4 * 1.e0
bfun(1) = 1.e0_8
bfun(2) = sval**1 * 1.e0_8
bfun(3) = sval**2 * 1.e0_8
bfun(4) = sval**3 * 1.e0_8
bfun(5) = sval**4 * 1.e0_8
case (+6)
bfun(1) = 1.e0
bfun(2) = sval**1 * 1.e0
bfun(3) = sval**2 * 1.e0
bfun(4) = sval**3 * 1.e0
bfun(5) = sval**4 * 1.e0
bfun(6) = sval**5 * 1.e0
bfun(1) = 1.e0_8
bfun(2) = sval**1 * 1.e0_8
bfun(3) = sval**2 * 1.e0_8
bfun(4) = sval**3 * 1.e0_8
bfun(5) = sval**4 * 1.e0_8
bfun(6) = sval**5 * 1.e0_8
case (+7)
bfun(1) = 1.e0
bfun(2) = sval**1 * 1.e0
bfun(3) = sval**2 * 1.e0
bfun(4) = sval**3 * 1.e0
bfun(5) = sval**4 * 1.e0
bfun(6) = sval**5 * 1.e0
bfun(7) = sval**6 * 1.e0
bfun(1) = 1.e0_8
bfun(2) = sval**1 * 1.e0_8
bfun(3) = sval**2 * 1.e0_8
bfun(4) = sval**3 * 1.e0_8
bfun(5) = sval**4 * 1.e0_8
bfun(6) = sval**5 * 1.e0_8
bfun(7) = sval**6 * 1.e0_8
end select
......@@ -153,46 +153,46 @@
!------------------------------------ +1st-order basis !
select case (ndof)
case (+1)
bfun(1) = 0.e0
bfun(1) = 0.e0_8
case (+2)
bfun(1) = 0.e0
bfun(2) = 1.e0
bfun(1) = 0.e0_8
bfun(2) = 1.e0_8
case (+3)
bfun(1) = 0.e0
bfun(2) = 1.e0
bfun(3) = sval**1 * 2.e0
bfun(1) = 0.e0_8
bfun(2) = 1.e0_8
bfun(3) = sval**1 * 2.e0_8
case (+4)
bfun(1) = 0.e0
bfun(2) = 1.e0
bfun(3) = sval**1 * 2.e0
bfun(4) = sval**2 * 3.e0
bfun(1) = 0.e0_8
bfun(2) = 1.e0_8
bfun(3) = sval**1 * 2.e0_8
bfun(4) = sval**2 * 3.e0_8
case (+5)
bfun(1) = 0.e0
bfun(2) = 1.e0
bfun(3) = sval**1 * 2.e0
bfun(4) = sval**2 * 3.e0
bfun(5) = sval**3 * 4.e0
bfun(1) = 0.e0_8
bfun(2) = 1.e0_8
bfun(3) = sval**1 * 2.e0_8
bfun(4) = sval**2 * 3.e0_8
bfun(5) = sval**3 * 4.e0_8
case (+6)
bfun(1) = 0.e0
bfun(2) = 1.e0
bfun(3) = sval**1 * 2.e0
bfun(4) = sval**2 * 3.e0
bfun(5) = sval**3 * 4.e0
bfun(6) = sval**4 * 5.e0
bfun(1) = 0.e0_8
bfun(2) = 1.e0_8
bfun(3) = sval**1 * 2.e0_8
bfun(4) = sval**2 * 3.e0_8
bfun(5) = sval**3 * 4.e0_8
bfun(6) = sval**4 * 5.e0_8
case (+7)
bfun(1) = 0.e0
bfun(2) = 1.e0
bfun(3) = sval**1 * 2.e0
bfun(4) = sval**2 * 3.e0
bfun(5) = sval**3 * 4.e0
bfun(6) = sval**4 * 5.e0
bfun(7) = sval**5 * 6.e0
bfun(1) = 0.e0_8
bfun(2) = 1.e0_8
bfun(3) = sval**1 * 2.e0_8
bfun(4) = sval**2 * 3.e0_8
bfun(5) = sval**3 * 4.e0_8
bfun(6) = sval**4 * 5.e0_8
bfun(7) = sval**5 * 6.e0_8
end select
......@@ -200,46 +200,46 @@
!------------------------------------ +2nd-order basis !
select case (ndof)
case (+1)
bfun(1) = 0.e0
bfun(1) = 0.e0_8
case (+2)
bfun(1) = 0.e0
bfun(2) = 0.e0
bfun(1) = 0.e0_8
bfun(2) = 0.e0_8
case (+3)
bfun(1) = 0.e0
bfun(2) = 0.e0
bfun(3) = 2.e0
bfun(1) = 0.e0_8
bfun(2) = 0.e0_8
bfun(3) = 2.e0_8
case (+4)
bfun(1) = 0.e0
bfun(2) = 0.e0
bfun(3) = 2.e0
bfun(4) = sval**1 * 6.e0
bfun(1) = 0.e0_8
bfun(2) = 0.e0_8
bfun(3) = 2.e0_8
bfun(4) = sval**1 * 6.e0_8
case (+5)
bfun(1) = 0.e0
bfun(2) = 0.e0
bfun(3) = 2.e0
bfun(4) = sval**1 * 6.e0
bfun(5) = sval**2 *12.e0
bfun(1) = 0.e0_8
bfun(2) = 0.e0_8
bfun(3) = 2.e0_8
bfun(4) = sval**1 * 6.e0_8
bfun(5) = sval**2 *12.e0_8
case (+6)
bfun(1) = 0.e0
bfun(2) = 0.e0
bfun(3) = 2.e0
bfun(4) = sval**1 * 6.e0
bfun(5) = sval**2 *12.e0
bfun(6) = sval**3 *20.e0
bfun(1) = 0.e0_8
bfun(2) = 0.e0_8
bfun(3) = 2.e0_8
bfun(4) = sval**1 * 6.e0_8
bfun(5) = sval**2 *12.e0_8
bfun(6) = sval**3 *20.e0_8
case (+7)
bfun(1) = 0.e0
bfun(2) = 0.e0
bfun(3) = 2.e0
bfun(4) = sval**1 * 6.e0
bfun(5) = sval**2 *12.e0
bfun(6) = sval**3 *20.e0
bfun(7) = sval**4 *30.e0
bfun(1) = 0.e0_8
bfun(2) = 0.e0_8
bfun(3) = 2.e0_8
bfun(4) = sval**1 * 6.e0_8
bfun(5) = sval**2 *12.e0_8
bfun(6) = sval**3 *20.e0_8
bfun(7) = sval**4 *30.e0_8
end select
......
......@@ -250,7 +250,7 @@
do ipos = +2 , npos - 1
if (uvel(ipos) .gt. +0.e0) then
if (uvel(ipos) .gt. +0.e0_8) then
!----------- integrate profile over upwind cell IPOS-1 !
......@@ -264,8 +264,8 @@
& * tDEL / SPAC( +1)
end if
ss11 = +1.e0 - 2.e0 * uCFL
ss22 = +1.e0
ss11 = +1.e0_8 - 2.e0_8 * uCFL
ss22 = +1.e0_8
call bfun1d(-1,mdof,ss11,vv11)
call bfun1d(-1,mdof,ss22,vv22)
......@@ -285,7 +285,7 @@
end do
else &
& if (uvel(ipos) .lt. -0.e0) then
& if (uvel(ipos) .lt. -0.e0_8) then
!----------- integrate profile over upwind cell IPOS+0 !
......@@ -299,8 +299,8 @@
& * tDEL / SPAC( +1)
end if
ss11 = -1.e0 - 2.e0 * uCFL
ss22 = -1.e0
ss11 = -1.e0_8 - 2.e0_8 * uCFL
ss22 = -1.e0_8
call bfun1d(-1,mdof,ss11,vv11)
call bfun1d(-1,mdof,ss22,vv22)
......
......@@ -139,7 +139,7 @@
!-------------------------------- C = C + scal * A * B !
if (scal .eq. +1.e0) then
if (scal .eq. +1.e0_8) then
cmat(1,1) = cmat(1,1) &
+ ( amat(1,1) * bmat(1,1) &
......@@ -156,7 +156,7 @@
+ amat(2,2) * bmat(2,2) )
else &
if (scal .eq. -1.e0) then
if (scal .eq. -1.e0_8) then
cmat(1,1) = cmat(1,1) &
- ( amat(1,1) * bmat(1,1) &
......@@ -210,7 +210,7 @@
!-------------------------------- C = C + scal * A * B !
if (scal .eq. +1.e0) then
if (scal .eq. +1.e0_8) then
cmat(1,1) = cmat(1,1) &
+ ( amat(1,1) * bmat(1,1) &
......@@ -252,7 +252,7 @@
+ amat(3,3) * bmat(3,3) )
else &
if (scal .eq. -1.e0) then
if (scal .eq. -1.e0_8) then
cmat(1,1) = cmat(1,1) &
- ( amat(1,1) * bmat(1,1) &
......@@ -499,23 +499,23 @@
!---------------------------------------- L = C * A^-1 !
lmat(1,1) = +0.e0
lmat(1,2) = +0.e0
lmat(2,1) = +0.e0
lmat(2,2) = +0.e0
lmat(1,1) = +0.e0_8
lmat(1,2) = +0.e0_8
lmat(2,1) = +0.e0_8
lmat(2,2) = +0.e0_8
call mul_2x2(amat(3,1),adim,ainv,LDIM, &
+1.e0,lmat,LDIM)
+1.e0_8,lmat,LDIM)
!---------------------------------------- U = A^-1 * B !
umat(1,1) = +0.e0
umat(1,2) = +0.e0
umat(2,1) = +0.e0
umat(2,2) = +0.e0
umat(1,1) = +0.e0_8
umat(1,2) = +0.e0_8
umat(2,1) = +0.e0_8
umat(2,2) = +0.e0_8
call mul_2x2(ainv,LDIM,amat(1,3),adim, &
+1.e0,umat,LDIM)
+1.e0_8,umat,LDIM)
!-------------------------------- S = D - C * A^-1 * B !
......@@ -525,7 +525,7 @@
smat(2,2) = amat(4,4)
call mul_2x2(lmat,LDIM,amat(1,3),adim, &
-1.e0/adet,smat,LDIM)
-1.e0_8/adet,smat,LDIM)
call inv_2x2(smat,LDIM,sinv,LDIM,sdet)
......@@ -640,33 +640,33 @@
!---------------------------------------- L = C * A^-1 !
lmat(1,1) = +0.e0
lmat(1,2) = +0.e0
lmat(1,3) = +0.e0
lmat(2,1) = +0.e0
lmat(2,2) = +0.e0
lmat(2,3) = +0.e0
lmat(3,1) = +0.e0
lmat(3,2) = +0.e0
lmat(3,3) = +0.e0
lmat(1,1) = +0.e0_8
lmat(1,2) = +0.e0_8
lmat(1,3) = +0.e0_8
lmat(2,1) = +0.e0_8
lmat(2,2) = +0.e0_8
lmat(2,3) = +0.e0_8
lmat(3,1) = +0.e0_8
lmat(3,2) = +0.e0_8
lmat(3,3) = +0.e0_8
call mul_3x3(amat(4,1),adim,ainv,LDIM, &
+1.e0,lmat,LDIM)
+1.e0_8,lmat,LDIM)
!---------------------------------------- U = A^-1 * B !
umat(1,1) = +0.e0
umat(1,2) = +0.e0
umat(1,3) = +0.e0
umat(2,1) = +0.e0
umat(2,2) = +0.e0
umat(2,3) = +0.e0
umat(3,1) = +0.e0
umat(3,2) = +0.e0
umat(3,3) = +0.e0
umat(1,1) = +0.e0_8
umat(1,2) = +0.e0_8
umat(1,3) = +0.e0_8
umat(2,1) = +0.e0_8
umat(2,2) = +0.e0_8
umat(2,3) = +0.e0_8
umat(3,1) = +0.e0_8
umat(3,2) = +0.e0_8
umat(3,3) = +0.e0_8
call mul_3x3(ainv,LDIM,amat(1,4),adim, &
+1.e0,umat,LDIM)
+1.e0_8,umat,LDIM)
!-------------------------------- S = D - C * A^-1 * B !
......@@ -681,7 +681,7 @@
smat(3,3) = amat(6,6)
call mul_3x3(lmat,LDIM,amat(1,4),adim, &
-1.e0/adet,smat,LDIM)
-1.e0_8/adet,smat,LDIM)
call inv_3x3(smat,LDIM,sinv,LDIM,sdet)
......
......@@ -66,8 +66,8 @@
!------------------------------- at least 3 grid-cells !
do ipos = +1, npos-1
do ivar = +1, nvar-0
oscl(1,ivar,ipos) = +0.e0
oscl(2,ivar,ipos) = +0.e0
oscl(1,ivar,ipos) = +0.e0_8
oscl(2,ivar,ipos) = +0.e0_8
end do
end do
end if
......@@ -143,25 +143,25 @@
hhlc = hhll + hhcc
hhmm = hhll + hhcc + hhrr
cmat(1,1) = -(hhcc+2.e0*hhrr)/(hhlc*hhmm)
cmat(1,1) = -(hhcc+2.e0_8*hhrr)/(hhlc*hhmm)
cmat(1,2) = -(hhll-hhrr)* &
& (3.e0*hhcc+2.e0*(hhll+hhrr))/&
& (3.e0_8*hhcc+2.e0_8*(hhll+hhrr))/&
& (hhlc*hhrc*hhmm)
cmat(1,3) = +(hhcc+2.e0*hhll)/(hhrc*hhmm)
cmat(1,3) = +(hhcc+2.e0_8*hhll)/(hhrc*hhmm)
cmat(2,1) = +3.e0/(hhlc*hhmm)
cmat(2,2) = -3.e0*(2.e0*hhcc+hhll+hhrr)/&
cmat(2,1) = +3.e0_8/(hhlc*hhmm)
cmat(2,2) = -3.e0_8*(2.e0_8*hhcc+hhll+hhrr)/&
& (hhlc*hhrc*hhmm)
cmat(2,3) = +3.e0/(hhrc*hhmm)
cmat(2,3) = +3.e0_8/(hhrc*hhmm)
do ivar = 1, nvar
oscl(1,ivar,ipos) = +1.e0 * ( &
oscl(1,ivar,ipos) = +1.e0_8 * ( &
& + cmat(1,1)*fdat(1,ivar,ipos-1) &
& + cmat(1,2)*fdat(1,ivar,ipos+0) &
& + cmat(1,3)*fdat(1,ivar,ipos+1) )
oscl(2,ivar,ipos) = +2.e0 * ( &
oscl(2,ivar,ipos) = +2.e0_8 * ( &
& + cmat(2,1)*fdat(1,ivar,ipos-1) &
& + cmat(2,2)*fdat(1,ivar,ipos+0) &
& + cmat(2,3)*fdat(1,ivar,ipos+1) )
......@@ -176,8 +176,8 @@
hhcc = max(delx(head+1),dmin)
hhrr = max(delx(head+2),dmin)
cmat(1,1) = -2.e0 / (hhll+hhcc)
cmat(1,2) = +2.e0 / (hhll+hhcc)
cmat(1,1) = -2.e0_8 / (hhll+hhcc)
cmat(1,2) = +2.e0_8 / (hhll+hhcc)
do ivar = 1, nvar
......@@ -185,7 +185,7 @@
& + cmat(1,1)*fdat(1,ivar,head+0) &
& + cmat(1,2)*fdat(1,ivar,head+1)
oscl(2,ivar,head) = +0.e0
oscl(2,ivar,head) = +0.e0_8
end do
......@@ -195,8 +195,8 @@
hhcc = max(delx(tail-1),dmin)
hhrr = max(delx(tail-0),dmin)
cmat(1,2) = -2.e0 / (hhrr+hhcc)
cmat(1,3) = +2.e0 / (hhrr+hhcc)
cmat(1,2) = -2.e0_8 / (hhrr+hhcc)
cmat(1,3) = +2.e0_8 / (hhrr+hhcc)
do ivar = 1, nvar
......@@ -204,7 +204,7 @@
& + cmat(1,2)*fdat(1,ivar,tail-1) &
& + cmat(1,3)*fdat(1,ivar,tail+0)
oscl(2,ivar,tail) = +0.e0
oscl(2,ivar,tail) = +0.e0_8
end do
......@@ -268,7 +268,7 @@
& + .50d+0 * fdat(1,ivar,head+1) &
& - .50d+0 * fdat(1,ivar,head+0)
oscl(2,ivar,head) = +0.e0
oscl(2,ivar,head) = +0.e0_8
end do
......@@ -280,7 +280,7 @@
& + .50d+0 * fdat(1,ivar,tail+0) &
& - .50d+0 * fdat(1,ivar,tail-1)
oscl(2,ivar,tail) = +0.e0
oscl(2,ivar,tail) = +0.e0_8
end do
......
......@@ -83,10 +83,10 @@
do ivar = 1,nvar
edge(ivar,1) = fdat(1,ivar,1)
dfdx(ivar,1) = 0.e0
dfdx(ivar,1) = 0.e0_8
edge(ivar,2) = fdat(1,ivar,1)
dfdx(ivar,2) = 0.e0
dfdx(ivar,2) = 0.e0_8
end do
end if
......@@ -103,7 +103,7 @@
!--------------- reconstruction: constant grid-spacing !
dd10 = delx(+1) * 2.e0
dd10 = delx(+1) * 2.e0_8
do ivar = +1, nvar
......@@ -175,8 +175,8 @@
edge(ivar,tail+1) = &
& fdat(+1,ivar,tail+0)
dfdx(ivar,head-1) = 0.e0
dfdx(ivar,tail+1) = 0.e0
dfdx(ivar,head-1) = 0.e0_8
dfdx(ivar,tail+1) = 0.e0_8
end do
......
......@@ -120,24 +120,24 @@
do ivar = 1, nvar
edge(ivar,ipos) = ( &
& - 1.e0 * &
& - 1.e0_8 * &
& fdat(1,ivar,ipos-2) &
& + 7.e0 * &
& + 7.e0_8 * &
& fdat(1,ivar,ipos-1) &
& + 7.e0 * &
& + 7.e0_8 * &
& fdat(1,ivar,ipos+0) &
& - 1.e0 * &
& fdat(1,ivar,ipos+1) ) / 12.e0
& - 1.e0_8 * &
& fdat(1,ivar,ipos+1) ) / 12.e0_8
dfdx(ivar,ipos) = ( &
& + 1.e0 * &
& + 1.e0_8 * &
& fdat(1,ivar,ipos-2) &
& - 15.e0 * &
& - 15.e0_8 * &
& fdat(1,ivar,ipos-1) &
& + 15.e0 * &
& + 15.e0_8 * &
& fdat(1,ivar,ipos+0) &
& - 1.e0 * &
& fdat(1,ivar,ipos+1) ) / 12.e0
& - 1.e0_8 * &
& fdat(1,ivar,ipos+1) ) / 12.e0_8
dfdx(ivar,ipos) = &
& dfdx(ivar,ipos) / delx(+1)
......@@ -165,7 +165,7 @@
xmap(-2) = -( delh(-2) &
& + delh(-1) ) / xhat
xmap(-1) = - delh(-1) / xhat
xmap(+0) = + 0.e0
xmap(+0) = + 0.e0_8
xmap(+1) = + delh(+0) / xhat
xmap(+2) = +( delh(+0) &
& + delh(+1) ) / xhat
......
......@@ -120,31 +120,31 @@
do ivar = 1, nvar
edge(ivar,ipos) = &
& + ( 1.e0 / 60.e0) * &
& + ( 1.e0_8 / 60.e0_8) * &
& fdat(1,ivar,ipos-3) &
& - ( 8.e0 / 60.e0) * &
& - ( 8.e0_8 / 60.e0_8) * &
& fdat(1,ivar,ipos-2) &
& + (37.e0 / 60.e0) * &
& + (37.e0_8 / 60.e0_8) * &
& fdat(1,ivar,ipos-1) &
& + (37.e0 / 60.e0) * &
& + (37.e0_8 / 60.e0_8) * &
& fdat(1,ivar,ipos+0) &
& - ( 8.e0 / 60.e0) * &
& - ( 8.e0_8 / 60.e0_8) * &
& fdat(1,ivar,ipos+1) &
& + ( 1.e0 / 60.e0) * &
& + ( 1.e0_8 / 60.e0_8) * &
& fdat(1,ivar,ipos+2)
dfdx(ivar,ipos) = &
& - ( 1.e0 / 90.e0) * &
& - ( 1.e0_8 / 90.e0_8) * &
& fdat(1,ivar,ipos-3) &
& + ( 5.e0 / 36.e0) * &
& + ( 5.e0_8 / 36.e0_8) * &
& fdat(1,ivar,ipos-2) &
& - (49.e0 / 36.e0) * &
& - (49.e0_8 / 36.e0_8) * &
& fdat(1,ivar,ipos-1) &
& + (49.e0 / 36.e0) * &
& + (49.e0_8 / 36.e0_8) * &
& fdat(1,ivar,ipos+0) &
& - ( 5.e0 / 36.e0) * &
& - ( 5.e0_8 / 36.e0_8) * &
& fdat(1,ivar,ipos+1) &
& + ( 1.e0 / 90.e0) * &
& + ( 1.e0_8 / 90.e0_8) * &
& fdat(1,ivar,ipos+2)
dfdx(ivar,ipos) = &
......@@ -184,7 +184,7 @@
xmap(-2) = -( delh(-2) &
& + delh(-1) ) / xhat
xmap(-1) = - delh(-1) / xhat
xmap(+0) = + 0.e0
xmap(+0) = + 0.e0_8
xmap(+1) = + delh(+0) / xhat
xmap(+2) = +( delh(+0) &
& + delh(+1) ) / xhat
......
......@@ -244,8 +244,8 @@
xmap(-1) =-(delh(-1) + &
& delh(+0)*0.5d0)/xhat
xmap(+0) = -1.e0
xmap(+1) = +1.e0
xmap(+0) = -1.e0_8
xmap(+1) = +1.e0_8
xmap(+2) = (delh(+1) + &
& delh(+0)*0.5d0)/xhat
......@@ -453,7 +453,7 @@
if (bcon(ivar)%bcopt.eq.bopt) then
eval(-1) = &
& fdat(1,ivar,head-1) * 1.e0
& fdat(1,ivar,head-1) * 1.e0_8
eval(+0) = &
& fdat(1,ivar,head-1) * .5d0 + &
& fdat(1,ivar,head+0) * .5d0
......@@ -575,8 +575,8 @@
xmap(-1) =-(delh(-1) + &
& delh(+0)*0.5d0)/xhat
xmap(+0) = -1.e0
xmap(+1) = +1.e0
xmap(+0) = -1.e0_8
xmap(+1) = +1.e0_8
xmap(+2) = (delh(+1) + &
& delh(+0)*0.5d0)/xhat
......@@ -790,7 +790,7 @@
& fdat(1,ivar,tail+0) * .5d0 + &
& fdat(1,ivar,tail+1) * .5d0
eval(+2) = &
& fdat(1,ivar,tail+1) * 1.e0
& fdat(1,ivar,tail+1) * 1.e0_8
gval(+0) = &
& fdat(1,ivar,tail+0) * .5d0 - &
......
......@@ -94,8 +94,8 @@
do ivar = +1, nvar
fhat(1,ivar,+1) = &
& fdat(1,ivar,+1)
fhat(2,ivar,+1) = 0.e0
fhat(3,ivar,+1) = 0.e0
fhat(2,ivar,+1) = 0.e0_8
fhat(3,ivar,+1) = 0.e0_8
end do
end if
......@@ -275,8 +275,8 @@
mono = +1
lhat(1) = ff00
lhat(2) = 0.e0
lhat(3) = 0.e0
lhat(2) = 0.e0_8
lhat(3) = 0.e0_8
return
......
......@@ -99,10 +99,10 @@
!----- default to reduced order if insufficient points !
do ivar = +1, nvar
fhat(1,ivar,+1) = fdat(1,ivar,+1)
fhat(2,ivar,+1) = 0.e0
fhat(3,ivar,+1) = 0.e0
fhat(4,ivar,+1) = 0.e0
fhat(5,ivar,+1) = 0.e0
fhat(2,ivar,+1) = 0.e0_8
fhat(3,ivar,+1) = 0.e0_8
fhat(4,ivar,+1) = 0.e0_8
fhat(5,ivar,+1) = 0.e0_8
end do
end if
......@@ -313,10 +313,10 @@
mono = +1
lhat(1) = ff00
lhat(2) = 0.e0
lhat(3) = 0.e0
lhat(4) = 0.e0
lhat(5) = 0.e0
lhat(2) = 0.e0_8
lhat(3) = 0.e0_8
lhat(4) = 0.e0_8
lhat(5) = 0.e0_8
return
......
......@@ -244,8 +244,8 @@
!------------------------------------- initializations !
vvlo(+1:+5) = 0.e0
vvhi(+1:+5) = 0.e0
vvlo(+1:+5) = 0.e0_8
vvhi(+1:+5) = 0.e0_8
!------------- remap FDAT from XPOS to XNEW using FHAT !
......@@ -285,7 +285,7 @@
do idof = +1,ndof
do ivar = +1,nvar
fnew(idof,ivar,kpos) = 0.e0
fnew(idof,ivar,kpos) = 0.e0_8
end do
end do
......@@ -374,7 +374,7 @@
! wrt. column-wise conservation. Use KBN approach to
! account for FP roundoff.
sdat = 0.e0; serr = 0.e0
sdat = 0.e0_8; serr = 0.e0_8
do ipos = +1, npos-1
do ivar = +1, nvar-0
......@@ -407,7 +407,7 @@
sdat = sdat + serr
snew = 0.e0; serr = 0.e0
snew = 0.e0_8; serr = 0.e0_8
do ipos = +1, nnew-1
do ivar = +1, nvar-0
......@@ -450,7 +450,7 @@
do ivar = +1, nvar-0
if (serr(ivar) .gt. 0.e0) then
if (serr(ivar) .gt. 0.e0_8) then
vmin = kmin(ivar)
......@@ -459,7 +459,7 @@
& serr(ivar)/(xnew(vmin+1)-xnew(vmin+0))
else &
& if (serr(ivar) .lt. 0.e0) then
& if (serr(ivar) .lt. 0.e0_8) then
vmax = kmax(ivar)
......
......@@ -110,7 +110,7 @@
call random_number (rand)
rand = 2.e0 * (rand-.5d0)
rand = 2.e0_8 * (rand-.5d0)
move = rand * move
......
......@@ -111,7 +111,7 @@
wsum = wval(1) + wval(2) + ZERO
wval(1) = wval(1) / wsum
! wval(2) = wval(2) / wsum
wval(2) =-wval(1) + 1.e0 ! wval(2)/wsum but robust !
wval(2) =-wval(1) + 1.e0_8 ! wval(2)/wsum but robust !
return
......@@ -168,15 +168,15 @@
if (ipos-halo.lt.head) then
omax = 1.e0
omin = 0.e0 ; return
omax = 1.e0_8
omin = 0.e0_8 ; return
end if
if (ipos+halo.gt.tail) then
omax = 1.e0
omin = 0.e0 ; return
omax = 1.e0_8
omin = 0.e0_8 ; return
end if
......@@ -203,7 +203,7 @@
!---------------------------------------- "lower" part !
delh = 0.e0
delh = 0.e0_8
do hpos = ipos-1, imin, -1
......@@ -235,7 +235,7 @@
!---------------------------------------- "upper" part !
delh = 0.e0
delh = 0.e0_8
do hpos = ipos+1, imax, +1
......@@ -319,15 +319,15 @@
if (ipos-halo.lt.head) then
omax = 1.e0
omin = 0.e0 ; return
omax = 1.e0_8
omin = 0.e0_8 ; return
end if
if (ipos+halo.gt.tail) then
omax = 1.e0
omin = 0.e0 ; return
omax = 1.e0_8
omin = 0.e0_8 ; return
end if
......@@ -343,21 +343,21 @@
dfx1 = oscl(1,ivar,ipos)
dfx2 = oscl(2,ivar,ipos)
oval = (2.e0**1*dfx1)**2 &
& + (2.e0**2*dfx2)**2
oval = (2.e0_8**1*dfx1)**2 &
& + (2.e0_8**2*dfx2)**2
omin = oval
omax = oval
!---------------------------------------- "lower" part !
delh = 0.e0
delh = 0.e0_8
do hpos = ipos-1, imin, -1
!------------------ calc. derivatives centred on IPOS. !
delh = delh + 2.e0
delh = delh + 2.e0_8
dfx1 = oscl(1,ivar,hpos)
dfx2 = oscl(2,ivar,hpos)
......@@ -366,8 +366,8 @@
!------------------ indicator: NORM(H^N * D^N/DX^N(F)) !
oval = (2.e0**1*dfx1)**2 &
& + (2.e0**2*dfx2)**2
oval = (2.e0_8**1*dfx1)**2 &
& + (2.e0_8**2*dfx2)**2
if (oval .lt. omin) then
omin = oval
......@@ -380,13 +380,13 @@
!---------------------------------------- "upper" part !
delh = 0.e0
delh = 0.e0_8
do hpos = ipos+1, imax, +1
!------------------ calc. derivatives centred on IPOS. !
delh = delh - 2.e0
delh = delh - 2.e0_8
dfx1 = oscl(1,ivar,hpos)
dfx2 = oscl(2,ivar,hpos)
......@@ -395,8 +395,8 @@
!------------------ indicator: NORM(H^N * D^N/DX^N(F)) !
oval = (2.e0**1*dfx1)**2 &
& + (2.e0**2*dfx2)**2
oval = (2.e0_8**1*dfx1)**2 &
& + (2.e0_8**2*dfx2)**2
if (oval .lt. omin) then
omin = oval
......
......@@ -192,6 +192,12 @@ export NEMO_DIR=${MAIN_DIR}/${x_s}
[ "${CMP_NAM}" == 'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit
# Load environment if exists
env_file=`find ${MAIN_DIR}/arch -name arch-${CMP_NAM}.env`
if [ -f "${env_file}" ] ; then
echo "Load environment file arch-${CMP_NAM}.env"
. ${env_file}
fi
## No ref. cfg, demo case, nor remote cfg selected
if [[ -z "${REF_CONF}" && -z "${DEMO_CONF}" && -z "${RMT_CONF}" ]]; then
......
......@@ -56,12 +56,16 @@ set -o posix
#-
MYDIR=$1
MYFILE=$(basename "$2")
if [ "$MYFILE" == "agrif2model.f90" ];then
if [ -d ${MYDIR}/${NEW_CONF}/WORK ]; then
\cp ${MYDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${MYDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE
else
\cp ${CONFIG_DIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${MYDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE
fi
# generic case
if [ -d ${MYDIR}/WORK ]; then
\cp ${MYDIR}/WORK/${MYFILE/.f90/.F90} ${MYDIR}/NEMOFILES/obj/$MYFILE
# DOMAINcfg case
elif [ -d ${MYDIR}/src ]; then
\cp ${MYDIR}/src/${MYFILE/.f90/.F90} ${MYDIR}/NEMOFILES/obj/$MYFILE
fi
else
cd ${MYDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${MYDIR}/${NEW_CONF}/NEMOFILES/conv ${MYDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${MYDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${MYDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null
cd ${MYDIR}/NEMOFILES/ppsrc/nemo
${MYDIR}/NEMOFILES/conv ${MYDIR}/NEMOFILES/agrif_oce.in -rm -incdir ${MYDIR}/NEMOFILES/inc -comdirout ${MYDIR}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null
fi
......@@ -11,7 +11,7 @@ inc $COMPIL_DIR/arch_nemo.fcm
inc $COMPIL_DIR/cpp.fcm
search_src 1
src::nemo $CONFIG_DIR/$NEW_CONF/WORK
src::nemo $CONFIG_DIR/$NEW_CONF/WORK
bld::target lib_cray.f90 nemo.f90 agrif_user.f90 agrif2model.f90
......@@ -20,7 +20,7 @@ dir::root $NEMO_TDIR/$NEW_CONF/NEMOFILES
bld::tool::fc_output
bld::tool::fc_compile
bld::tool::fc_include
bld::tool::fc $COMPIL_DIR/agrifpp.sh ${NEMO_TDIR}
bld::tool::fc $COMPIL_DIR/agrifpp.sh $NEMO_TDIR/$NEW_CONF
bld::tool::fflags
bld::tool::ld
bld::tool::ldflags
......
......@@ -11,7 +11,7 @@ inc $COMPIL_DIR/arch_tools.fcm
inc $COMPIL_DIR/cpp_tools.fcm
search_src 1
src::nemo $TOOLS_DIR/$NEW_CONF/src
src::nemo $TOOLS_DIR/$NEW_CONF/src
bld::target make_domain_cfg.f90 agrif_user.f90 agrif2model.f90
......@@ -20,7 +20,7 @@ dir::root $TOOLS_DIR/$NEW_CONF/NEMOFILES
bld::tool::fc_output
bld::tool::fc_compile
bld::tool::fc_include
bld::tool::fc $COMPIL_DIR/agrifpp.sh $TOOLS_DIR
bld::tool::fc $COMPIL_DIR/agrifpp.sh $TOOLS_DIR/$NEW_CONF
bld::tool::fflags
bld::tool::ld
bld::tool::ldflags
......
#!/bin/bash
#!
#BSUB -q p_short
#BSUB -n TOTAL_NPROCS
#BSUB -J NEMO_SETTE
#BSUB -o job_sette.out
#BSUB -e job_sette.out
#BSUB -P R000
#BSUB -x
###############################################################
# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
# (via sed operating on this template job file).
#
OCEANCORES=NPROCS
XIOS_NUMPROCS=NXIOPROCS
export SETTE_DIR=DEF_SETTE_DIR
###############################################################
#
# load sette functions (only post_test_tidyup needed)
#
. ${SETTE_DIR}/all_functions.sh
# Don't remove neither change the following line
# BODY
#
# These variables are needed by post_test_tidyup function in all_functions.sh
#
export EXE_DIR=DEF_EXE_DIR
export INPUT_DIR=DEF_INPUT_DIR
export CONFIG_DIR=DEF_CONFIG_DIR
export TOOLS_DIR=DEF_TOOLS_DIR
export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
export NEW_CONF=DEF_NEW_CONF
export CMP_NAM=DEF_CMP_NAM
export TEST_NAME=DEF_TEST_NAME
#
# end of set up
# Load environment if exists
env_file=`find ${TOOLS_DIR}/../arch -name arch-${CMP_NAM}.env`
if [ -f "${env_file}" ] ; then
echo "Load environment file arch-${CMP_NAM}.env"
. ${env_file}
fi
###############################################################
# Local settings for CMCC cluster
#
export I_MPI_HYDRA_BRANCH_COUNT=`cat $LSB_DJOB_HOSTFILE | uniq | wc -l`
export MPIRUN="mpiexec.hydra"
# local xios setting for MPMD
export LD_LIBRARY_PATH=${XIOS}/lib:${LD_LIBRARY_PATH}
XIOS_SERVER_PATHNAME="${XIOS}/bin/xios_server.exe"
echo "Start JOBID ${LSB_JOBID}"
###############################################################
#
# change to the working directory
#
cd ${EXE_DIR}
#
echo Running on host `hostname`
echo Time is `date`
echo Directory is `pwd`
#
# Run the parallel MPI executable
#
startTime=$(date +%s)
if [ MPI_FLAG == "yes" ]; then
if [ ${USING_MPMD} == "yes" ] && [ ${XIOS_NUMPROCS} -gt 0 ]; then
# XIOS detached mode
xioscmdfile="xioscmdfile"
#
echo "# Configuration file for mpiexec.hydra" > $xioscmdfile
echo "-n ${OCEANCORES} ./nemo" >> $xioscmdfile
echo "-n ${XIOS_NUMPROCS} ${XIOS_SERVER_PATHNAME}" >> $xioscmdfile
time ${MPIRUN} -configfile $xioscmdfile
else
# XIOS attached mode
time ${MPIRUN} ./nemo
fi
else
# Run the serial executable
time ./nemo
fi
endTime=$(date +%s)
totalTime=$(($endTime-$startTime))
echo "Model finished after $totalTime seconds for test $TEST_NAME"
#
post_test_tidyup
# END_BODY
# Don't remove neither change the previous line
exit
======================
usage of SETTE package
======================
INSTALLATION
============
* checkout the code as follow:
.. code-block:: console
$ svn checkout http://forge.ipsl.jussieu.fr/nemo/svn/utils/CI/sette sette
* The sette directory have to be located in the main directory (at the same level as ``src/`` or ``cfg/``).
MASTER SCRIPT: sette.sh
=======================
* ``sette.sh`` is a simple wrapper that runs tests on the reference configurations, test cases and generates the report at the end.
* ``sette.sh`` is able n option, to take a list of configurations in argument (sette.sh -t "CFG1 CFG2 CFG3").
- The list of available configurations is available in running ./sette_list_avail_cfg.sh.
- The default for sette is to run all of the reference and test configurations.
* Users need to set up the ``param.cfg`` file correctly and download input files before running the script.
SECONDARY SCRIPT
================
* ``sette_reference-configuration.sh`` runs sette tests on the reference configurations.
* ``sette_test-cases.sh`` runs sette tests on test cases.
* ``sette_list_avail_rev.sh`` generates a listing on all the revisions available in the validation directory for each configuration.
* ``sette_list_avail_cfg.sh`` generates a listing of all the available configurations.
* ``sette_rpt.sh`` generates the report.
USER SETUP (recommended)
========================
* in ``param.cfg`` :
- variables (NEMO_VALIDATION_REF, NEMO_REV_REF) have to be specified in param.cfg
- variables SETTE_(COMPILER, USING_XIOS, USING_MPMD, JOB_PREFIX_MPMD, JOB_PREFIX_NOMPMD, BATCH_CMD, BATCH_STAT, BATCH_NAME, FORCING_DIR, SVN_CMD, NEMO_VALIDATION_DIR, ADD_NOSIGNEDZERO)
can be exported from your shell startup files. It is advise to setup the default value in your startup file if it doesn't fit your need.
If you prefer not doing so, you need to update the default initialisation
- variable NEMO_VALIDATION_DIR is sette by default in MAIN_DIR/NEMO_VALIDATION (this is to avoid overwritting results when running sette on different branches).
- description of variables listed in param.cfg (SETTE_):
# reference version for bit reproducibility results
| NEMO_VALIDATION_REF : reference directory
| NEMO_REV_REF : reference revision
# compiler information
| COMPILER : compiler among those available in NEMOGCM/ARCH
# XIOS management
| USING_XIOS : flag to control the activation of key_xios.
"yes" to compile using key_xios and link to the external XIOS library.
"no" to compile without key_xios and link to the old IOIPSL library.
| USING_MPMD : flag to control the use of stand-alone IO servers
(requires USING_XIOS="yes").
"yes" to run in MPMD (detached) mode with stand-alone IO servers.
"no" to run in SPMD (attached) mode without separate IO servers.
# MPI communication management
| USING_MPI3 : flag to control the activation of key_mpi3
"yes" to use the MPI3 neighbourhood collectives for halo exchange
"no" to use standard point-to-point communications for halo exchange
# loop fusion management
| USING_LOOP_FUSION : flag to control the activation of key_loop_fusion
"yes" to use the loop fusion adv routines when halo = 2
"no" to use standard adv routine
# generique batch scrip prefix name if MPMD set to true/false
| JOB_PREFIX_MPMD
| JOB_PREFIX_NOMPMD
# batch command needed
| BATCH_CMD : command for job submission in batch mode
| BATCH_STAT : command to check job status
| BATCH_NAME : generic sette job name (as it appears with $BATCH_STAT command)
# file storing
| FORCING_DIR : directory where is stored input.tar file (same name in input_CONFIG_NAME.cfg)
reference configuration input tar file could be found here : https://gws-access.jasmin.ac.uk/public/nemo/sette_inputs/
| NEMO_VALIDATION_DIR : directory where is stored restarts, run.stat, tracer.stat and ocean.output files for each configuration
( NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) )
| INPUT_DIR : directory where is stored input files (DO NOT CHANGE IT)
# misc.
| SVN_CMD : svn command use to do svn info (default svn). Could be useful if you are using git svn
: Reference directory for result comparison will be NEMO_VALIDATION_REF/COMPILER/NEMO_REV_REF
| ADD_NODIGNEDZERO : set "yes" if you need key_nosignedzero to run nemo
USAGE of main scripts
=====================
* ``sette.sh`` : it is a simple wrapper to run tests on the reference configurations, test-cases and generate the report at the end.
- if no argument is given, sette run all the reference configurations and test cases
- if a list of argument is provided (sette.sh -t "CFG1 CFG2 CFG3"), sette will only run these configurations.
The list of available configurations is available in running ./sette_list_avail_cfg.sh.
- user need to set up the param.cfg file correctly and download input file before running the script.
- user can enforce synchronisation (-s option) of the existing CFG_ST with the REF configuration (EXPREF and MY_SRC).
- user can enforce cleaning of the CFG_ST configuration (use of makenemo -n CFG_ST clean) (-c option)
* ``sette_rpt.sh`` : it generates the sette report.
- if no argument is given, the report will be generated on the last changed revision.
- if an argument is given (revision number) the report will be generated for this revision only
- if 'old' is given as argument the former behavior is applied (the latest revision is check whatever the current revision
- it is possible to retreive all the available revision test using sette_list_avail_rev.sh
- XXXXX+ means sette results for revision XXXXX contain local modification in src/cfgs/test
- it is NOT possible to run sette_rpt.sh for a single configuration.
* ``sette_list_avail_rev.sh`` : generate a listing on all the revisions available in the validation directory for each configuration.
- no argument needed
- XXXXX+ means sette results for revision XXXXX contain local modification in src/cfgs/test
* ``sette_list_avail_cfg.sh`` : generate a listing of all the available configurations.
- no argument needed
NOTES
=====
* compilation issues:
- in case of error you can remove your NEW_CONF directory and all files doing :
::
$ ./makenemo -n MY_CONFIG clean_config
- if you want recompile nemo but before you want to clean compiled code do :
::
./makenemo clean
- if you have already compiled you can re-run all sette.sh and compilation part will be by-passed.
* verbose sette output:
- if you want a completly verbose makenemo you can uncomment `set -x` in makenemo script
and then launch `./sette.sh 2>&1 | tee out.sette` . This creates out.sette file in ${SETTE_DIR}
TO ADD NEW CONFIGURATION
=========================
1. creates a new ``input_NEW_CONFIG.cfg`` if you need tar file (if you use same tar file of GYRE, ORCA2_LIM or ORCA2_LIM_PISCES you can use it)
2. add a bloc in one of the ``sette_reference-configuration.sh`` or ``sette_test-cases.sh`` script
3. add your configuration to the list in ``param.cfg``
TO ADD NEW MACHINE
===================
1. add ``arch-compiler.fcm`` in ``NEMOGCM/ARCH`` directory
2. makenemo -m new_compiler (see makenemo -h for help)
3. add new batch-file
TO ADD NEW BATCH-FILE
======================
1. see in ``SETTE/BATCH_TEMPLATE`` directory existing examples
2. create you own batch file like: ``batch-${COMPILER}`` file
(note: sette_test-cases.sh and ``sette_cfg-ref.sh`` will copy it in job_batch_template if you run tests in INTERACT_FLAG="no")
EXTRA SETTING POSSIBLE
======================
Among the setting that can be modified by the user in sette_cfg-ref.sh and sette_test-cases.sh script,
there are: sequential/parrallel (default), interacive or not (default) and mpi (default) or not.
- | BATCH_COMMAND_PAR is the command for job submission in batch mode parallel (specified in param.cfg).
- | BATCH_COMMAND_SEQ is the command for job submission in batch mode sequential (NB_PROC = 1).
the default value is the BATCH_COMMAND_PAR value.
- | INTERACT_FLAG : "yes" if you want to run in interactive mode.
"no" if you want to run in batch mode (default).
- | MPIRUN_FLAG : "yes" if you want to run in parallel (MPI) (default).
"no" if you want to run in sequential mode (NB_PROC = 1).
......@@ -172,7 +172,7 @@ clean_config() {
# define validation dir
set_valid_dir () {
if [ ${DETACHED_HEAD} == "no" ] ; then
REVISION_NB=`git -C ${MAIN_DIR} rev-list --abbrev-commit origin | head -1l`
REVISION_NB=`git -C ${MAIN_DIR} rev-parse --short HEAD 2> /dev/null`
else
REVISION_NB=${DETACHED_CMIT}
fi
......@@ -292,7 +292,8 @@ set_namelist () {
# Add $VARNAME in namelist file ${EXE_DIR}/$1 in namelist group $NAMGRP
# on mac osx, replace sed --posix by gsed (available with mac port)
sed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || gsed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
sed --posix -e "/${NAMGRP}[ !]/a\ ${VAR_NAME} " -e "/${NAMGRP}$/a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || \
gsed --posix -e "/${NAMGRP}[ !]/a\ ${VAR_NAME} " -e "/${NAMGRP}$/a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
# if file not empty replace ${EXE_DIR}/$1
if [ -s ${EXE_DIR}/$1.tmp ] ; then
......