Skip to content

Commit

Permalink
Remove MCNP_CODE dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobson64 committed Jun 9, 2017
1 parent fd0c1d7 commit 17f57bb
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 168 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/bin
/bld
/src
MCNP*/Source*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions MCNP_CODE/.gitignore

This file was deleted.

87 changes: 0 additions & 87 deletions build.sh

This file was deleted.

2 changes: 0 additions & 2 deletions mcnp_source.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#!/bin/bash

cd MCNP_CODE
rm -rf */Source */Source_orig
tar -xzvf ${dist_dir}/mcnp/mcnp5.1.60_source.tar.gz
tar -xzvf ${dist_dir}/mcnp/mcnp6.1_source.tar.gz
tar -xzvf ${dist_dir}/mcnp/mcnp6.1.1beta_source.tar.gz
cp -r MCNP5/Source MCNP5/Source_orig
cp -r MCNP6/Source MCNP6/Source_orig
cp -r MCNP611/Source MCNP611/Source_orig
cd ..
patch -p0 < patch/mcnp.5.1.60.patch
patch -p0 < patch/mcnp.6.1.patch
patch -p0 < patch/mcnp.6.1.1beta.patch
6 changes: 3 additions & 3 deletions patch/mcnp.5.1.60.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -rN '--unified=0' MCNP_CODE/MCNP5/Source/src/torus.F90 MCNP_CODE/MCNP5/Source_new/src/torus.F90
--- MCNP_CODE/MCNP5/Source/src/torus.F90
+++ MCNP_CODE/MCNP5/Source_new/src/torus.F90
diff -rN '--unified=0' MCNP5/Source/src/torus.F90 MCNP5/Source_new/src/torus.F90
--- MCNP5/Source/src/torus.F90
+++ MCNP5/Source_new/src/torus.F90
@@ -68 +68,7 @@
- if( abs(t3)<=z0 ) go to 40
+ if( abs(t3)<=z0 ) then
Expand Down
72 changes: 36 additions & 36 deletions patch/mcnp.6.1.1beta.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/import/frgcpa_.inc MCNP_CODE/MCNP611/Source_new/import/frgcpa_.inc
--- MCNP_CODE/MCNP611/Source/import/frgcpa_.inc
+++ MCNP_CODE/MCNP611/Source_new/import/frgcpa_.inc
diff -rN '--unified=0' MCNP611/Source/import/frgcpa_.inc MCNP611/Source_new/import/frgcpa_.inc
--- MCNP611/Source/import/frgcpa_.inc
+++ MCNP611/Source_new/import/frgcpa_.inc
@@ -3 +3 @@
-!$OMP THREADPRIVATE (/FRGCPA_/)
+! !$OMP THREADPRIVATE (/FRGCPA_/)
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/import/frgspa_.inc MCNP_CODE/MCNP611/Source_new/import/frgspa_.inc
--- MCNP_CODE/MCNP611/Source/import/frgspa_.inc
+++ MCNP_CODE/MCNP611/Source_new/import/frgspa_.inc
diff -rN '--unified=0' MCNP611/Source/import/frgspa_.inc MCNP611/Source_new/import/frgspa_.inc
--- MCNP611/Source/import/frgspa_.inc
+++ MCNP611/Source_new/import/frgspa_.inc
@@ -3 +3 @@
-!$OMP THREADPRIVATE (/FRGSPA_/)
+! !$OMP THREADPRIVATE (/FRGSPA_/)
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/burn_out.F90 MCNP_CODE/MCNP611/Source_new/src/burn_out.F90
--- MCNP_CODE/MCNP611/Source/src/burn_out.F90
+++ MCNP_CODE/MCNP611/Source_new/src/burn_out.F90
diff -rN '--unified=0' MCNP611/Source/src/burn_out.F90 MCNP611/Source_new/src/burn_out.F90
--- MCNP611/Source/src/burn_out.F90
+++ MCNP611/Source_new/src/burn_out.F90
@@ -418 +418 @@
- write (iuo,'(/,a,i5)') ' Material #:',nmt(matb(iq))
+ write (iuo,'(/,a,i8)') ' Material #:',nmt(matb(iq))
Expand All @@ -34,35 +34,35 @@ diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/burn_out.F90 MCNP_CODE/MCNP6
@@ -468 +468 @@
- write (iuo,'(/a,i4,a,i3,a,1p,e9.3,a,a,e9.3,a,//,a,/,a)') &
+ write (iuo,'(/a,i8,a,i3,a,1p,e9.3,a,a,e9.3,a,//,a,/,a)') &
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/cgm_interface.F90 MCNP_CODE/MCNP611/Source_new/src/cgm_interface.F90
--- MCNP_CODE/MCNP611/Source/src/cgm_interface.F90
+++ MCNP_CODE/MCNP611/Source_new/src/cgm_interface.F90
diff -rN '--unified=0' MCNP611/Source/src/cgm_interface.F90 MCNP611/Source_new/src/cgm_interface.F90
--- MCNP611/Source/src/cgm_interface.F90
+++ MCNP611/Source_new/src/cgm_interface.F90
@@ -28,0 +29,4 @@
+#if __INTEL_COMPILER >= 1600
+ import :: c_funptr
+ type(c_funptr), value :: rngfunc
+#else
@@ -30,0 +35 @@
+#endif
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/charged_particle_history.F90 MCNP_CODE/MCNP611/Source_new/src/charged_particle_history.F90
--- MCNP_CODE/MCNP611/Source/src/charged_particle_history.F90
+++ MCNP_CODE/MCNP611/Source_new/src/charged_particle_history.F90
diff -rN '--unified=0' MCNP611/Source/src/charged_particle_history.F90 MCNP611/Source_new/src/charged_particle_history.F90
--- MCNP611/Source/src/charged_particle_history.F90
+++ MCNP611/Source_new/src/charged_particle_history.F90
@@ -594 +594,5 @@
- call uplpos(xt,uold,pbl%i%lev,D,v,0)
+ if (am /= one) then
+ call uplpos(xt,uold,pbl%i%lev,D,v,1)
+ else
+ call uplpos(xt,uold,pbl%i%lev,D,v,0)
+ endif
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/exemes.F90 MCNP_CODE/MCNP611/Source_new/src/exemes.F90
--- MCNP_CODE/MCNP611/Source/src/exemes.F90
+++ MCNP_CODE/MCNP611/Source_new/src/exemes.F90
diff -rN '--unified=0' MCNP611/Source/src/exemes.F90 MCNP611/Source_new/src/exemes.F90
--- MCNP611/Source/src/exemes.F90
+++ MCNP611/Source_new/src/exemes.F90
@@ -273 +273 @@
- select case( hm(js) )
+ select case( trim(hm(js)) )
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/imcn.F90 MCNP_CODE/MCNP611/Source_new/src/imcn.F90
--- MCNP_CODE/MCNP611/Source/src/imcn.F90
+++ MCNP_CODE/MCNP611/Source_new/src/imcn.F90
diff -rN '--unified=0' MCNP611/Source/src/imcn.F90 MCNP611/Source_new/src/imcn.F90
--- MCNP611/Source/src/imcn.F90
+++ MCNP611/Source_new/src/imcn.F90
@@ -36,0 +37,3 @@
+#if __INTEL_COMPILER >= 1600
+ use, intrinsic :: iso_c_binding
Expand All @@ -81,15 +81,15 @@ diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/imcn.F90 MCNP_CODE/MCNP611/S
+#else
+ call setrngcgm(rang)
+#endif
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/main.F90 MCNP_CODE/MCNP611/Source_new/src/main.F90
--- MCNP_CODE/MCNP611/Source/src/main.F90
+++ MCNP_CODE/MCNP611/Source_new/src/main.F90
diff -rN '--unified=0' MCNP611/Source/src/main.F90 MCNP611/Source_new/src/main.F90
--- MCNP611/Source/src/main.F90
+++ MCNP611/Source_new/src/main.F90
@@ -64 +64 @@
- use mcnp_env, only : HDPTH0, KOD, LODDAT, VER
+ use mcnp_env, only : hdpth0, kod, loddat, ver
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/mcnp_env.F90 MCNP_CODE/MCNP611/Source_new/src/mcnp_env.F90
--- MCNP_CODE/MCNP611/Source/src/mcnp_env.F90
+++ MCNP_CODE/MCNP611/Source_new/src/mcnp_env.F90
diff -rN '--unified=0' MCNP611/Source/src/mcnp_env.F90 MCNP611/Source_new/src/mcnp_env.F90
--- MCNP611/Source/src/mcnp_env.F90
+++ MCNP611/Source_new/src/mcnp_env.F90
@@ -0,0 +1,46 @@
+
+ module mcnp_env
Expand Down Expand Up @@ -137,9 +137,9 @@ diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/mcnp_env.F90 MCNP_CODE/MCNP6
+ write(iunit,*) ' +-----------------------------------------------------------'
+ end subroutine print_build_info
+ end module mcnp_env
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/msgtsk.F90 MCNP_CODE/MCNP611/Source_new/src/msgtsk.F90
--- MCNP_CODE/MCNP611/Source/src/msgtsk.F90
+++ MCNP_CODE/MCNP611/Source_new/src/msgtsk.F90
diff -rN '--unified=0' MCNP611/Source/src/msgtsk.F90 MCNP611/Source_new/src/msgtsk.F90
--- MCNP611/Source/src/msgtsk.F90
+++ MCNP611/Source_new/src/msgtsk.F90
@@ -80,0 +81,3 @@
+#if __INTEL_COMPILER >= 1600
+ use, intrinsic :: iso_c_binding
Expand All @@ -151,9 +151,9 @@ diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/msgtsk.F90 MCNP_CODE/MCNP611
+#else
+ call setrngcgm(rang)
+#endif
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/pblcom.F90 MCNP_CODE/MCNP611/Source_new/src/pblcom.F90
--- MCNP_CODE/MCNP611/Source/src/pblcom.F90
+++ MCNP_CODE/MCNP611/Source_new/src/pblcom.F90
diff -rN '--unified=0' MCNP611/Source/src/pblcom.F90 MCNP611/Source_new/src/pblcom.F90
--- MCNP611/Source/src/pblcom.F90
+++ MCNP611/Source_new/src/pblcom.F90
@@ -178,4 +178,6 @@
- common /pblcom_thread/ pbl, pbl_src, pbl_stack
- common /pblcom_thread/ udt, udt_stack
Expand All @@ -165,9 +165,9 @@ diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/pblcom.F90 MCNP_CODE/MCNP611
+ !$OMP THREADPRIVATE( /pblcom_thread1/ )
+ !$OMP THREADPRIVATE( /pblcom_thread2/ )
+ !$OMP THREADPRIVATE( /pblcom_thread3/ )
diff -rN '--unified=0' MCNP_CODE/MCNP611/Source/src/torus.F90 MCNP_CODE/MCNP611/Source_new/src/torus.F90
--- MCNP_CODE/MCNP611/Source/src/torus.F90
+++ MCNP_CODE/MCNP611/Source_new/src/torus.F90
diff -rN '--unified=0' MCNP611/Source/src/torus.F90 MCNP611/Source_new/src/torus.F90
--- MCNP611/Source/src/torus.F90
+++ MCNP611/Source_new/src/torus.F90
@@ -86 +86,7 @@
- if( abs(t3)<=z0 ) go to 40
+ if( abs(t3)<=z0 ) then
Expand Down
54 changes: 27 additions & 27 deletions patch/mcnp.6.1.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/import/frgcpa_.inc MCNP_CODE/MCNP6/Source_new/import/frgcpa_.inc
--- MCNP_CODE/MCNP6/Source/import/frgcpa_.inc
+++ MCNP_CODE/MCNP6/Source_new/import/frgcpa_.inc
diff -rN '--unified=0' MCNP6/Source/import/frgcpa_.inc MCNP6/Source_new/import/frgcpa_.inc
--- MCNP6/Source/import/frgcpa_.inc
+++ MCNP6/Source_new/import/frgcpa_.inc
@@ -3 +3 @@
-!$OMP THREADPRIVATE (/FRGCPA_/)
+! !$OMP THREADPRIVATE (/FRGCPA_/)
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/import/frgspa_.inc MCNP_CODE/MCNP6/Source_new/import/frgspa_.inc
--- MCNP_CODE/MCNP6/Source/import/frgspa_.inc
+++ MCNP_CODE/MCNP6/Source_new/import/frgspa_.inc
diff -rN '--unified=0' MCNP6/Source/import/frgspa_.inc MCNP6/Source_new/import/frgspa_.inc
--- MCNP6/Source/import/frgspa_.inc
+++ MCNP6/Source_new/import/frgspa_.inc
@@ -3 +3 @@
-!$OMP THREADPRIVATE (/FRGSPA_/)
+! !$OMP THREADPRIVATE (/FRGSPA_/)
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/burn_out.F90 MCNP_CODE/MCNP6/Source_new/src/burn_out.F90
--- MCNP_CODE/MCNP6/Source/src/burn_out.F90
+++ MCNP_CODE/MCNP6/Source_new/src/burn_out.F90
diff -rN '--unified=0' MCNP6/Source/src/burn_out.F90 MCNP6/Source_new/src/burn_out.F90
--- MCNP6/Source/src/burn_out.F90
+++ MCNP6/Source_new/src/burn_out.F90
@@ -418 +418 @@
- write (iuo,'(/,a,i5)') ' Material #:',nmt(matb(iq))
+ write (iuo,'(/,a,i8)') ' Material #:',nmt(matb(iq))
Expand All @@ -34,31 +34,31 @@ diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/burn_out.F90 MCNP_CODE/MCNP6/S
@@ -468 +468 @@
- write (iuo,'(/a,i4,a,i3,a,1p,e9.3,a,a,e9.3,a,//,a,/,a)') &
+ write (iuo,'(/a,i8,a,i3,a,1p,e9.3,a,a,e9.3,a,//,a,/,a)') &
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/charged_particle_history.F90 MCNP_CODE/MCNP6/Source_new/src/charged_particle_history.F90
--- MCNP_CODE/MCNP6/Source/src/charged_particle_history.F90
+++ MCNP_CODE/MCNP6/Source_new/src/charged_particle_history.F90
diff -rN '--unified=0' MCNP6/Source/src/charged_particle_history.F90 MCNP6/Source_new/src/charged_particle_history.F90
--- MCNP6/Source/src/charged_particle_history.F90
+++ MCNP6/Source_new/src/charged_particle_history.F90
@@ -580 +580,5 @@
- call uplpos(xt,uold,pbl%i%lev,D,v,0)
+ if (am /= one) then
+ call uplpos(xt,uold,pbl%i%lev,D,v,1)
+ else
+ call uplpos(xt,uold,pbl%i%lev,D,v,0)
+ endif
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/exemes.F90 MCNP_CODE/MCNP6/Source_new/src/exemes.F90
--- MCNP_CODE/MCNP6/Source/src/exemes.F90
+++ MCNP_CODE/MCNP6/Source_new/src/exemes.F90
diff -rN '--unified=0' MCNP6/Source/src/exemes.F90 MCNP6/Source_new/src/exemes.F90
--- MCNP6/Source/src/exemes.F90
+++ MCNP6/Source_new/src/exemes.F90
@@ -273 +273 @@
- select case( hm(js) )
+ select case( trim(hm(js)) )
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/main.F90 MCNP_CODE/MCNP6/Source_new/src/main.F90
--- MCNP_CODE/MCNP6/Source/src/main.F90
+++ MCNP_CODE/MCNP6/Source_new/src/main.F90
diff -rN '--unified=0' MCNP6/Source/src/main.F90 MCNP6/Source_new/src/main.F90
--- MCNP6/Source/src/main.F90
+++ MCNP6/Source_new/src/main.F90
@@ -65 +65 @@
- use mcnp_env, only : HDPTH0, KOD, LODDAT, VER
+ use mcnp_env, only : hdpth0, kod, loddat, ver
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/mcnp_env.F90 MCNP_CODE/MCNP6/Source_new/src/mcnp_env.F90
--- MCNP_CODE/MCNP6/Source/src/mcnp_env.F90
+++ MCNP_CODE/MCNP6/Source_new/src/mcnp_env.F90
diff -rN '--unified=0' MCNP6/Source/src/mcnp_env.F90 MCNP6/Source_new/src/mcnp_env.F90
--- MCNP6/Source/src/mcnp_env.F90
+++ MCNP6/Source_new/src/mcnp_env.F90
@@ -0,0 +1,14 @@
+
+ module mcnp_env
Expand All @@ -74,9 +74,9 @@ diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/mcnp_env.F90 MCNP_CODE/MCNP6/S
+ character(len=*), parameter :: hdpth0 = DPATH
+
+ end module mcnp_env
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/torus.F90 MCNP_CODE/MCNP6/Source_new/src/torus.F90
--- MCNP_CODE/MCNP6/Source/src/torus.F90
+++ MCNP_CODE/MCNP6/Source_new/src/torus.F90
diff -rN '--unified=0' MCNP6/Source/src/torus.F90 MCNP6/Source_new/src/torus.F90
--- MCNP6/Source/src/torus.F90
+++ MCNP6/Source_new/src/torus.F90
@@ -90 +90,7 @@
- if( abs(t3)<=z0 ) go to 40
+ if( abs(t3)<=z0 ) then
Expand All @@ -86,9 +86,9 @@ diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/torus.F90 MCNP_CODE/MCNP6/Sour
+ go to 40
+ endif
+ endif
diff -rN '--unified=0' MCNP_CODE/MCNP6/Source/src/trfsrf.F90 MCNP_CODE/MCNP6/Source_new/src/trfsrf.F90
--- MCNP_CODE/MCNP6/Source/src/trfsrf.F90
+++ MCNP_CODE/MCNP6/Source_new/src/trfsrf.F90
diff -rN '--unified=0' MCNP6/Source/src/trfsrf.F90 MCNP6/Source_new/src/trfsrf.F90
--- MCNP6/Source/src/trfsrf.F90
+++ MCNP6/Source_new/src/trfsrf.F90
@@ -200 +200 @@
- scf(l+1:l+3) = scf(l+1:l+3) - trf(2:3,jt)
+ scf(l+1:l+3) = scf(l+1:l+3) - trf(2:4,jt)
10 changes: 5 additions & 5 deletions regenerate_patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ versions=( 5.1.60 6.1 6.1.1beta )
for i in $(seq 0 2); do
folder=${folders[$i]}
version=${versions[$i]}
mv MCNP_CODE/${folder}/Source MCNP_CODE/${folder}/Source_new
mv MCNP_CODE/${folder}/Source_orig MCNP_CODE/${folder}/Source
diff -rN "--unified=0" MCNP_CODE/${folder}/Source MCNP_CODE/${folder}/Source_new > temp
mv MCNP_CODE/${folder}/Source MCNP_CODE/${folder}/Source_orig
mv MCNP_CODE/${folder}/Source_new MCNP_CODE/${folder}/Source
mv ${folder}/Source ${folder}/Source_new
mv ${folder}/Source_orig ${folder}/Source
diff -rN "--unified=0" ${folder}/Source ${folder}/Source_new > temp
mv ${folder}/Source ${folder}/Source_orig
mv ${folder}/Source_new ${folder}/Source
sed -e "s/.F90\t.*/.F90/" -e "s/.inc\t.*/.inc/" temp > patch/mcnp.${version}.patch
rm -f temp
done

0 comments on commit 17f57bb

Please sign in to comment.