Merge remote-tracking branch 'origin/development' into restructure-Orientation-2

This commit is contained in:
Martin Diehl 2021-07-18 15:09:40 +02:00
commit e54f032f1e
310 changed files with 382924 additions and 352504 deletions

6
.gitattributes vendored
View File

@ -12,9 +12,9 @@
*.pbz2 binary
# ignore files from MSC.Marc in language statistics
installation/mods_MarcMentat/** linguist-vendored
src/Marc/include/* linguist-vendored
installation/mods_MarcMentat/apply_DAMASK_modifications.py linguist-vendored=false
install/MarcMentat/** linguist-vendored
src/Marc/include/* linguist-vendored
install/MarcMentat/apply_DAMASK_modifications.py linguist-vendored=false
# ignore reference files for tests in language statistics
python/tests/reference/** linguist-vendored

View File

@ -3,6 +3,7 @@ stages:
- prepare
- python
- compile
- setup
- fortran
- performance
- deploy
@ -63,9 +64,9 @@ variables:
PETSc_Intel: "$PETSc3_14_2IMPI2020Intel19_1"
PETSc_GNU: "$PETSc3_14_2OMPI4_0GNU10"
# ++++++++++++ commercial FEM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MSC2020: "FEM/MSC/2020"
MSC2021: "FEM/MSC/2021.2"
# ------------ Defaults ----------------------------------------------
MSC: "$MSC2020"
MSC: "$MSC2021"
IntelMarc: "$IntelCompiler19_1"
HDF5Marc: "HDF5/1.12.0/Intel-19.1.2"
@ -82,11 +83,10 @@ checkout:
- mkdir -p $DAMASKROOT
- mkdir -p $TESTROOT
- cd $DAMASKROOT
- git clone -q git@magit1.mpie.de:damask/DAMASK.git .
- git clone -q git@git.damask.mpie.de:damask/DAMASK.git .
- git checkout $CI_COMMIT_SHA
- git submodule update --init
- source env/DAMASK.sh
- ./installation/symlink_Processing.py
except:
- master
- release
@ -161,8 +161,10 @@ compile_Marc:
- master
- release
###################################################################################################
setup_grid:
stage: compile
stage: setup
script:
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
- BUILD_DIR=$(mktemp -d)
@ -174,7 +176,7 @@ setup_grid:
- release
setup_mesh:
stage: compile
stage: setup
script:
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
- BUILD_DIR=$(mktemp -d)
@ -196,22 +198,13 @@ core:
- master
- release
Phenopowerlaw_singleSlip:
stage: fortran
script: Phenopowerlaw_singleSlip/test.py
except:
- master
- release
J2_plasticBehavior:
stage: fortran
script:
- module load $IntelMarc $HDF5Marc $MSC
- MSC_VERSION=2020 J2_plasticBehavior/test.py
except:
- master
- release
# Needs closer look
# Phenopowerlaw_singleSlip:
# stage: fortran
# script: Phenopowerlaw_singleSlip/test.py
# except:
# - master
# - release
###################################################################################################
SpectralRuntime:
@ -265,8 +258,10 @@ merge_into_master:
script:
- cd $DAMASKROOT
- export TESTEDREV=$(git describe) # might be detached from development branch
- echo $TESTEDREV > VERSION
- git commit VERSION -m "[skip ci] updated version information after successful test of $TESTEDREV"
- echo $TESTEDREV > python/damask/VERSION
- >
git diff-index --quiet HEAD ||
git commit python/damask/VERSION -m "[skip ci] updated version information after successful test of $TESTEDREV"
- export UPDATEDREV=$(git describe) # tested state + 1 commit
- git checkout master
- git merge $UPDATEDREV -s recursive -X ours # conflicts occur only for inconsistent state

View File

@ -15,27 +15,27 @@ pkg_get_variable (CMAKE_Fortran_COMPILER PETSc fcompiler)
pkg_get_variable (CMAKE_C_COMPILER PETSc ccompiler)
# Solver determines name of project
string(TOLOWER "${DAMASK_SOLVER}" DAMASK_SOLVER)
if (DAMASK_SOLVER STREQUAL "grid")
string(TOUPPER "${DAMASK_SOLVER}" DAMASK_SOLVER)
if (DAMASK_SOLVER STREQUAL "GRID")
project (damask-grid HOMEPAGE_URL https://damask.mpie.de LANGUAGES Fortran C)
add_definitions (-DGrid)
elseif (DAMASK_SOLVER STREQUAL "mesh")
elseif (DAMASK_SOLVER STREQUAL "MESH")
project (damask-mesh HOMEPAGE_URL https://damask.mpie.de LANGUAGES Fortran C)
add_definitions (-DMesh)
else ()
message (FATAL_ERROR "Build target (DAMASK_SOLVER) is not defined")
message (FATAL_ERROR "Invalid solver: DAMASK_SOLVER=${DAMASK_SOLVER}")
endif ()
add_definitions ("-D${DAMASK_SOLVER}")
file (STRINGS ${PROJECT_SOURCE_DIR}/VERSION DAMASK_VERSION)
message ("\nBuilding ${CMAKE_PROJECT_NAME} ${DAMASK_VERSION}\n")
add_definitions (-DPETSc)
add_definitions (-DPETSC)
add_definitions (-DDAMASKVERSION="${DAMASK_VERSION}")
if (CMAKE_BUILD_TYPE STREQUAL "")
set (CMAKE_BUILD_TYPE "RELEASE")
endif ()
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
# Predefined sets for OPTIMIZATION/OPENMP based on BUILD_TYPE
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
@ -45,9 +45,15 @@ if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
elseif (CMAKE_BUILD_TYPE STREQUAL "RELEASE")
set (PARALLEL "ON")
set (OPTI "DEFENSIVE")
elseif (CMAKE_BUILD_TYPE STREQUAL "DEBUGRELEASE")
set (DEBUG_FLAGS "${DEBUG_FLAGS} -DDEBUG")
set (PARALLEL "ON")
set (OPTI "DEFENSIVE")
elseif (CMAKE_BUILD_TYPE STREQUAL "PERFORMANCE")
set (PARALLEL "ON")
set (OPTI "AGGRESSIVE")
else ()
message (FATAL_ERROR "Invalid build type: CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
endif ()
# $OPTIMIZATION takes precedence over $BUILD_TYPE defaults

View File

@ -56,15 +56,12 @@ echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
echo System report for \'$(hostname)\' created on $(date '+%Y-%m-%d %H:%M:%S') by \'$(whoami)\'
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
firstLevel "DAMASK settings"
firstLevel "DAMASK"
secondLevel "DAMASK_ROOT"
echo $DAMASK_ROOT
echo
secondLevel "Version"
cat VERSION
echo
secondLevel "Settings in CONFIG"
cat env/CONFIG
firstLevel "System"
uname -a
@ -75,20 +72,26 @@ echo PYTHONPATH: $PYTHONPATH
echo SHELL: $SHELL
echo PETSC_ARCH: $PETSC_ARCH
echo PETSC_DIR: $PETSC_DIR
ls $PETSC_DIR/lib
echo
echo $PETSC_DIR/$PETSC_ARCH/lib:
/s $PETSC_DIR/$PETSC_ARCH/lib
echo
echo $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables:
cat $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
firstLevel "Python"
DEFAULT_PYTHON=python3
for executable in python python3; do
getDetails $executable '--version'
for EXECUTABLE in python python3; do
getDetails $EXECUTABLE '--version'
done
secondLevel "Details on $DEFAULT_PYTHON:"
echo $(ls -la $(which $DEFAULT_PYTHON))
for module in numpy scipy pandas matplotlib yaml h5py;do
for MODULE in numpy scipy pandas matplotlib yaml h5py;do
thirdLevel $module
$DEFAULT_PYTHON -c "import $module; \
print('Version: {}'.format($module.__version__)); \
print('Location: {}'.format($module.__file__))"
$DEFAULT_PYTHON -c "import $MODULE; \
print('Version: {}'.format($MODULE.__version__)); \
print('Location: {}'.format($MODULE.__file__))"
done
thirdLevel vtk
$DEFAULT_PYTHON -c "import vtk; \
@ -96,23 +99,23 @@ $DEFAULT_PYTHON -c "import vtk; \
print('Location: {}'.format(vtk.__file__))"
firstLevel "GNU Compiler Collection"
for executable in gcc g++ gfortran ;do
getDetails $executable '--version'
for EXECUTABLE in gcc g++ gfortran ;do
getDetails $EXECUTABLE '--version'
done
firstLevel "Intel Compiler Suite"
for executable in icc icpc ifort ;do
getDetails $executable '--version'
for EXECUTABLE in icc icpc ifort ;do
getDetails $EXECUTABLE '--version'
done
firstLevel "MPI Wrappers"
for executable in mpicc mpiCC mpiicc mpic++ mpiicpc mpicxx mpifort mpiifort mpif90 mpif77; do
getDetails $executable '-show'
for EXECUTABLE in mpicc mpiCC mpiicc mpic++ mpiicpc mpicxx mpifort mpiifort mpif90 mpif77; do
getDetails $EXECUTABLE '-show'
done
firstLevel "MPI Launchers"
for executable in mpirun mpiexec; do
getDetails $executable '--version'
for EXECUTABLE in mpirun mpiexec; do
getDetails $EXECUTABLE '--version'
done
firstLevel "CMake"

View File

@ -9,13 +9,13 @@ all: grid mesh
.PHONY: grid
grid:
@cmake -B build/grid -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
@cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
@cmake --build build/grid --parallel
@cmake --install build/grid
.PHONY: mesh
mesh:
@cmake -B build/mesh -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
@cmake -B build/mesh -DDAMASK_SOLVER=mesh -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
@cmake --build build/mesh --parallel
@cmake --install build/mesh

@ -1 +1 @@
Subproject commit 185cb53be76eded17565c5fa91bd9b4499cda4b8
Subproject commit 8fec909d1931b092b223b0560dd30c3339c6e5a7

View File

@ -1 +0,0 @@
v3.0.0-alpha3-214-g6f9e521cd

1
VERSION Symbolic link
View File

@ -0,0 +1 @@
python/damask/VERSION

View File

@ -9,19 +9,19 @@ phase:
lattice: cF
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {type: Hooke, C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9}
elastic: {type: Hooke, C_11: 106.75e+9, C_12: 60.41e+9, C_44: 28.34e+9}
plastic:
type: phenopowerlaw
N_sl: [12]
a_sl: 2.25
atol_xi: 1.0
dot_gamma_0_sl: 0.001
h_0_sl_sl: 75e6
h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
h_0_sl-sl: 75.e+6
h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
n_sl: 20
output: [xi_sl]
xi_0_sl: [31e6]
xi_inf_sl: [63e6]
xi_0_sl: [31.e+6]
xi_inf_sl: [63.e+6]
material:
- homogenization: SX

View File

@ -14,7 +14,7 @@ $no list
large stra 2 1 0 0 0 0 0
all points
no echo 1 2 3 4
state vars 3
state vars 2
end
$...................
solver
@ -269,7 +269,7 @@ coordinates
163 3.999999999999999+1 9.999999999999996+0-5.000000000000000-1
164 3.999999999999999+1 9.999999999999996+0 0.000000000000000+0
165 3.999999999999999+1 9.999999999999996+0 5.000000000000000-1
define element set Material_Nummer_elements
define element set DAMASK_elements
1 to 80
define node set unten_y_nodes
2 5 8 11 14
@ -283,8 +283,6 @@ define node set unten_z_nodes
7 to 9
define node set oben_z_nodes
157 to 159
define element set texture_elements
1 to 80
hypoelastic
1 0 1 0 1TKS 0
@ -346,22 +344,14 @@ unten_fest_nodes
oben_ziehen_nodes
initial state
2 6 1 0 0 0Material_Nummer
1.000000000000000+0
2 6 1 0 0 0DAMASK
0.000000000000000+0
0
1
Material_Nummer_elements
initial state
3 6 1 0 0 0texture
1.000000000000000+0
0
1
texture_elements
DAMASK_elements
loadcase r-value
5
Material_Nummer
texture
DAMASK
unten_z
unten_y
unten_fest

View File

@ -1,2 +0,0 @@
(kinematics) thermal_expansion
thermal_expansion11 0.0000231

View File

@ -6,21 +6,8 @@ plasticity disloucla
(output) dipole_density
(output) shear_rate_slip
(output) accumulated_shear_slip
(output) mfp_slip
(output) resolved_stress_slip
(output) threshold_stress_slip
(output) twin_fraction
(output) shear_rate_twin
(output) accumulated_shear_twin
(output) mfp_twin
(output) resolved_stress_twin
(output) threshold_stress_twin
### Material parameters ###
lattice_structure bcc
C11 523.0e9 # From Marinica et al. Journal of Physics: Condensed Matter(2013)
C12 202.0e9
C44 161.0e9
grainsize 2.7e-5 # Average grain size [m] 2.0e-5
SolidSolutionStrength 0.0 # Strength due to elements in solid solution

View File

@ -1,41 +1,31 @@
TWIP_Steel_FeMnC:
lattice: cF
mechanical:
elastic: {type: Hooke, C_11: 175.0e9, C_12: 115.0e9, C_44: 135.0e9}
plastic:
type: dislotwin
output: [rho_mob, rho_dip, gamma_sl, Lambda_sl, tau_pass, f_tw, Lambda_tw, tau_hat_tw, f_tr]
D: 2.0e-5
N_sl: [12]
b_sl: [2.56e-10]
rho_mob_0: [1.0e12]
rho_dip_0: [1.0]
v_0: [1.0e4]
Q_s: [3.7e-19]
p_sl: [1.0]
q_sl: [1.0]
tau_0: [1.5e8]
i_sl: [10.0] # Adj. parameter controlling dislocation mean free path
D_0: 4.0e-5 # Vacancy diffusion prefactor / m^2/s
D_a: 1.0 # minimum dipole distance / b
Q_cl: 4.5e-19 # Activation energy for climb / J
h_sl_sl: [0.122, 0.122, 0.625, 0.07, 0.137, 0.137, 0.122] # Interaction coefficients (Kubin et al. 2008)
# shear band parameters
xi_sb: 180.0e6
Q_sb: 3.7e-19
p_sb: 1.0
q_sb: 1.0
v_sb: 0.0 # set to 0, to turn it off
type: dislotwin
output: [rho_mob, rho_dip, gamma_sl, Lambda_sl, tau_pass, f_tw, Lambda_tw, tau_hat_tw, f_tr]
D: 2.0e-5
N_sl: [12]
b_sl: [2.56e-10]
rho_mob_0: [1.0e+12]
rho_dip_0: [1.0]
v_0: [1.0e+4]
Q_s: [3.7e-19]
p_sl: [1.0]
q_sl: [1.0]
tau_0: [1.5e+8]
i_sl: [10.0] # Adj. parameter controlling dislocation mean free path
D_0: 4.0e-5 # Vacancy diffusion prefactor / m^2/s
D_a: 1.0 # minimum dipole distance / b
Q_cl: 4.5e-19 # Activation energy for climb / J
h_sl-sl: [0.122, 0.122, 0.625, 0.07, 0.137, 0.137, 0.122] # Interaction coefficients (Kubin et al. 2008)
# twinning parameters
N_tw: [12]
b_tw: [1.47e-10] # Burgers vector length of twin system / b
t_tw: [5.0e-8] # Twin stack mean thickness / m
L_tw: 442.0 # Length of twin nuclei / b
x_c_tw: 1.0e-9 # critical distance for formation of twin nucleus / m
V_cs: 1.67e-29 # cross slip volume / m^3
p_tw: [10.0] # r-exponent in twin formation probability
i_tw: 1.0 # Adj. parameter controlling twin mean free path
h_sl_tw: [0.0, 1.0, 1.0] # dislocation-twin interaction coefficients
h_tw_tw: [0.0, 1.0] # twin-twin interaction coefficients
Gamma_sf_0K: -0.0396 # stacking fault energy / J/m^2 at zero K; TWIP steel: -0.0526; Cu: -0.0396
dGamma_sf_dT: 0.0002 # temperature dependence / J/(m^2 K) of stacking fault energy
N_tw: [12]
b_tw: [1.47e-10] # Burgers vector length of twin system / b
t_tw: [5.0e-8] # Twin stack mean thickness / m
L_tw: 442.0 # Length of twin nuclei / b
x_c_tw: 1.0e-9 # critical distance for formation of twin nucleus / m
V_cs: 1.67e-29 # cross slip volume / m^3
p_tw: [10.0] # r-exponent in twin formation probability
i_tw: 1.0 # Adj. parameter controlling twin mean free path
h_sl-tw: [0.0, 1.0, 1.0] # dislocation-twin interaction coefficients
h_tw-tw: [0.0, 1.0] # twin-twin interaction coefficients
T_ref: 0.0
Gamma_sf: -0.0396 # stacking fault energy / J/m^2 at zero K; TWIP steel: -0.0526; Cu: -0.0396
Gamma_sf,T: 0.0002 # temperature dependence / J/(m^2 K) of stacking fault energy

View File

@ -1,21 +0,0 @@
Tungsten:
lattice: cI
mechanical:
elastic: {type: Hooke, C_11: 523.0e9, C_12: 202.0e9, C_44: 161.0e9} # Marinica et al. Journal of Physics: Condensed Matter(2013)
plastic:
type: dislotwin
D: 2.0e-5 # Average grain size / m
N_sl: [12]
b_sl: [2.72e-10] # Burgers vector length of slip families / m
rho_mob_0: [1.0e12]
rho_dip_0: [1.0]
v_0: [1.0e4] # Initial glide velocity / m/s
Q_s: [2.725e-19] # Activation energy for dislocation glide / J
p_sl: [0.78] # p-exponent in glide velocity
q_sl: [1.58] # q-exponent in glide velocity
tau_0: [1.5e8] # solid solution strength / Pa
i_sl: [10.0] # Adj. parameter controlling dislocation mean free path
D_0: 4.0e-5 # Vacancy diffusion prefactor / m^2/s
D_a: 1.0 # minimum dipole distance / b
Q_cl: 4.5e-19 # Activation energy for climb / J
h_sl_sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4]

View File

@ -1,16 +0,0 @@
FreeSurface:
lattice: cI
mechanical:
output: [F, P, F_e, F_p, L_p]
elastic: {type: Hooke, C_11: 1e8, C_12: 1e6, C_44: 4.95e7}
plastic:
type: isotropic
output: [xi]
xi_0: 0.3e6
xi_inf: 0.6e6
dot_gamma_0: 0.001
n: 5
M: 3
h_0: 1e6
a: 2
dilatation: True

View File

@ -1,63 +0,0 @@
[Aluminum]
plasticity nonlocal
/nonlocal/
(output) rho_sgl_mob_edg_pos
(output) rho_sgl_imm_edg_pos
(output) rho_sgl_mob_edg_neg
(output) rho_sgl_imm_edg_neg
(output) rho_sgl_mob_scr_pos
(output) rho_sgl_imm_scr_pos
(output) rho_sgl_mob_scr_neg
(output) rho_sgl_imm_scr_neg
(output) rho_dip_edg
(output) rho_dip_scr
(output) rho_forest
(output) gamma
(output) tau_pass
(output) v_edg_pos
(output) v_edg_neg
(output) v_scr_pos
(output) v_scr_neg
lattice_structure fcc
Nslip 12 # number of slip systems
burgers 2.86e-10 # Burgers vector in m
rhoSglEdgePos0 0.25e10 # Initial positive edge single dislocation density in m/m**3 (per slip family)
rhoSglEdgeNeg0 0.25e10 # Initial negative edge single dislocation density in m/m**3 (per slip family)
rhoSglScrewPos0 0.25e10 # Initial positive screw single dislocation density in m/m**3 (per slip family)
rhoSglScrewNeg0 0.25e10 # Initial negative screw single dislocation density in m/m**3 (per slip family)
rhoDipEdge0 1e8 # Initial edge dipole dislocation density in m/m**3 (per slip family)
rhoDipScrew0 1e8 # Initial screw dipole dislocation density in m/m**3 (per slip family)
rhoSglScatter 0 # standard deviation of scatter in initial single dislocation density
#rhoSglRandom 1e12 # randomly distributed total dislocation density (sum over all slip systems and types) in m/m**3
#rhoSglRandomBinning 1 # binning size of randomly distributed dislocations (number of dislocations per ip volume)
minimumDipoleHeightEdge 2e-9 # minimum distance for stable edge dipoles in m (per slip family)
minimumDipoleHeightScrew 2e-9 # minimum distance for stable screw dipoles in m (per slip family)
lambda0 80 # prefactor for mean free path
edgeMultiplication 0.1 # factor to which edges contribute to multiplication
atomicVolume 1.7e-29 # atomic volume in m**3
selfdiffusionPrefactor 1e-4 # prefactor for self-diffusion coefficient in m**2/s
selfdiffusionEnergy 2.3e-19 # activation enthalpy for seld-diffusion in J
solidSolutionEnergy 2e-19 # activation energy of solid solution particles in J
solidSolutionConcentration 1e-5 # concentration of solid solution in parts per b^3
solidSolutionSize 2 # size of solid solution obstacles in multiples of burgers vector length
peierlsStressEdge 1e5 # Peierls stress for edges in Pa (per slip family)
peierlsStressScrew 1e5 # Peierls stress for screws in Pa (per slip family)
doublekinkWidth 10 # width of double kinks in multiples of burgers vector length b
viscosity 1e-4 # viscosity for dislocation glide in Pa s
p 1 # exponent for thermal barrier profile
q 1 # exponent for thermal barrier profile
attackFrequency 50e9 # attack frequency in Hz
surfaceTransmissivity 1.0 # transmissivity of free surfaces for dislocation flux
grainboundaryTransmissivity 0.0 # transmissivity of grain boundaries for dislocation flux (grain bundaries are identified as interfaces with different textures on both sides); if not set or set to negative number, the subroutine automatically determines the transmissivity at the grain boundary
interaction_SlipSlip 0 0 0.625 0.07 0.137 0.137 0.122 # Dislocation interaction coefficient
linetension 0.8 # constant indicating the effect of the line tension on the hardening coefficients (0 to 1)
edgejog 1.0 # fraction of annihilated screw dipoles that forms edge jogs (0 to 1)
shortRangeStressCorrection 0 # switch for use of short range correction stress
cutoffRadius 1e-3 # cutoff radius for dislocation stress in m
CFLfactor 2.0 # safety factor for CFL flux check (numerical parameter)
significantRho 1e6 # minimum dislocation density considered relevant in m/m**3
#significantN 0.1 # minimum dislocation number per ip considered relevant
randomMultiplication 0 # switch for probabilistic extension of multiplication rate

View File

@ -1,62 +0,0 @@
[Ni_nonlocal]
elasticity hooke
plasticity nonlocal
/nonlocal/
(output) rho_sgl_mob_edg_pos
(output) rho_sgl_imm_edg_pos
(output) rho_sgl_mob_edg_neg
(output) rho_sgl_imm_edg_neg
(output) rho_sgl_mob_scr_pos
(output) rho_sgl_imm_scr_pos
(output) rho_sgl_mob_scr_neg
(output) rho_sgl_imm_scr_neg
(output) rho_dip_edg
(output) rho_dip_scr
(output) rho_forest
(output) gamma
(output) tau_pass
(output) v_edg_pos
(output) v_edg_neg
(output) v_scr_pos
(output) v_scr_neg
lattice_structure fcc
Nslip 12 # number of slip systems per family
burgers 2.48e-10 # Burgers vector in m
rhoSglEdgePos0 6e10 # Initial positive edge single dislocation density in m/m**3
rhoSglEdgeNeg0 6e10 # Initial negative edge single dislocation density in m/m**3
rhoSglScrewPos0 6e10 # Initial positive screw single dislocation density in m/m**3
rhoSglScrewNeg0 6e10 # Initial negative screw single dislocation density in m/m**3
rhoDipEdge0 0 # Initial edge dipole dislocation density in m/m**3
rhoDipScrew0 0 # Initial screw dipole dislocation density in m/m**3
rhoSglScatter 0
minimumDipoleHeightEdge 2.6e-9 # 3.0e-9 # minimum distance for stable edge dipoles in m
minimumDipoleHeightScrew 12.0e-9 # 50e-9 # minimum distance for stable screw dipoles in m
lambda0 45 # 33 # prefactor for mean free path
edgeMultiplication 0.1
randomMultiplication 0
atomicVolume 1.2e-29
selfdiffusionPrefactor 1.9e-4 # Gottstein p.168 # prefactor for self-diffusion coefficient
selfdiffusionEnergy 5.1e-19 # Gottstein p.168 # activation energy self-diffusion
solidSolutionEnergy 1.8e-19 # activation energy of solid solution particles in J
solidSolutionConcentration 5e-7 # 1e-7
solidSolutionSize 1.0
peierlsStressEdge 1e5 # Peierls stress for edges in Pa (per slip family)
peierlsStressScrew 1e5 # Peierls stress for screws in Pa (per slip family)
doublekinkWidth 10 # width of double kinks in multiples of burgers vector length b
viscosity 1e-3 # viscosity for dislocation glide in Pa s
p 1 # exponent for thermal barrier profile
q 1 # exponent for thermal barrier profile
attackFrequency 50e9 # attack frequency in Hz
surfaceTransmissivity 1.0 # transmissivity of free surfaces for dislocation flux
grainBoundaryTransmissivity 0.0
significantRho 1e8 # dislocation density considered relevant in m/m**3
significantN 1
shortRangeStressCorrection 0
CFLfactor 1.1 # safety factor for CFL flux check (numerical parameter)
r 1
interaction_SlipSlip 0 0 0.625 0.07 0.137 0.137 0.122 # Dislocation interaction coefficient
linetension 0.8
edgejog 0.01 # 0.2

View File

@ -1,16 +0,0 @@
Aluminum:
lattice: cF
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: Hooke}
plastic:
N_sl: [12]
a_sl: 2.25
dot_gamma_0_sl: 0.001
h_0_sl_sl: 75e6
h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
n_sl: 20
output: [xi_sl, gamma_sl]
type: phenopowerlaw
xi_0_sl: [31e6]
xi_inf_sl: [63e6]

View File

@ -1,17 +0,0 @@
# Tasan et.al. 2015 Acta Materalia
# Tasan et.al. 2015 International Journal of Plasticity
# Diehl et.al. 2015 Meccanica
Ferrite:
lattice: cI
mechanical:
elastic: {C_11: 233.3e9, C_12: 135.5e9, C_44: 118.0e9, type: Hooke}
plastic:
N_sl: [12, 12]
a_sl: 2.0
dot_gamma_0_sl: 0.001
h_0_sl_sl: 1000.0e6
h_sl_sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4]
n_sl: 20
type: phenopowerlaw
xi_0_sl: [95.e6, 96.e6]
xi_inf_sl: [222.e6, 412.7e6]

View File

@ -4,14 +4,14 @@
Martensite:
lattice: cI
mechanical:
elastic: {C_11: 417.4e9, C_12: 242.4e9, C_44: 211.1e9, type: Hooke}
elastic: {C_11: 417.4e+9, C_12: 242.4e+9, C_44: 211.1e+9, type: Hooke}
plastic:
N_sl: [12, 12]
a_sl: 2.0
dot_gamma_0_sl: 0.001
h_0_sl_sl: 563.0e9
h_sl_sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4]
h_0_sl-sl: 563.0e+9
h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4]
n_sl: 20
type: phenopowerlaw
xi_0_sl: [405.8e6, 456.7e6]
xi_inf_sl: [872.9e6, 971.2e6]
xi_0_sl: [405.8e+6, 456.7e+6]
xi_inf_sl: [872.9e+6, 971.2e+6]

View File

@ -1,28 +1,20 @@
# Tromans 2011, Elastic Anisotropy of HCP Metal Crystals and Polycrystals
Magnesium:
lattice: hP
c/a: 1.62350
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {C_11: 59.3e9, C_12: 25.7e9, C_13: 21.4e9, C_33: 61.5e9, C_44: 16.4e9, type: Hooke}
plastic:
N_sl: [3, 3, 0, 6, 0, 6]
N_tw: [6, 0, 0, 6]
h_0_tw_tw: 50.0e6
h_0_sl_sl: 500.0e6
h_0_tw_sl: 150.0e6
h_sl_sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
h_tw_tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
h_sl_tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
h_tw_sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
output: [xi_sl, xi_tw]
type: phenopowerlaw
xi_0_sl: [10.0e6, 55.0e6, 0, 60.0e6, 0.0, 60.0e6]
xi_inf_sl: [40.0e6, 135.0e6, 0, 150.0e6, 0.0, 150.0e6]
xi_0_tw: [40e6, 0.0, 0.0, 60.0e6]
a_sl: 2.25
dot_gamma_0_sl: 0.001
dot_gamma_0_tw: 0.001
n_sl: 20
n_tw: 20
f_sat_sl_tw: 10.0
N_sl: [3, 3, 0, 6, 0, 6]
N_tw: [6, 0, 0, 6]
h_0_tw-tw: 50.0e+6
h_0_sl-sl: 500.0e+6
h_0_tw-sl: 150.0e+6
h_sl-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
h_tw-tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
h_sl-tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
h_tw-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
output: [xi_sl, xi_tw]
type: phenopowerlaw
xi_0_sl: [10.e+6, 55.e+6, 0., 60.e+6, 0., 60.e+6]
xi_inf_sl: [40.e+6, 135.e+6, 0., 150.e+6, 0., 150.e+6]
xi_0_tw: [40.e+6, 0., 0., 60.e+6]
a_sl: 2.25
dot_gamma_0_sl: 0.001
dot_gamma_0_tw: 0.001
n_sl: 20
n_tw: 20
f_sat_sl-tw: 10.0

View File

@ -1,20 +0,0 @@
# M. Levy, Handbook of Elastic Properties of Solids, Liquids, and Gases (2001)
# C. Zambaldi, "Orientation informed nanoindentation of a-titanium: Indentation pileup in hexagonal metals deforming by prismatic slip", J. Mater. Res., Vol. 27, No. 1, Jan 14, 2012
# Better use values from L. Wang, Z. Zheng, H. Phukan, P. Kenesei, J.-S. Park, J. Lind, R.M. Suter, T.R. Bieler, Direct measurement of critical resolved shear stress of prismatic and basal slip in polycrystalline Ti using high energy X-ray diffraction microscopy, Acta Mater 2017
cpTi:
lattice: hP
c/a: 1.587
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {C_11: 160.0e9, C_12: 90.0e9, C_13: 66.0e9, C_33: 181.7e9, C_44: 46.5e9, type: Hooke}
plastic:
N_sl: [3, 3, 0, 6, 12]
a_sl: 2.0
dot_gamma_0_sl: 0.001
h_0_sl_sl: 200e6
h_sl_sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
n_sl: 20
output: [gamma_sl]
type: phenopowerlaw
xi_0_sl: [0.15e9, 0.09e9, 0, 0.20e9, 0.25e9]
xi_inf_sl: [0.24e9, 0.5e9, 0, 0.6e9, 0.8e9]

View File

@ -6,5 +6,5 @@
a_g: [0.0, 0.0, 0.0]
c_alpha: 2.0
cluster_size: [2, 2, 2]
output: [M, Delta_V, avg_a_dot, max_a_dot]
output: [M, Delta_V, avg_dot_a, max_dot_a]
xi_alpha: 10.0

View File

@ -30,7 +30,7 @@ grid:
eps_div_rtol: 5.0e-4 # relative tolerance for fulfillment of stress equilibrium
eps_curl_atol: 1.0e-12 # absolute tolerance for fulfillment of strain compatibility
eps_curl_rtol: 5.0e-4 # relative tolerance for fulfillment of strain compatibility
eps_stress_atol: 1.0e3 # absolute tolerance for fulfillment of stress BC
eps_stress_atol: 1.0e+3 # absolute tolerance for fulfillment of stress BC
eps_stress_rtol: 0.01 # relative tolerance for fulfillment of stress BC
eps_damage_atol: 1.0e-2 # absolute tolerance for damage evolution
eps_damage_rtol: 1.0e-6 # relative tolerance for damage evolution

View File

@ -1,4 +1,4 @@
references:
- en.wikipedia.org/wiki/Aluminium
- https://en.wikipedia.org/wiki/Aluminium
lattice: cF
rho: 2700.0

View File

@ -1,4 +1,4 @@
references:
- en.wikipedia.org/wiki/Gold
- https://en.wikipedia.org/wiki/Gold
lattice: cF
rho: 19300.0

View File

@ -1,4 +1,4 @@
references:
- en.wikipedia.org/wiki/Copper
- https://en.wikipedia.org/wiki/Copper
lattice: cF
rho: 8960.0

View File

@ -1,4 +1,4 @@
references:
- en.wikipedia.org/wiki/Iron
- https://en.wikipedia.org/wiki/Iron
lattice: cI
rho: 7874.0

View File

@ -0,0 +1,7 @@
references:
- D. Tromans,
International Journal of Recent Research and Applied Studies 6(4):462-483, 2011,
https://www.arpapress.com/Volumes/Vol6Issue4/IJRRAS_6_4_14.pdf
lattice: hP
c/a: 1.62350
rho: 1740.0

View File

@ -1,4 +1,4 @@
references:
- en.wikipedia.org/wiki/Nickel
- https://en.wikipedia.org/wiki/Nickel
lattice: cF
rho: 8908.0

View File

@ -1,6 +1,6 @@
references:
- www.totalmateria.com/page.aspx?ID=CheckArticle&site=ktn&NM=221
- en.wikipedia.org/wiki/Titanium
- https://www.totalmateria.com/page.aspx?ID=CheckArticle&site=ktn&NM=221
- https://en.wikipedia.org/wiki/Titanium
lattice: hP
c/a: 1.587
rho: 4506.0

View File

@ -1,4 +1,4 @@
references:
- en.wikipedia.org/wiki/Tungsten
- https://en.wikipedia.org/wiki/Tungsten
lattice: cF
rho: 19300.0

View File

@ -1,11 +1,11 @@
type: anisobrittle
N_cl: [3]
g_crit: [0.50e7]
g_crit: [0.5e+7]
s_crit: [0.006666]
dot_o: 1e-3
dot_o: 1.e-3
q: 20
output: [f_phi]
D_11: 1.0
M: 0.001
K_11: 1.0
mu: 0.001

View File

@ -5,5 +5,5 @@ isoBrittle_atol: 0.01
output: [f_phi]
D_11: 1.0
M: 0.001
K_11: 1.0
mu: 0.001

View File

@ -1,5 +1,5 @@
type: thermalexpansion
references:
- en.wikipedia.org/wiki/Thermal_expansion
A_11: [23.1e-6]
- https://en.wikipedia.org/wiki/Thermal_expansion
A_11: 23.1e-6
T_ref: 293.15

View File

@ -1,5 +1,5 @@
type: thermalexpansion
references:
- en.wikipedia.org/wiki/Thermal_expansion
A_11: [14e-6]
- https://en.wikipedia.org/wiki/Thermal_expansion
A_11: 14.e-6
T_ref: 293.15

View File

@ -1,5 +1,8 @@
type: thermalexpansion
references:
- en.wikipedia.org/wiki/Thermal_expansion, fitted from image description
A_11: [12.70371e-6, 7.54e-9, -1.0e-11]
- https://commons.wikimedia.org/wiki/File:Coefficient_dilatation_lineique_aciers.svg,
fitted from image description (Scilab code)
A_11: 12.70371e-6
A_11,T: 7.54e-9
A_11,T^2: -1.0e-11
T_ref: 273.0

View File

@ -1,5 +1,5 @@
type: thermalexpansion
references:
- en.wikipedia.org/wiki/Thermal_expansion
A_11: [17e-6]
- https://en.wikipedia.org/wiki/Thermal_expansion
A_11: 17.e-6
T_ref: 293.15

View File

@ -1,5 +1,5 @@
type: thermalexpansion
references:
- en.wikipedia.org/wiki/Thermal_expansion
A_11: [11.8e-6]
- https://en.wikipedia.org/wiki/Thermal_expansion
A_11: 11.8e-6
T_ref: 293.15

View File

@ -1,5 +1,5 @@
type: thermalexpansion
references:
- en.wikipedia.org/wiki/Thermal_expansion
A_11: [4.5e-6]
- https://en.wikipedia.org/wiki/Thermal_expansion
A_11: 4.5e-6
T_ref: 293.15

View File

@ -1,5 +1,7 @@
type: thermalexpansion
references:
- en.wikipedia.org/wiki/Thermal_expansion, fitted from image description
A_11: [11.365e-6, 5.0e-9]
- https://commons.wikimedia.org/wiki/File:Coefficient_dilatation_lineique_aciers.svg
fitted from image description (Scilab code)
A_11: 11.365e-6
A_11,T: 5.0e-9
T_ref: 273.0

View File

@ -1,8 +1,8 @@
type: Hooke
references:
- J. Vallin et al.,
Journal of Applied Physics 35(6), 1825-1826, 1964,
10.1063/1.1713749
C_11: 107.3e9
C_12: 60.8e9
C_44: 28.3e9
Journal of Applied Physics 35(6):1825-1826, 1964,
https://doi.org/10.1063/1.1713749
C_11: 107.3e+9
C_12: 60.8e+9
C_44: 28.3e+9

View File

@ -2,7 +2,8 @@ type: Hooke
references:
- J.P. Hirth and J. Lothe,
Theory of Dislocations, 1982,
John Wiley & Sons
C_11: 186e9
C_12: 157e9
C_44: 42e9
John Wiley & Sons,
page 837
C_11: 186.e+9
C_12: 157.e+9
C_44: 42.e+9

View File

@ -1,6 +1,7 @@
type: Hooke
references:
- www.mit.edu/~6.777/matprops/copper.htm, fixed typo
C_11: 168.3e9
C_12: 122.1e9
C_44: 75.7e9
- https://www.mit.edu/~6.777/matprops/copper.htm,
fixed typo
C_11: 168.3e+9
C_12: 122.1e+9
C_44: 75.7e+9

View File

@ -2,7 +2,8 @@ type: Hooke
references:
- J.P. Hirth and J. Lothe,
Theory of Dislocations, 1982,
John Wiley & Sons
C_11: 242e9
C_12: 146.5e9
C_44: 11.2e9
John Wiley & Sons,
page 837
C_11: 242.e9
C_12: 146.5e+9
C_44: 112.e9

View File

@ -0,0 +1,10 @@
type: Hooke
references:
- D. Tromans,
International Journal of Recent Research and Applied Studies 6(4):462-483, 2011,
https://www.arpapress.com/Volumes/Vol6Issue4/IJRRAS_6_4_14.pdf
C_11: 59.3e+9
C_33: 61.5e+9
C_44: 16.4e+9
C_12: 25.7e+9
C_13: 21.4e+9

View File

@ -2,7 +2,8 @@ type: Hooke
references:
- J.P. Hirth and J. Lothe,
Theory of Dislocations, 1982,
John Wiley & Sons
C_11: 246.5e9
C_12: 147.3e9
C_44: 124.7e9
John Wiley & Sons,
page 837
C_11: 246.5e+9
C_12: 147.3e+9
C_44: 124.7e+9

View File

@ -0,0 +1,11 @@
type: Hooke
references:
- D. Music et al.,
Applied Physics Letters 99(19):191904, 2007,
https://doi.org/10.1063/1.2807677
- S.L. Wong et al.,
Acta Materialia 118:140-151, 2016,
https://doi.org/10.1016/j.actamat.2016.07.032
C_11: 175.0e+9
C_12: 115.0e+9
C_44: 135.0e+9

View File

@ -1,10 +1,10 @@
type: Hooke
references:
- L. Wang et al.,
Acta Materialia 132, 598-610, 2017,
10.1016/j.actamat.2017.05.015
C_11: 162.4e9
C_33: 181.6e9
C_44: 47.2e9
C_12: 92e9
C_13: 69e9
Acta Materialia 132:598-610, 2017,
https://doi.org/10.1016/j.actamat.2017.05.015
C_11: 162.4e+9
C_33: 181.6e+9
C_44: 47.2e+9
C_12: 92.e+9
C_13: 69.e+9

View File

@ -1,8 +1,8 @@
type: Hooke
references:
- D. Cereceda et al.,
International Journal of Plasticity, 78, 242-265, 2016,
10.1016/j.ijplas.2015.09.002
C_11: 523.e9
C_12: 202.e9
C_44: 161.e9
International Journal of Plasticity 78:242-265, 2016,
https://doi.org/10.1016/j.ijplas.2015.09.002
C_11: 523.e+9
C_12: 202.e+9
C_44: 161.e+9

View File

@ -0,0 +1,8 @@
type: Hooke
references:
- T. Maiti and P. Eisenlohr,
Scripta Materialia 145:37-40, 2018,
https://doi.org/10.1016/j.scriptamat.2017.09.047
C_11: 1.e+8
C_12: 1.e+6
C_44: 4.95e+7

View File

@ -1,24 +1,24 @@
type: dislotwin
references:
- K. Sedighiani et al.,
International Journal of Plasticity, 134, 102779, 2020,
10.1016/j.ijplas.2020.102779
International Journal of Plasticity 134:102779, 2020,
https://doi.org/10.1016/j.ijplas.2020.102779
- K. Sedighiani et al.,
Mechanics of Materials, submitted
output: [rho_dip, rho_mob]
N_sl: [12, 12]
b_sl: [2.49e-10, 2.49e-10]
rho_mob_0: [2.81e12, 2.8e12]
rho_mob_0: [2.81e12, 2.8e+12]
rho_dip_0: [1.0, 1.0] # not given
v_0: [1.4e3, 1.4e3]
v_0: [1.4e+3, 1.4e+3]
Q_s: [1.57e-19, 1.57e-19] # Delta_F
tau_0: [454e6, 454e6]
tau_0: [454.e+6, 454.e+6]
p_sl: [0.325, 0.325]
q_sl: [1.55, 1.55]
i_sl: [23.3, 23.3]
D_a: 7.4 # C_anni
B: [0.001, 0.001]
h_sl_sl: [0.1, 0.72, 0.1, 0.053, 0.053, 0.073, 0.137, 0.72, 0.72, 0.053, 0.053, 0.053, 0.053, 0.073, 0.073, 0.073, 0.073, 0.073, 0.073, 0.137, 0.073, 0.073, 0.137, 0.073]
D_0: 4.000E-05
Q_cl: 5.400E-19 # no recovery!
D: 40e-6 # estimated
h_sl-sl: [0.1, 0.72, 0.1, 0.053, 0.053, 0.073, 0.137, 0.72, 0.72, 0.053, 0.053, 0.053, 0.053, 0.073, 0.073, 0.073, 0.073, 0.073, 0.073, 0.137, 0.073, 0.073, 0.137, 0.073]
D_0: 4.0e-05
Q_cl: 5.4e-19 # no recovery!
D: 40.e-6 # estimated

View File

@ -0,0 +1,15 @@
type: isotropic
references:
- T. Maiti and P. Eisenlohr,
Scripta Materialia 145:37-40, 2018,
https://doi.org/10.1016/j.scriptamat.2017.09.047
output: [xi]
dot_gamma_0: 0.001
n: 20.
xi_0: 0.3e+6
xi_inf: 0.6e+6
a: 2.
h_0: 1.e+6
M: 1.
h: 1.
dilatation: True

View File

@ -0,0 +1,50 @@
type: nonlocal
references:
C. Kords,
On the role of dislocation transport in the constitutive description of crystal plasticity,
RWTH Aachen 2013,
http://publications.rwth-aachen.de/record/229993/files/4862.pdf
output: [rho_u_ed_pos, rho_b_ed_pos, rho_u_ed_neg, rho_b_ed_neg, rho_u_sc_pos, rho_b_sc_pos, rho_u_sc_neg, rho_b_sc_neg, rho_d_ed, rho_d_sc]
N_sl: [12]
b_sl: [2.86e-10]
V_at: 0.017e-27 # Omega
d_ed: [1.6e-9]
d_sc: [10.e-9]
i_sl: [60] # k_2 (lambda_0 in Tab. 7.1)
f_ed_mult: 0.1 # k_1
rho_u_ed_neg_0: [1.25e9] # 6e10 / (12*4)
rho_u_ed_pos_0: [1.25e9] # 6e10 / (12*4)
rho_u_sc_neg_0: [1.25e9] # 6e10 / (12*4)
rho_u_sc_pos_0: [1.25e9] # 6e10 / (12*4)
rho_d_ed_0: [0]
rho_d_sc_0: [0]
D_0: 7.e-29
Q_cl: 0.0 # no temperature dependency
Q_sol: 2.00272e-19 # 1.25 eV
c_sol: 1.5e-6 # correct unit?
f_sol: 2.0 # d_obst in multiples of b
tau_Peierls_ed: [.1e6]
tau_Peierls_sc: [.1e6]
w: 10 # w_k in multiple of b
p_sl: 1
q_sl: 1
nu_a: 50.e+9
B: 1.e-2
f_ed: 1.0 # k_3
h_sl-sl: [0, 0, 0.625, 0.07, 0.137, 0.137, 0.122] # Table 3.4
chi_GB: 0.0 # full blocking at GB
chi_surface: 1.0 # no blocking at surface
f_F: 0.0 # no line tension correction
sigma_rho_u: 0 # no random distribution
short_range_stress_correction: false
rho_significant: 1.e6

View File

@ -0,0 +1,50 @@
type: nonlocal
references:
C. Kords,
On the role of dislocation transport in the constitutive description of crystal plasticity,
RWTH Aachen 2013,
http://publications.rwth-aachen.de/record/229993/files/4862.pdf
output: [rho_u_ed_pos, rho_b_ed_pos, rho_u_ed_neg, rho_b_ed_neg, rho_u_sc_pos, rho_b_sc_pos, rho_u_sc_neg, rho_b_sc_neg, rho_d_ed, rho_d_sc]
N_sl: [12]
b_sl: [2.48e-10]
V_at: 0.012e-27 # Omega
d_ed: [2.6e-9]
d_sc: [12.e-9]
i_sl: [45] # k_2
f_ed_mult: 0.1 # k_1
rho_u_ed_neg_0: [6.e+10] # 2.88e12 / (12*4)
rho_u_ed_pos_0: [6.e+10] # 2.88e12 / (12*4)
rho_u_sc_neg_0: [6.e+10] # 2.88e12 / (12*4)
rho_u_sc_pos_0: [6.e+10] # 2.88e12 / (12*4)
rho_d_ed_0: [0]
rho_d_sc_0: [0]
D_0: 3.e-53
Q_cl: 0.0 # no temperature dependency
Q_sol: 1.79444e-19 # 1.12 eV
c_sol: 5.e-7 # correct unit?
f_sol: 1. # d_obst
tau_Peierls_ed: [.1e6]
tau_Peierls_sc: [.1e6]
w: 10 # w_k
p_sl: 1
q_sl: 1
nu_a: 50.e+9
B: 1.e-3
f_ed: 0.01 # k_3
h_sl-sl: [0, 0, 0.625, 0.07, 0.137, 0.137, 0.122] # Table 3.4
chi_GB: 0.0 # full blocking at GB
chi_surface: 1.0 # no blocking at surface
f_F: 0.0 # no line tension correction
sigma_rho_u: 0 # no random distribution
short_range_stress_correction: false
rho_significant: 1.e6

View File

@ -0,0 +1,15 @@
type: phenopowerlaw
references:
- W.F. Hosford et al.,
Acta Metallurgica 8(3):187-199, 1960,
https://doi.org/10.1016/0001-6160(60)90127-9,
fitted from Fig. 5
output: [xi_sl, gamma_sl]
N_sl: [12]
n_sl: 20
a_sl: 3.1
h_0_sl-sl: 1.7e+8
xi_0_sl: [5.0e+6]
xi_inf_sl: [37.5e+6]
h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
dot_gamma_0_sl: 4.5e-3

View File

@ -1,17 +1,17 @@
type: phenopowerlaw
references:
- D. Ma et al.,
Acta Materialia, 103, 796-808, 2016,
10.1016/j.actamat.2015.11.016
Acta Materialia 103:796-808, 2016,
https://doi.org/10.1016/j.actamat.2015.11.016
- I. Kovács and G.Vörös,
International Journal of Plasticity, 12, 35-43, 1996,
10.1016/S0749-6419(95)00043-7
International Journal of Plasticity 12:35-43, 1996,
https://doi.org/10.1016/S0749-6419(95)00043-7
output: [xi_sl, gamma_sl]
N_sl: [12]
n_sl: 83.3
dot_gamma_0_sl: 0.001
h_0_sl_sl: 75.0e6
h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
a_sl: 1.0
xi_0_sl: [26.25e6]
xi_inf_sl: [53.0e6]
h_0_sl-sl: 75.0e+6
xi_0_sl: [26.25e+6]
xi_inf_sl: [53.0e+6]
h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
dot_gamma_0_sl: 0.001

View File

@ -0,0 +1,15 @@
type: phenopowerlaw
references:
- T Takeuchi,
Transactions of the Japan Institute of Metals 16(10):629-640, 1975,
https://doi.org/10.2320/matertrans1960.16.629,
fitted from Fig. 3b
output: [xi_sl, gamma_sl]
N_sl: [12]
n_sl: 20
a_sl: 1.0
h_0_sl-sl: 2.4e+8
xi_0_sl: [1.5e+6]
xi_inf_sl: [112.5e+6]
h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
dot_gamma_0_sl: 3.e-3

View File

@ -0,0 +1,14 @@
type: phenopowerlaw
references:
- C.C. Tasan et al.,
Acta Materialia 81:386-400, 2014,
https://doi.org/10.1016/j.actamat.2014.07.071
output: [xi_sl, gamma_sl]
N_sl: [12, 12]
n_sl: 20
a_sl: 2.25
h_0_sl-sl: 1.0e+9
xi_0_sl: [95.e+6, 96.e+6]
xi_inf_sl: [222.e+6, 412.e+6]
h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4]
dot_gamma_0_sl: 0.001

View File

@ -0,0 +1,20 @@
type: phenopowerlaw
references:
- C. Zambaldi et al.,
Journal of Materials Research 27(1):356-367, 2021,
https://doi.org/10.1557/jmr.2011.334
- L. Wang et al.,
Acta Materialia 132:598-610, 2017,
https://doi.org/10.1016/j.actamat.2017.05.015
output: [gamma_sl]
N_sl: [3, 3, 0, 0, 12]
n_sl: 20
a_sl: 2.0
dot_gamma_0_sl: 0.001
h_0_sl-sl: 200.e+6
# C. Zambaldi et al.:
xi_0_sl: [349.e+6, 150.e+6, 0.0, 0.0, 1107.e+6]
xi_inf_sl: [568.e+6, 150.e+7, 0.0, 0.0, 3420.e+6]
# L. Wang et al. :
# xi_0_sl: [127.e+6, 96.e+6, 0.0, 0.0, 240.e+6]
h_sl-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

View File

@ -1,5 +1,5 @@
references:
- www.engineeringtoolbox.com/thermal-conductivity-metals-d_858.html
- www.engineeringtoolbox.com/specific-heat-metals-d_152.html
- https://www.engineeringtoolbox.com/thermal-conductivity-metals-d_858.html
- https://www.engineeringtoolbox.com/specific-heat-metals-d_152.html
C_p: 910.0
K_11: 236.0

View File

@ -1,4 +1,4 @@
references:
- de.wikipedia.org/wiki/Gold
- https://de.wikipedia.org/wiki/Gold
C_p: 128.0
K_11: 320.0

View File

@ -1,4 +1,4 @@
references:
- www.mit.edu/~6.777/matprops/copper.htm
- https://www.mit.edu/~6.777/matprops/copper.htm
C_p: 385.0
K_11: 401.0

View File

@ -1,5 +1,5 @@
references:
- www.engineeringtoolbox.com/thermal-conductivity-metals-d_858.html
- www.engineeringtoolbox.com/specific-heat-metals-d_152.html
- https://www.engineeringtoolbox.com/thermal-conductivity-metals-d_858.html
- https://www.engineeringtoolbox.com/specific-heat-metals-d_152.html
C_p: 490.0
K_11: 54.0

View File

@ -1,4 +1,4 @@
references:
- www.mit.edu/~6.777/matprops/tungsten.htm
- https://www.mit.edu/~6.777/matprops/tungsten.htm
C_p: 132.51
K_11: 178.0

View File

@ -1,3 +1,3 @@
C_p: 1
K_11: 1e30
K_33: 1e30
K_11: 1.e+30
K_33: 1.e+30

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<VTKFile type="RectilinearGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<RectilinearGrid WholeExtent="0 16 0 16 0 16">
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<ImageData WholeExtent="0 16 0 16 0 16" Origin="0 0 0" Spacing="0.0625 0.0625 0.0625" Direction="1 0 0 0 1 0 0 0 1">
<FieldData>
<Array type="String" Name="comments" NumberOfTuples="2" format="binary">
AQAAAACAAAAkAAAALAAAAA==eF7LzUwuyi8uKSpNLiktSi1WMDJgyMjPzU9PzcusSizJzM/jNGQAAASkDSY=
@ -14,17 +14,6 @@
AQAAAACAAAAAAAAADwYAAA==eF7t3LuSXUUMBVAM5mXM0///rwSMAlSlWpK6zx1TRSe7SLTkYLSHYM6Hb/55H1J+h8zvt2b+VaS8yo0nt9rjx5RTN568nN++5ee3rHy9n95STpWfkdX7qUh5U7/a49Sd+pG3/t0/p5R7y8/udI8/Up562iPuUXZz/oCUF5nvYM6trz3k3vLzHvK6e8irUs7X6sd93vrRP3KyV/VDdf+zlzP337QP1T/q/6mfX76D8iPl5syvusPaI+6ivMqX2+0D3fn8e0k8ubd99d6r/O4ect/bV98q892t/G7vdfdQ/3fvsHz1jFJ+tYfuv9ypP+0/uU/73T3k/df93IfhVr1fZbd/q9QdutW7U1d7aL5Snu6y5ivlyM97qPdvu+qXbe897W/3eC//9u8dunvZV9/J67rT+9v9vUPO1q/22PbN1u/2j7yn/eke8r42X/c+5y1fjlL3p7oHmttNeVVqrlLzlZqv1Hxlnpfv3tO+7v1p71V52n+ne2huN+U85evuZO+XIuVM3e0dfMrt+tU+mttNeepBzVfKq9xX+7p3cp72t/vcdk97QPOmKe+pPTRfqflKzVfmeXF35N7ydXdv994t/3QPze3ml7eUF3nav9Neqnp/u4e8ra895CjlVntobjfl5bzVu1s/7ovmdlNedquUs/Xlnu5T/fxrfjere/PrW35fpOZ2U3ev2kNzuyk/7/HpLTVXKa/KTynlPO1H6v6H+yWlPPlyq96d7hE/d0/51R66P/K2fSh3uoe8U7/aQ85tP1LzlZqv1Hyl5lcZP+ea30152a1SztP+dJ+qdyO3buSfRar3b/Vw5Vb5lC83563+zXdfbuVP91H/nPrd3ldOXfWxPO0h9ym/ujddd+vr3lV52v+a382pe3sPzVdqvlLzlZqv1Hyl5ufU3ZOXM/esUn7VeznVt9v+k7vt/+4eXbfb+5HT/pv61T63+lfetgflbveQm1Nudw85t/xqDzm3/aqH5UVue79yp7n1NXeauvOnvXPL/d//d2p+ldO7v+3frvuU3+1hebf8qnfkqYfl6vcAed3+l1flqXvaQ7q3Vd+92tcecm751R5ybvsf3zLui5xb/seUurfhVHvK27rdnLq3ffVc5G136p/2bmT+u3DdP/WPvFvuaf9Fvpf/3v/+/HMvp8pp79/y1XvyqpTb9bc9pPtX9d2rfe0h55Yfd/jVftVDkXK2vtyql+TKl3erD7fuqZ+/CyPn1K2+CxN+vjev8nX3tv1Tea/ytYecW361h5xb/u1//+9vKVd9LKdK9b7c7R7q3W0P3XK3vvpHvb91p77uoZytL/cpX96tPW65Ve+EE/9d/R2+5iun/Vf9PZycU/dpX33b/f1j2z/yTntI/nQPeVtfe+TvC8mN7Pav/t2n/nSPuAPVdw6nbneP6u5V3zvc+pG6tzmr92q/20Ov6n/dvZxyur4cpbzK19xuVo6+w6e53dR3/57qf/lP9W+k7m3Xn+7RvfdTf9p/8rq+eqDbN93s9k/X7+6h7+937//U7frx5E/36Lr5yc/fH5z+/qE39XX3u268rh/f35EfqRd3pnKr79/JrXzdu5xdv+qFW/3b/f5vlZrfTTlP9b8c9f/pHvLUO6d7xPdedHflTvfouts91H9ypr76eNu3ld/t39yDp3uoB3M/qG+q7/6fuvG6vvaYuvGmft5j68bb+rmPpm48+foevXpXT32vrO5y9XT35Mm91b+n7qnf7b9uD8u55at35OX+izx1u3vou2/ZVe/d8nX/5WmPrTv1852s/n9TXncP9YPur7zsyqv6QX0jX556Sb722Lrx5D7V//HkqY+3bryuoz6aPs1XVvdYTz2rVB/kPdQ38qZu7iX51R6aL7fbO1UPyem6Xb/bu1NXe6j3qz3kKOV1e1nOqa/+kRNZ3el8/7qu/G4/qGeUWzeeeke+PPWSfO2xdePJrfao+rfrxpNX9UH+3srUjSen60d2n+Yr4w5u99B8uTm1h/pWqR7SHt3en3rdXpr2brd/5WoP+dpDXs74uzt52kOOUo5S85War98HNL/Kqv/ldftX3q3+/xuyB5fk
</DataArray>
</CellData>
<Coordinates>
<DataArray type="Float64" Name="x" format="binary" RangeMin="0" RangeMax="1">
AQAAAACAAACIAAAAOAAAAA==eF5jYEAGG+wh9AEofQJKX4DSV6D0DSh9B0o/gNKPoPQTKP0MSr+A0q+g9Bso/Q5Kf7AHAB2kEak=
</DataArray>
<DataArray type="Float64" Name="y" format="binary" RangeMin="0" RangeMax="1">
AQAAAACAAACIAAAAOAAAAA==eF5jYEAGG+wh9AEofQJKX4DSV6D0DSh9B0o/gNKPoPQTKP0MSr+A0q+g9Bso/Q5Kf7AHAB2kEak=
</DataArray>
<DataArray type="Float64" Name="z" format="binary" RangeMin="0" RangeMax="1">
AQAAAACAAACIAAAAOAAAAA==eF5jYEAGG+wh9AEofQJKX4DSV6D0DSh9B0o/gNKPoPQTKP0MSr+A0q+g9Bso/Q5Kf7AHAB2kEak=
</DataArray>
</Coordinates>
</Piece>
</RectilinearGrid>
</ImageData>
</VTKFile>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,19 +9,19 @@ phase:
lattice: cF
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {type: Hooke, C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9}
elastic: {type: Hooke, C_11: 106.75e+9, C_12: 60.41e+9, C_44: 28.34e+9}
plastic:
type: phenopowerlaw
N_sl: [12]
a_sl: 2.25
atol_xi: 1.0
dot_gamma_0_sl: 0.001
h_0_sl_sl: 75e6
h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
h_0_sl-sl: 75.e+6
h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
n_sl: 20
output: [xi_sl]
xi_0_sl: [31e6]
xi_inf_sl: [63e6]
xi_0_sl: [31.e+6]
xi_inf_sl: [63.e+6]
material:
- homogenization: SX

View File

@ -6,7 +6,7 @@ solver:
loadstep:
- boundary_conditions:
mechanical:
dot_F: [ [0, 0, 0], [1e-3, 0, 0], [0, 0, 0] ]
dot_F: [ [0, 0, 0], [1.e-3, 0, 0], [0, 0, 0] ]
discretization:
t: 60
N: 120

View File

@ -6,7 +6,7 @@ solver:
loadstep:
- boundary_conditions:
mechanical:
dot_F: [[0, 0, 1e-3], [0, 0, 0], [0, 0, 0]]
dot_F: [[0, 0, 1.e-3], [0, 0, 0], [0, 0, 0]]
discretization:
t: 60
N: 120

View File

@ -8,21 +8,26 @@ phase:
lattice: cF
mechanical:
output: [F, P, F_e, F_p, L_p]
elastic: {type: Hooke, C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9}
elastic: {type: Hooke, C_11: 106.75e+9, C_12: 60.41e+9, C_44: 28.34e+9}
plastic:
type: phenopowerlaw
N_sl: [12]
a_sl: 2.25
atol_xi: 1.0
dot_gamma_0_sl: 0.001
h_0_sl_sl: 75e6
h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
h_0_sl-sl: 75.e+6
h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
n_sl: 20
output: [xi_sl]
xi_0_sl: [31e6]
xi_inf_sl: [63e6]
xi_0_sl: [31.e+6]
xi_inf_sl: [63.e+6]
material:
- constituents:
- O: [1., 0., 0., 0.] # dummy material
v: 1.0
phase: Aluminum
homogenization: SX
- constituents:
- O: [0.12807292351503236, 0.22200469518411023, 0.6352813278477609, -0.7285114110750144]
v: 1.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,13 @@
#initial elastic step
$Loadcase 1 time 0.0005 incs 1 frequency 5
Face 1 X 0.01
Face 2 X 0.00
Face 2 X 0.0
Face 2 Y 0.0
Face 2 Z 0.0
$EndLoadcase
$Loadcase 2 time 10.0 incs 200 frequency 5
Face 1 X 0.01
Face 2 X 0.00
Face 2 X 0.0
Face 2 Y 0.0
Face 2 Z 0.0
$EndLoadcase

View File

@ -0,0 +1,48 @@
---
+++
@@ -6,18 +6,27 @@
DIR=$1
user=$3
program=$4
+usernoext=$user
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
+
+# add BLAS options for linking
+ BLAS="%BLAS%"
+
. $DIR/tools/include
DIRJOB=$2
cd $DIRJOB
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
+echo "Compiling and linking user subroutine $user on host `hostname`"
echo "program: $program"
- $FORTRAN $user.f || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
- userobj=$user.o
+ userobj=$usernoext.o
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,12 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $BLAS \
$SYSLIBS || \
{
- echo "$0: link failed for $user.o on host `hostname`"
+ echo "$0: link failed for $usernoext.o on host `hostname`"
exit 1
}
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod

View File

@ -0,0 +1,48 @@
---
+++
@@ -6,18 +6,27 @@
DIR=$1
user=$3
program=$4
+usernoext=$user
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
+
+# add BLAS options for linking
+ BLAS="%BLAS%"
+
. $DIR/tools/include
DIRJOB=$2
cd $DIRJOB
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
+echo "Compiling and linking user subroutine $user on host `hostname`"
echo "program: $program"
- $FORTRAN $user.f || \
+ $DFORTRANLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
- userobj=$user.o
+ userobj=$usernoext.o
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,12 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $BLAS \
$SYSLIBS || \
{
- echo "$0: link failed for $user.o on host `hostname`"
+ echo "$0: link failed for $usernoext.o on host `hostname`"
exit 1
}
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod

View File

@ -0,0 +1,48 @@
---
+++
@@ -6,18 +6,27 @@
DIR=$1
user=$3
program=$4
+usernoext=$user
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
+
+# add BLAS options for linking
+ BLAS="%BLAS%"
+
. $DIR/tools/include
DIRJOB=$2
cd $DIRJOB
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
+echo "Compiling and linking user subroutine $user on host `hostname`"
echo "program: $program"
- $FORTRAN $user.f || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
- userobj=$user.o
+ userobj=$usernoext.o
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,12 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $BLAS \
$SYSLIBS || \
{
- echo "$0: link failed for $user.o on host `hostname`"
+ echo "$0: link failed for $usernoext.o on host `hostname`"
exit 1
}
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod

View File

@ -0,0 +1,113 @@
---
+++
@@ -95,6 +95,11 @@
else
FCOMPROOT=
fi
+
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
+H5FC="$(h5fc -shlib -show)"
+HDF5_LIB=${H5FC//ifort/}
+FCOMP="$H5FC -DDAMASK_HDF5"
# AEM
if test "$MARCDLLOUTDIR" = ""; then
@@ -390,8 +395,8 @@
I8DEFINES=
I8CDEFINES=
else
- I8FFLAGS="-i8"
- I8DEFINES="-DI64"
+ I8FFLAGS="-i8 -integer-size 64"
+ I8DEFINES="-DI64 -DINT=8"
I8CDEFINES="-U_DOUBLE -D_SINGLE"
fi
@@ -498,7 +503,7 @@
PROFILE=" $PROFILE -pg"
fi
-FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB -fp-model source"
+FORT_OPT="-c -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB -fp-model source"
if test "$MTHREAD" = "OPENMP"
then
FORT_OPT=" $FORT_OPT -qopenmp"
@@ -511,7 +516,7 @@
FORT_OPT=" $FORT_OPT -save -zero"
fi
if test "$MARCHDF_HDF" = "HDF"; then
- FORT_OPT="$FORT_OPT -DMARCHDF_HDF=$MARCHDF_HDF $HDF_INCLUDE"
+ FORT_OPT="$FORT_OPT -DMARCHDF=$MARCHDF_HDF"
fi
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
@@ -524,6 +529,30 @@
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
# for compiling free form f90 files. high opt, integer(4)
FORTF90="$FCOMP -c -O3"
+
+# determine DAMASK version
+if test -n "$DAMASK_USER"; then
+ DAMASKROOT=`dirname $DAMASK_USER`/..
+ read DAMASKVERSION < $DAMASKROOT/VERSION
+ DAMASKVERSION="'"$DAMASKVERSION"'"
+else
+ DAMASKVERSION="'N/A'"
+fi
+
+
+# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
+DFORTLOWMP="$FCOMP -c -O0 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
+ -qopenmp -qopenmp-threadprivate=compat\
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
+DFORTRANMP="$FCOMP -c -O1 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
+ -qopenmp -qopenmp-threadprivate=compat\
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
+DFORTHIGHMP="$FCOMP -c -O3 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
+ -qopenmp -qopenmp-threadprivate=compat\
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
if test "$MARCDEBUG" = "ON"
then
@@ -697,16 +726,16 @@
fi
if test "$MARC_INTEGER_SIZE" = "i4" ; then
- MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
-else
- MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
+ MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
+else
+ MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
fi
SECLIBS="-L$MARC_LIB -llapi"
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
$MKLLIB -L$MARC_MKL -liomp5 \
- $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $HDF_LIBS $SOLVER2LIBS"
+ $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $HDF5_LIB $SOLVER2LIBS"
SOLVERLIBS_DLL=${SOLVERLIBS}
if test "$AEM_DLL" -eq 1
@@ -734,7 +763,7 @@
OPENSSL=NONE
fi
-SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
+SYSLIBS=" $OPENMP -lpthread -cxxlib"
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
# if test $MPITYPE = intelmpi
@@ -744,7 +773,7 @@
# fi
if test $MPITYPE = intelmpi
then
- SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -shared-intel -cxxlib"
+ SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -cxxlib"
fi

View File

@ -0,0 +1,662 @@
---
+++
@@ -298,7 +298,23 @@
. "$DIR/getarch"
+
+# getting user subroutine file name
+found=0
+for i in "$@"; do
+ if test $found = 1; then
+ DAMASK_USER=$i
+ found=0
+ fi
+ case $i in
+ -u* | -U*)
+ found=1
+ ;;
+ esac
+done
+# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
+
#
#
@@ -399,7 +415,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -568,7 +584,7 @@
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -664,50 +680,19 @@
esac
;;
-u* | -U*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
-obj | -OBJ)
objs="$value"
@@ -1188,12 +1173,12 @@
fi
fi
fi
- if test "$usersubname"
+ if test "$user"
then
- if test ! -f $usersubname
+ if test ! -f $user
then
error="$error
-user subroutine file $usersubname not accessible"
+user subroutine file $user not accessible"
fi
fi
if test "$objs"
@@ -1367,7 +1352,7 @@
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1508,7 +1493,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1540,7 +1525,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1663,7 +1648,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1672,50 +1657,19 @@
user=
;;
*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
esac
fi
@@ -2256,11 +2210,12 @@
#
# user subroutine used
#
+# add DAMASK options for linking
+ DAMASK="-lstdc++"
if test "$user"
then
-# program=$user.marc
- program=$DIRJOB/`$BASENAME $user .f`.marc
+ program=$usernoext.marc
case $program in
\/* | \.\/*)
bd=
@@ -2373,7 +2328,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3256,44 +3211,27 @@
echo
if test "$user"
then
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
then
- if test ${basefile##*.} = f
- then
- ln -sf "$user.f" "$usersub"
- fi
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi
@@ -3313,7 +3251,8 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
$SECLIBS || \
@@ -3326,6 +3265,8 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3372,7 +3313,7 @@
fi
else
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3538,7 +3479,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3551,21 +3492,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
echo " $PRODUCT Exit number 3"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3575,39 +3516,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3627,7 +3556,8 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
$SECLIBS || \
@@ -3668,6 +3598,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3726,42 +3658,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3886,7 +3818,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3899,20 +3831,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3922,37 +3854,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3972,6 +3892,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4012,7 +3933,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
-
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4052,7 +3974,7 @@
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4096,42 +4018,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then

View File

@ -0,0 +1,662 @@
---
+++
@@ -298,7 +298,23 @@
. "$DIR/getarch"
+
+# getting user subroutine file name
+found=0
+for i in "$@"; do
+ if test $found = 1; then
+ DAMASK_USER=$i
+ found=0
+ fi
+ case $i in
+ -u* | -U*)
+ found=1
+ ;;
+ esac
+done
+# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
+
#
#
@@ -399,7 +415,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -568,7 +584,7 @@
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -664,50 +680,19 @@
esac
;;
-u* | -U*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
-obj | -OBJ)
objs="$value"
@@ -1188,12 +1173,12 @@
fi
fi
fi
- if test "$usersubname"
+ if test "$user"
then
- if test ! -f $usersubname
+ if test ! -f $user
then
error="$error
-user subroutine file $usersubname not accessible"
+user subroutine file $user not accessible"
fi
fi
if test "$objs"
@@ -1367,7 +1352,7 @@
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1508,7 +1493,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1540,7 +1525,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1663,7 +1648,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1672,50 +1657,19 @@
user=
;;
*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
esac
fi
@@ -2256,11 +2210,12 @@
#
# user subroutine used
#
+# add DAMASK options for linking
+ DAMASK="-lstdc++"
if test "$user"
then
-# program=$user.marc
- program=$DIRJOB/`$BASENAME $user .f`.marc
+ program=$usernoext.marc
case $program in
\/* | \.\/*)
bd=
@@ -2373,7 +2328,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3256,44 +3211,27 @@
echo
if test "$user"
then
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
then
- if test ${basefile##*.} = f
- then
- ln -sf "$user.f" "$usersub"
- fi
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTLOWMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi
@@ -3313,7 +3251,8 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
$SECLIBS || \
@@ -3326,6 +3265,8 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3372,7 +3313,7 @@
fi
else
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3538,7 +3479,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3551,21 +3492,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
echo " $PRODUCT Exit number 3"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3575,39 +3516,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTLOWMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3627,7 +3556,8 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
$SECLIBS || \
@@ -3668,6 +3598,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3726,42 +3658,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3886,7 +3818,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3899,20 +3831,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3922,37 +3854,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTLOWMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3972,6 +3892,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4012,7 +3933,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
-
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4052,7 +3974,7 @@
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4096,42 +4018,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then

View File

@ -0,0 +1,662 @@
---
+++
@@ -298,7 +298,23 @@
. "$DIR/getarch"
+
+# getting user subroutine file name
+found=0
+for i in "$@"; do
+ if test $found = 1; then
+ DAMASK_USER=$i
+ found=0
+ fi
+ case $i in
+ -u* | -U*)
+ found=1
+ ;;
+ esac
+done
+# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
+
#
#
@@ -399,7 +415,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -568,7 +584,7 @@
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -664,50 +680,19 @@
esac
;;
-u* | -U*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
-obj | -OBJ)
objs="$value"
@@ -1188,12 +1173,12 @@
fi
fi
fi
- if test "$usersubname"
+ if test "$user"
then
- if test ! -f $usersubname
+ if test ! -f $user
then
error="$error
-user subroutine file $usersubname not accessible"
+user subroutine file $user not accessible"
fi
fi
if test "$objs"
@@ -1367,7 +1352,7 @@
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1508,7 +1493,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1540,7 +1525,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1663,7 +1648,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1672,50 +1657,19 @@
user=
;;
*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
esac
fi
@@ -2256,11 +2210,12 @@
#
# user subroutine used
#
+# add DAMASK options for linking
+ DAMASK="-lstdc++"
if test "$user"
then
-# program=$user.marc
- program=$DIRJOB/`$BASENAME $user .f`.marc
+ program=$usernoext.marc
case $program in
\/* | \.\/*)
bd=
@@ -2373,7 +2328,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3256,44 +3211,27 @@
echo
if test "$user"
then
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
then
- if test ${basefile##*.} = f
- then
- ln -sf "$user.f" "$usersub"
- fi
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi
@@ -3313,7 +3251,8 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
$SECLIBS || \
@@ -3326,6 +3265,8 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3372,7 +3313,7 @@
fi
else
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3538,7 +3479,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3551,21 +3492,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
echo " $PRODUCT Exit number 3"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3575,39 +3516,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3627,7 +3556,8 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
$SECLIBS || \
@@ -3668,6 +3598,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3726,42 +3658,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3886,7 +3818,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3899,20 +3831,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3922,37 +3854,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3972,6 +3892,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4012,7 +3933,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
-
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4052,7 +3974,7 @@
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4096,42 +4018,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then

View File

@ -0,0 +1,24 @@
---
+++
@@ -1,18 +1,5 @@
#!/bin/sh
-# This script opens a window running an editor. The default window is an
-# xterm, and the default editor is vi. These may be customized.
+# This script opens a window running an editor.
+# The command to invoke the editor is specified during DAMASK installation
-dir=
-for d in /usr/bin /usr/bin/X11; do
- if test -x "$d/xterm"; then
- dir="$d"
- break
- fi
-done
-
-if test -z "$dir"; then
- echo "$0: Could not find xterm"
- exit 1
-fi
-
-"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $*
+%EDITOR% $*

View File

View File

View File

View File

@ -0,0 +1,42 @@
---
+++
@@ -4,7 +4,8 @@
# Normal exit status is 0.
#
-DIR=/tmp/msc/marc2020
+DIR=%INSTALLDIR%/marc2020
+
if test $MARCDIR1
then
DIR=$MARCDIR1
@@ -59,10 +60,10 @@
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
slv="-iam sfm"
fi
-if [ "$slv" == "marc" ]; then
+if [ "$slv" = "marc" ]; then
slv=""
fi
-if [ "$slv" == "datfit" ]; then
+if [ "$slv" = "datfit" ]; then
slv="-iam datfit"
fi
@@ -87,6 +88,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
+ srcfile=${srcfile%.*}".marc"
srcfile="-prog $srcfile"
;;
esac
@@ -181,7 +183,7 @@
unset PYTHONHOME
unset PYTHONPATH
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
+"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1

View File

@ -0,0 +1,42 @@
---
+++
@@ -4,7 +4,8 @@
# Normal exit status is 0.
#
-DIR=/tmp/msc/marc2020
+DIR=%INSTALLDIR%/marc2020
+
if test $MARCDIR1
then
DIR=$MARCDIR1
@@ -59,10 +60,10 @@
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
slv="-iam sfm"
fi
-if [ "$slv" == "marc" ]; then
+if [ "$slv" = "marc" ]; then
slv=""
fi
-if [ "$slv" == "datfit" ]; then
+if [ "$slv" = "datfit" ]; then
slv="-iam datfit"
fi
@@ -87,6 +88,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
+ srcfile=${srcfile%.*}".marc"
srcfile="-prog $srcfile"
;;
esac
@@ -181,7 +183,7 @@
unset PYTHONHOME
unset PYTHONPATH
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
+"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1

View File

@ -0,0 +1,42 @@
---
+++
@@ -4,7 +4,8 @@
# Normal exit status is 0.
#
-DIR=/tmp/msc/marc2020
+DIR=%INSTALLDIR%/marc2020
+
if test $MARCDIR1
then
DIR=$MARCDIR1
@@ -59,10 +60,10 @@
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
slv="-iam sfm"
fi
-if [ "$slv" == "marc" ]; then
+if [ "$slv" = "marc" ]; then
slv=""
fi
-if [ "$slv" == "datfit" ]; then
+if [ "$slv" = "datfit" ]; then
slv="-iam datfit"
fi
@@ -87,6 +88,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
+ srcfile=${srcfile%.*}".marc"
srcfile="-prog $srcfile"
;;
esac
@@ -181,7 +183,7 @@
unset PYTHONHOME
unset PYTHONPATH
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
+"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1

View File

@ -0,0 +1,156 @@
---
+++
@@ -260,10 +260,17 @@
}
button {
position +25 =
- size 25 4
+ size 18 4
text "ADVANCED JOB SUBMISSION"
help "job_run#Job Submission And Control"
popmenu job_submit_adv_pm
+ }
+ button {
+ position +18 =
+ size 7 4
+ text "DAMASK"
+ help "damask_run#Job Submission And Control"
+ popmenu damask
}
button {
position 0 +4
@@ -1123,6 +1130,134 @@
mode permanent
}
+#--------------------------------------------------------------------------------------------------
+popmenu damask {
+
+#ifdef QT_MENTAT
+ text "DAMASK.MPIE.DE"
+#endif
+
+ group {
+#ifndef QT_MENTAT
+ label {
+ position 0 0
+ size 50 4
+ text "DAMASK.MPIE.DE"
+ }
+#endif
+
+ label {
+ position 1 6
+ size 13 6
+ text "Optimzation"
+ border_width 1
+ border_color black
+ }
+
+ label {
+ position +13 =
+ size 20 6
+ text "write Input"
+ border_width 1
+ border_color black
+ }
+
+ label {
+ position +18 =
+ size 30 6
+ text "do not write Inp."
+ border_width 1
+ border_color black
+ }
+
+ label {
+ position -32 +6
+ size 12 6
+ text "O2 / OpenMP"
+ border_width 1
+ border_color black
+ }
+
+ popdown {
+ position +12 =
+ size 20 6
+ text "Submit"
+ command "*submit_job 4 *monitor_job"
+ }
+
+ popdown {
+ position +20 =
+ size 20 6
+ text "Execute"
+ command "*execute_job 4 *monitor_job"
+ }
+
+ label {
+ position -32 +6
+ size 12 6
+ text "O1 / OpenMP"
+ border_width 1
+ border_color black
+ }
+
+ popdown {
+ position +12 =
+ size 20 6
+ text "Submit"
+ command "*submit_job 5 *monitor_job"
+ }
+
+ popdown {
+ position +20 =
+ size 20 6
+ text "Execute"
+ command "*execute_job 5 *monitor_job"
+ }
+
+ label {
+ position -32 +6
+ size 12 6
+ text "O0 / OpenMP"
+ border_width 1
+ border_color black
+ }
+
+ popdown {
+ position +12 =
+ size 20 6
+ text "Submit"
+ command "*submit_job 6 *monitor_job"
+ }
+
+ popdown {
+ position +20 =
+ size 20 6
+ text "Execute"
+ command "*execute_job 6 *monitor_job"
+ }
+
+ popdown {
+ position 19 +8
+ size 12 8
+ text "CANCEL"
+ }
+}
+
+ window {
+ parent mentat
+ origin 38 8
+#ifdef DCOM
+ size 50 100
+#else
+ size 50 94
+#endif
+ background_color body
+ border_width 1
+ border_color border
+ buffering single
+ }
+ mode permanent
+}
#--------------------------------------------------------------------------------------------------
popmenu job_exit_msg_pm {

View File

@ -0,0 +1,48 @@
---
+++
@@ -6,18 +6,27 @@
DIR=$1
user=$3
program=$4
+usernoext=$user
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
+
+# add BLAS options for linking
+ BLAS="%BLAS%"
+
. $DIR/tools/include
DIRJOB=$2
cd $DIRJOB
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
+echo "Compiling and linking user subroutine $user on host `hostname`"
echo "program: $program"
- $FORTRAN $user.f || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
- userobj=$user.o
+ userobj=$usernoext.o
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,12 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $BLAS \
$SYSLIBS || \
{
- echo "$0: link failed for $user.o on host `hostname`"
+ echo "$0: link failed for $usernoext.o on host `hostname`"
exit 1
}
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod

View File

@ -0,0 +1,48 @@
---
+++
@@ -6,18 +6,27 @@
DIR=$1
user=$3
program=$4
+usernoext=$user
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
+
+# add BLAS options for linking
+ BLAS="%BLAS%"
+
. $DIR/tools/include
DIRJOB=$2
cd $DIRJOB
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
+echo "Compiling and linking user subroutine $user on host `hostname`"
echo "program: $program"
- $FORTRAN $user.f || \
+ $DFORTRANLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
- userobj=$user.o
+ userobj=$usernoext.o
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,12 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $BLAS \
$SYSLIBS || \
{
- echo "$0: link failed for $user.o on host `hostname`"
+ echo "$0: link failed for $usernoext.o on host `hostname`"
exit 1
}
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod

View File

@ -0,0 +1,48 @@
---
+++
@@ -6,18 +6,27 @@
DIR=$1
user=$3
program=$4
+usernoext=$user
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
+
+# add BLAS options for linking
+ BLAS="%BLAS%"
+
. $DIR/tools/include
DIRJOB=$2
cd $DIRJOB
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
+echo "Compiling and linking user subroutine $user on host `hostname`"
echo "program: $program"
- $FORTRAN $user.f || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
- userobj=$user.o
+ userobj=$usernoext.o
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,12 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $BLAS \
$SYSLIBS || \
{
- echo "$0: link failed for $user.o on host `hostname`"
+ echo "$0: link failed for $usernoext.o on host `hostname`"
exit 1
}
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod

View File

@ -0,0 +1,101 @@
---
+++
@@ -118,6 +118,11 @@
if test "$MSCCOSIM_VERSION" = ""; then
MSCCOSIM_VERSION="2020"
fi
+
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
+H5FC="$(h5fc -shlib -show)"
+HDF5_LIB=${H5FC//ifort/}
+FCOMP="$H5FC -DDAMASK_HDF5"
# AEM
if test "$MARCDLLOUTDIR" = ""; then
@@ -439,8 +444,8 @@
I8DEFINES=
I8CDEFINES=
else
- I8FFLAGS="-i8"
- I8DEFINES="-DI64"
+ I8FFLAGS="-i8 -integer-size 64"
+ I8DEFINES="-DI64 -DINT=8"
I8CDEFINES="-U_DOUBLE -D_SINGLE"
fi
@@ -556,7 +561,7 @@
PROFILE=" $PROFILE -pg"
fi
-FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB -fp-model source"
+FORT_OPT="-c -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB -fp-model source"
if test "$MTHREAD" = "OPENMP"
then
FORT_OPT=" $FORT_OPT -qopenmp"
@@ -569,7 +574,7 @@
FORT_OPT=" $FORT_OPT -save -zero"
fi
if test "$MARCHDF_HDF" = "HDF"; then
- FORT_OPT="$FORT_OPT -DMARCHDF_HDF=$MARCHDF_HDF $HDF_INCLUDE"
+ FORT_OPT="$FORT_OPT -DMARCHDF=$MARCHDF_HDF"
fi
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
@@ -582,6 +587,30 @@
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
# for compiling free form f90 files. high opt, integer(4)
FORTF90="$FCOMP -c -O3"
+
+# determine DAMASK version
+if test -n "$DAMASK_USER"; then
+ DAMASKROOT=`dirname $DAMASK_USER`/..
+ read DAMASKVERSION < $DAMASKROOT/VERSION
+ DAMASKVERSION="'"$DAMASKVERSION"'"
+else
+ DAMASKVERSION="'N/A'"
+fi
+
+
+# DAMASK compiler calls
+DFORTLOWMP="$FCOMP -c -O0 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
+ -qopenmp -qopenmp-threadprivate=compat\
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
+DFORTRANMP="$FCOMP -c -O1 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
+ -qopenmp -qopenmp-threadprivate=compat\
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
+DFORTHIGHMP="$FCOMP -c -O3 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
+ -qopenmp -qopenmp-threadprivate=compat\
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
if test "$MARCDEBUG" = "ON"
then
@@ -739,7 +768,7 @@
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
-L$MARC_MKL \
- $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $MARC_LIB/libtetmeshinterface.a $MARC_LIB/libcaefatigueinterface.a -L$MARC_LIB -lmkl_blacs_intelmpi_ilp64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -ltetmesh -lmeshgems -lmg-tetra -lmeshgems_stubs $HDF_LIBS $SOLVER2LIBS"
+ $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $MARC_LIB/libtetmeshinterface.a $MARC_LIB/libcaefatigueinterface.a -L$MARC_LIB -lmkl_blacs_intelmpi_ilp64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -ltetmesh -lmeshgems -lmg-tetra -lmeshgems_stubs $HDF5_LIB $SOLVER2LIBS"
SOLVERLIBS_DLL=${SOLVERLIBS}
if test "$AEM_DLL" -eq 1
@@ -762,7 +791,7 @@
OPENSSL=NONE
fi
-SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
+SYSLIBS=" $OPENMP -lpthread -cxxlib"
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
# if test $MPITYPE = intelmpi
@@ -772,7 +801,7 @@
# fi
if test $MPITYPE = intelmpi
then
- SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -shared-intel -cxxlib"
+ SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -cxxlib"
fi
if test "$ZLIB" = "ZLIB"; then

View File

@ -0,0 +1,708 @@
---
+++
@@ -302,7 +302,23 @@
. "$DIR/getarch"
+
+# getting user subroutine file name
+found=0
+for i in "$@"; do
+ if test $found = 1; then
+ DAMASK_USER=$i
+ found=0
+ fi
+ case $i in
+ -u* | -U*)
+ found=1
+ ;;
+ esac
+done
+# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
+
#
#
@@ -403,7 +419,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -571,7 +587,7 @@
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -667,50 +683,19 @@
esac
;;
-u* | -U*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
-obj | -OBJ)
objs="$value"
@@ -730,19 +715,19 @@
;;
esac
;;
- -dl | -DL)
- case $value in
- y* | Y*)
- deletelog=yes
- ;;
- n* | N*)
- deletelog=no
- ;;
- *)
- ;;
- esac
-
- ;;
+ -dl | -DL)
+ case $value in
+ y* | Y*)
+ deletelog=yes
+ ;;
+ n* | N*)
+ deletelog=no
+ ;;
+ *)
+ ;;
+ esac
+
+ ;;
-at | -AT)
att=$value
;;
@@ -1190,12 +1175,12 @@
fi
fi
fi
- if test "$usersubname"
+ if test "$user"
then
- if test ! -f $usersubname
+ if test ! -f $user
then
error="$error
-user subroutine file $usersubname not accessible"
+user subroutine file $user not accessible"
fi
fi
if test "$objs"
@@ -1369,7 +1354,7 @@
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1514,7 +1499,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1545,7 +1530,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1668,7 +1653,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1677,50 +1662,19 @@
user=
;;
*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
esac
fi
@@ -2255,11 +2209,12 @@
#
# user subroutine used
#
+# add DAMASK options for linking
+ DAMASK="-lstdc++"
if test "$user"
then
-# program=$user.marc
- program=$DIRJOB/`$BASENAME $user .f`.marc
+ program=$usernoext.marc
case $program in
\/* | \.\/*)
bd=
@@ -2372,7 +2327,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3255,44 +3210,27 @@
echo
if test "$user"
then
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
then
- if test ${basefile##*.} = f
- then
- ln -sf "$user.f" "$usersub"
- fi
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi
@@ -3312,10 +3250,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -3325,6 +3264,8 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3371,7 +3312,7 @@
fi
else
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3537,7 +3478,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3550,21 +3491,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
echo " $PRODUCT Exit number 3"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3574,39 +3515,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3626,10 +3555,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
echo " $PRODUCT Exit number 3"
@@ -3667,6 +3597,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3725,42 +3657,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3885,7 +3817,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3898,20 +3830,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3921,37 +3853,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3971,10 +3891,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -4011,7 +3932,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
-
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4051,7 +3973,7 @@
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4095,42 +4017,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then

View File

@ -0,0 +1,708 @@
---
+++
@@ -302,7 +302,23 @@
. "$DIR/getarch"
+
+# getting user subroutine file name
+found=0
+for i in "$@"; do
+ if test $found = 1; then
+ DAMASK_USER=$i
+ found=0
+ fi
+ case $i in
+ -u* | -U*)
+ found=1
+ ;;
+ esac
+done
+# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
+
#
#
@@ -403,7 +419,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -571,7 +587,7 @@
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -667,50 +683,19 @@
esac
;;
-u* | -U*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
-obj | -OBJ)
objs="$value"
@@ -730,19 +715,19 @@
;;
esac
;;
- -dl | -DL)
- case $value in
- y* | Y*)
- deletelog=yes
- ;;
- n* | N*)
- deletelog=no
- ;;
- *)
- ;;
- esac
-
- ;;
+ -dl | -DL)
+ case $value in
+ y* | Y*)
+ deletelog=yes
+ ;;
+ n* | N*)
+ deletelog=no
+ ;;
+ *)
+ ;;
+ esac
+
+ ;;
-at | -AT)
att=$value
;;
@@ -1190,12 +1175,12 @@
fi
fi
fi
- if test "$usersubname"
+ if test "$user"
then
- if test ! -f $usersubname
+ if test ! -f $user
then
error="$error
-user subroutine file $usersubname not accessible"
+user subroutine file $user not accessible"
fi
fi
if test "$objs"
@@ -1369,7 +1354,7 @@
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1514,7 +1499,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1545,7 +1530,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1668,7 +1653,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1677,50 +1662,19 @@
user=
;;
*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
esac
fi
@@ -2255,11 +2209,12 @@
#
# user subroutine used
#
+# add DAMASK options for linking
+ DAMASK="-lstdc++"
if test "$user"
then
-# program=$user.marc
- program=$DIRJOB/`$BASENAME $user .f`.marc
+ program=$usernoext.marc
case $program in
\/* | \.\/*)
bd=
@@ -2372,7 +2327,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3255,44 +3210,27 @@
echo
if test "$user"
then
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
then
- if test ${basefile##*.} = f
- then
- ln -sf "$user.f" "$usersub"
- fi
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTLOWMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi
@@ -3312,10 +3250,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -3325,6 +3264,8 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3371,7 +3312,7 @@
fi
else
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3537,7 +3478,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3550,21 +3491,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
echo " $PRODUCT Exit number 3"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3574,39 +3515,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTLOWMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3626,10 +3555,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
echo " $PRODUCT Exit number 3"
@@ -3667,6 +3597,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3725,42 +3657,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3885,7 +3817,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3898,20 +3830,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3921,37 +3853,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTLOWMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTLOWMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3971,10 +3891,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -4011,7 +3932,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
-
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4051,7 +3973,7 @@
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4095,42 +4017,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then

View File

@ -0,0 +1,708 @@
---
+++
@@ -302,7 +302,23 @@
. "$DIR/getarch"
+
+# getting user subroutine file name
+found=0
+for i in "$@"; do
+ if test $found = 1; then
+ DAMASK_USER=$i
+ found=0
+ fi
+ case $i in
+ -u* | -U*)
+ found=1
+ ;;
+ esac
+done
+# sourcing include_linux64 (needs DAMASK_USER to be set)
. $MARC_INCLUDE
+
#
#
@@ -403,7 +419,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -571,7 +587,7 @@
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -667,50 +683,19 @@
esac
;;
-u* | -U*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
-obj | -OBJ)
objs="$value"
@@ -730,19 +715,19 @@
;;
esac
;;
- -dl | -DL)
- case $value in
- y* | Y*)
- deletelog=yes
- ;;
- n* | N*)
- deletelog=no
- ;;
- *)
- ;;
- esac
-
- ;;
+ -dl | -DL)
+ case $value in
+ y* | Y*)
+ deletelog=yes
+ ;;
+ n* | N*)
+ deletelog=no
+ ;;
+ *)
+ ;;
+ esac
+
+ ;;
-at | -AT)
att=$value
;;
@@ -1190,12 +1175,12 @@
fi
fi
fi
- if test "$usersubname"
+ if test "$user"
then
- if test ! -f $usersubname
+ if test ! -f $user
then
error="$error
-user subroutine file $usersubname not accessible"
+user subroutine file $user not accessible"
fi
fi
if test "$objs"
@@ -1369,7 +1354,7 @@
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1514,7 +1499,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1545,7 +1530,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
-User subroutine name : $usersubname
+User subroutine name : $user
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1668,7 +1653,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1677,50 +1662,19 @@
user=
;;
*)
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user
- basefile=`$BASENAME $value`
- if test ${basefile##*.} = f
- then
- user=`dirname $value`/`$BASENAME $value .f`
- usersubname=$user.f
- elif test ${basefile##*.} = F
- then
- user=`dirname $value`/`$BASENAME $value .F`
- usersubname=$user.F
- elif test ${basefile##*.} = f90
- then
- user=`dirname $value`/`$BASENAME $value .f90`
- usersubname=$user.f90
- elif test ${basefile##*.} = F90
- then
- user=`dirname $value`/`$BASENAME $value .F90`
- usersubname=$user.F90
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
- then
- usersubname=$usersubname.f
- elif test -f $usersubname.F
- then
- usersubname=$usersubname.F
- elif test -f $usersubname.f90
- then
- usersubname=$usersubname.f90
- elif test -f $usersubname.F90
- then
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
;;
esac
fi
@@ -2255,11 +2209,12 @@
#
# user subroutine used
#
+# add DAMASK options for linking
+ DAMASK="-lstdc++"
if test "$user"
then
-# program=$user.marc
- program=$DIRJOB/`$BASENAME $user .f`.marc
+ program=$usernoext.marc
case $program in
\/* | \.\/*)
bd=
@@ -2372,7 +2327,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3255,44 +3210,27 @@
echo
if test "$user"
then
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
then
- if test ${basefile##*.} = f
- then
- ln -sf "$user.f" "$usersub"
- fi
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi
@@ -3312,10 +3250,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -3325,6 +3264,8 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3371,7 +3312,7 @@
fi
else
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3537,7 +3478,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3550,21 +3491,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
echo " $PRODUCT Exit number 3"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3574,39 +3515,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
echo " $PRODUCT Exit number 3"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3626,10 +3555,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
echo " $PRODUCT Exit number 3"
@@ -3667,6 +3597,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
#
# run marc
@@ -3725,42 +3657,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3885,7 +3817,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
- $RCP $user.f $i:$DIR1/
+ $RCP $user $i:$DIR1/
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3898,20 +3830,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
# check if successful, the new executable should be there
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
if test "$line"
then
echo compilation and linking successful on host $i
else
- echo "$0: compile failed for $user.f on host $i"
+ echo "$0: compile failed for $user on host $i"
exit 1
fi
# remove the user subroutine on remote machine
if test ${dirstatus[$counter]} = "local"
then
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
fi
fi
fi
@@ -3921,37 +3853,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
+ echo "Compiling and linking user subroutine $user on host `hostname`"
fi
- userobj=$DIRJOB/`$BASENAME $user .f`.o
- basefile=`$BASENAME $usersubname`
- if test ${basefile##*.} = f
- then
- usersub=$DIRJOB/`$BASENAME $user .f`.F
- ln -sf "$user.f" "$usersub"
- else
- usersub=$usersubname
- fi
+ userobj=$usernoext.o
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
exit 1
}
/bin/rm $program 2>/dev/null
fi
- if test ${basefile##*.} = f
- then
- /bin/rm -f "$usersub"
- fi
fi # if test $user
@@ -3971,10 +3891,11 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -4011,7 +3932,8 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
-
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4051,7 +3973,7 @@
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4095,42 +4017,42 @@
counter=0
if test -f "$host_filt"
then
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
- do
- ibase=${i%%.*}
- if test $ibase != $thishost
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
+ do
+ ibase=${i%%.*}
+ if test $ibase != $thishost
+ then
+ counter=$((counter+1))
+ DIR1=$DIRJOB
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
+ workdir=`echo $line | $AWK '{print $3}'`
+ if test -n "$workdir"
then
- counter=$((counter+1))
- DIR1=$DIRJOB
- line=`grep -v '^#' $userhost | grep "^$ibase "`
- workdir=`echo $line | $AWK '{print $3}'`
- if test -n "$workdir"
- then
- DIR1=$workdir
- fi
- # if an incompatible host uses shared directory,
- # then the root machine deletes the executable
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
- then
- hname=_$ibase
- /bin/rm ${execname}$hname
- fi
- # if local directory used, the remote machine
- # deletes the executable
- if test ${dirstatus[$counter]} = "local"
- then
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
- fi
+ DIR1=$workdir
fi
- done
- fi
+ # if an incompatible host uses shared directory,
+ # then the root machine deletes the executable
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
+ then
+ hname=_$ibase
+ /bin/rm ${execname}$hname
+ fi
+ # if local directory used, the remote machine
+ # deletes the executable
+ if test ${dirstatus[$counter]} = "local"
+ then
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
+ fi
+ fi
+ done
fi
fi
+fi
fi
else
#dllrun >0
if test $cpdll = yes; then
- filename=`basename $usersubname .f`
+ filename=$usernoext
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then

View File

@ -0,0 +1,24 @@
---
+++
@@ -1,18 +1,5 @@
#!/bin/sh
-# This script opens a window running an editor. The default window is an
-# xterm, and the default editor is vi. These may be customized.
+# This script opens a window running an editor.
+# The command to invoke the editor is specified during DAMASK installation
-dir=
-for d in /usr/bin /usr/bin/X11; do
- if test -x "$d/xterm"; then
- dir="$d"
- break
- fi
-done
-
-if test -z "$dir"; then
- echo "$0: Could not find xterm"
- exit 1
-fi
-
-"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $*
+%EDITOR% $*

View File

Some files were not shown because too many files have changed in this diff Show More