Merge branch 'development' into clean-MPI-exit

This commit is contained in:
Martin Diehl 2023-01-20 07:08:38 +01:00
commit 68b583e4da
265 changed files with 15152 additions and 6681 deletions

2
.gitattributes vendored
View File

@ -14,7 +14,7 @@
# ignore files from MSC.Marc in language statistics
install/MarcMentat/** linguist-vendored
src/Marc/include/* linguist-vendored
install/MarcMentat/apply_DAMASK_modifications.py linguist-vendored=false
install/MarcMentat/MSC_modifications.py linguist-vendored=false
# ignore reference files for tests in language statistics
python/tests/reference/** linguist-vendored

View File

@ -2,7 +2,7 @@ name: Grid and Mesh Solver
on: [push]
env:
PETSC_VERSION: '3.17.1'
PETSC_VERSION: '3.18.2'
HOMEBREW_NO_ANALYTICS: 'ON' # Make Homebrew installation a little quicker
HOMEBREW_NO_AUTO_UPDATE: 'ON'
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 'ON'
@ -11,24 +11,23 @@ env:
jobs:
gcc:
gcc_ubuntu:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
gcc_v: [9, 10, 11] # Version of GCC compilers
gcc_v: [9, 10, 11, 12]
fail-fast: false
env:
GCC_V: ${{ matrix.gcc_v }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: GCC - Install (Linux)
if: contains( matrix.os, 'ubuntu')
- name: GCC - Install
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
@ -38,15 +37,9 @@ jobs:
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
- name: GCC - Install (macOS)
if: contains( matrix.os, 'macos')
run: |
brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true
brew link gcc@${GCC_V}
- name: PETSc - Cache download
id: petsc-download
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: download
key: petsc-${{ env.PETSC_VERSION }}.tar.gz
@ -63,28 +56,19 @@ jobs:
export PETSC_ARCH=gcc${GCC_V}
printenv >> $GITHUB_ENV
- name: PETSc - Cache installation
- name: PETSc - Cache Installation
id: petsc-install
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: petsc-${{ env.PETSC_VERSION }}
key: petsc-${{ env.PETSC_VERSION }}-${{ matrix.os }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }}
key: petsc-${{ env.PETSC_VERSION }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }}
- name: PETSc - Install (Linux)
if: contains( matrix.os, 'ubuntu')
- name: PETSc - Installation
run: |
cd petsc-${PETSC_VERSION}
./configure --with-fc=gfortran --with-cc=gcc --with-cxx=g++ \
--download-mpich --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib \
--with-mpi-f90module-visibility=0
make all
- name: PETSc - Install (macOS)
if: contains( matrix.os, 'macos')
run: |
cd petsc-${PETSC_VERSION}
./configure --with-fc=gfortran-${GCC_V} --with-cc=gcc-${GCC_V} --with-cxx=g++-${GCC_V} \
--download-openmpi --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
--download-openmpi --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib \
--with-mpi-f90module-visibility=1
make all
- name: DAMASK - Compile
@ -100,19 +84,21 @@ jobs:
run: |
./bin/DAMASK_grid -l tensionX.yaml -g 20grains16x16x16.vti -w examples/grid
intel:
runs-on: [ubuntu-latest]
runs-on: [ubuntu-22.04]
strategy:
matrix:
intel_v: [classic, llvm] # Variant of Intel compilers
fail-fast: false
env:
INTEL_V: ${{ matrix.intel_v }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Intel - Install
run: |
@ -130,7 +116,7 @@ jobs:
- name: PETSc - Cache download
id: petsc-download
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: download
key: petsc-${{ env.PETSC_VERSION }}.tar.gz
@ -143,13 +129,15 @@ jobs:
- name: PETSc - Prepare
run: |
tar -xf download/petsc-${PETSC_VERSION}.tar.gz -C .
sed -i "1718s/if not os.path.isfile(os.path.join(self.packageDir,'configure')):/if True:/g" \
./petsc-${PETSC_VERSION}/config/BuildSystem/config/package.py
export PETSC_DIR=${PWD}/petsc-${PETSC_VERSION}
export PETSC_ARCH=intel-${INTEL_V}
printenv >> $GITHUB_ENV
- name: PETSc - Cache installation
id: petsc-install
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: petsc-${{ env.PETSC_VERSION }}
key: petsc-${{ env.PETSC_VERSION }}-intel-${{ matrix.intel_v }}-${{ hashFiles('**/petscversion.h') }}
@ -158,7 +146,10 @@ jobs:
if: contains( matrix.intel_v, 'classic')
run: |
cd petsc-${PETSC_VERSION}
./configure --with-fc=mpiifort --with-cc=mpiicc --with-cxx=mpiicpc \
./configure \
--with-fc='mpiifort -fc=ifort -diag-disable=10441' \
--with-cc='mpiicc -cc=icc -diag-disable=10441' \
--with-cxx='mpiicpc -cxx=icpc -diag-disable=10441' \
--download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
make all
@ -166,7 +157,10 @@ jobs:
if: contains( matrix.intel_v, 'llvm')
run: |
cd petsc-${PETSC_VERSION}
./configure --with-fc=mpiifort --with-cc="mpiicc -cc=icx" --with-cxx="mpiicpc -cxx=icpx" \
./configure \
--with-fc='mpiifort -fc=ifx' \
--with-cc='mpiicc -cc=icx' \
--with-cxx='mpiicpc -cxx=icpx' \
--download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
make all

View File

@ -9,22 +9,22 @@ jobs:
strategy:
matrix:
python-version: ['3.8', '3.9'] #, '3.10']
python-version: ['3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pandas scipy h5py vtk matplotlib pyyaml
pip install pytest pandas scipy h5py vtk matplotlib pyyaml build
- name: Strip git hash (Unix)
if: runner.os != 'Windows'
@ -39,6 +39,13 @@ jobs:
$VERSION,$_ = $VERSION -Split '-g',2,"simplematch"
$VERSION | Out-File VERSION
- name: Build and Install
run: |
cd python
python -m build
python -m pip install dist/*.whl
python -c 'import damask;print(damask.__version__)'
- name: Install and run unit tests (Unix)
if: runner.os != 'Windows'
run: |
@ -56,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install pytest
run: |

View File

@ -47,9 +47,9 @@ variables:
PETSC_INTELLLVM: "Libraries/PETSc/3.16.3/oneAPI-2022.0.1-IntelMPI-2021.5.0"
PETSC_INTEL: "Libraries/PETSc/3.16.5/Intel-2022.0.1-IntelMPI-2021.5.0"
# ++++++++++++ MSC Marc +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MSC: "FEM/MSC/2022.1"
MSC: "FEM/MSC/2022.4"
IntelMarc: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
HDF5Marc: "HDF5/1.12.1/Intel-19.1.2"
HDF5Marc: "HDF5/1.12.2/Intel-19.1.2"
###################################################################################################
@ -63,12 +63,19 @@ create_testroot:
###################################################################################################
setuptools:
stage: python
script:
- sed -i 's/-[[:digit:]]*-.*//' VERSION
- cd python
- python3 -m build --wheel --no-isolation
pytest:
stage: python
script:
- cd python
- pytest --basetemp ${TESTROOT}/python -v --cov --cov-report=term
- coverage report --fail-under=90
- pytest --basetemp ${TESTROOT}/python -v --cov
- coverage report --fail-under=90 --show-missing
mypy:
stage: python

View File

@ -11,7 +11,7 @@ endif()
project(Prerequisites LANGUAGES)
set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
pkg_check_modules(PETSC_MIN REQUIRED PETSc>=3.12.0 QUIET) #CMake does not support version range
pkg_check_modules(PETSC REQUIRED PETSc<3.18.0)
pkg_check_modules(PETSC REQUIRED PETSc<3.19.0)
pkg_get_variable(CMAKE_Fortran_COMPILER PETSc fcompiler)
pkg_get_variable(CMAKE_C_COMPILER PETSc ccompiler)
@ -90,14 +90,21 @@ endif()
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
include(Compiler-Intel)
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
include(Compiler-GNU)
set(Fortran_COMPILER_VERSION_MIN 9.1)
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
include(Compiler-Intel)
set(Fortran_COMPILER_VERSION_MIN 19)
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM")
include(Compiler-IntelLLVM)
set(Fortran_COMPILER_VERSION_MIN 19)
else()
message(FATAL_ERROR "Compiler type(CMAKE_Fortran_COMPILER_ID) not recognized")
message(FATAL_ERROR "Compiler '${CMAKE_Fortran_COMPILER_ID}' not supported")
endif()
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS Fortran_COMPILER_VERSION_MIN)
message(FATAL_ERROR "Version '${CMAKE_Fortran_COMPILER_VERSION}' of '${CMAKE_Fortran_COMPILER_ID}' is not supported")
endif()
file(STRINGS "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/petsc/conf/petscvariables" PETSC_EXTERNAL_LIB REGEX "PETSC_EXTERNAL_LIB_BASIC = .*$?")

View File

@ -1,4 +1,4 @@
Copyright 2011-2022 Max-Planck-Institut für Eisenforschung GmbH
Copyright 2011-2023 Max-Planck-Institut für Eisenforschung GmbH
DAMASK is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

@ -1 +1 @@
Subproject commit a8bd47ad55125b477e6c03277ee38ce3998a66ca
Subproject commit 547bfe56d67cba358a7bb9582f2f7c0e344befd8

View File

@ -1 +1 @@
3.0.0-alpha6-552-g938e8bd70
3.0.0-alpha7-307-g6ee31e2ab

View File

@ -29,8 +29,8 @@ set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
# preprocessor
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ftz")
# flush underflow to zero, automatically set if -O[1,2,3]
set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz")
# disable flush underflow to zero, will be set if -O[1,2,3]
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
# disables warnings ...
@ -95,8 +95,8 @@ set (DEBUG_FLAGS "${DEBUG_FLAGS},uninit")
# ... for uninitialized variables.
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
# ... initializes stack local variables to an unusual value to aid error detection
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0")
# ... capture all floating-point exceptions, sets -ftz automatically
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0 -ftz")
# ... capture all floating-point exceptions, need to overwrite -no-ftz
# disable due to compiler bug https://community.intel.com/t5/Intel-Fortran-Compiler/false-positive-stand-f18-and-IEEE-SELECTED-REAL-KIND/m-p/1227336
#set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")

View File

@ -14,8 +14,8 @@ if (OPTIMIZATION STREQUAL "OFF" OR OPTIMIZATION STREQUAL "DEBUG")
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
set (OPTIMIZATION_FLAGS "-O2")
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
set (OPTIMIZATION_FLAGS "-ipo -O3 -fp-model fast=2 -xHost")
# -fast = -ipo, -O3, -no-prec-div, -static, -fp-model fast=2, and -xHost"
#set (OPTIMIZATION_FLAGS "-ipo -O3 -fp-model fast=2 -xHost") # ifx 2022.0 has problems with YAML types and IPO
set (OPTIMIZATION_FLAGS "-O3 -fp-model fast=2 -xHost")
endif ()
# -assume std_mod_proc_name (included in -standard-semantics) causes problems if other modules
@ -29,8 +29,8 @@ set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
# preprocessor
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ftz")
# flush underflow to zero, automatically set if -O[1,2,3]
set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz")
# disable flush underflow to zero, will be set if -O[1,2,3]
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
# disables warnings ...
@ -95,8 +95,8 @@ set (DEBUG_FLAGS "${DEBUG_FLAGS},uninit")
# ... for uninitialized variables.
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
# ... initializes stack local variables to an unusual value to aid error detection
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0")
# ... capture all floating-point exceptions, sets -ftz automatically
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0 -ftz")
# ... capture all floating-point exceptions, need to overwrite -no-ftz
# disable due to compiler bug https://community.intel.com/t5/Intel-Fortran-Compiler/false-positive-stand-f18-and-IEEE-SELECTED-REAL-KIND/m-p/1227336
#set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")

View File

@ -1,62 +0,0 @@
type: dislotwin
output: [rho_mob, rho_dip, gamma_sl, Lambda_sl, tau_pass, f_tw, Lambda_tw, f_tr]
# Slip
N_sl: [12]
b_sl: [2.56e-10]
Q_sl: [3.5e-19]
p_sl: [0.325]
q_sl: [1.55]
B: [0.001]
i_sl: [30.0]
rho_mob_0: [1.0e+12]
rho_dip_0: [1.0]
v_0: [1.0e+4]
tau_0: [3.5e+8]
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)
h_tw-sl: [0.0] # ToDo: values not known
# Twin
N_tw: [12]
b_tw: [1.40e-10]
L_tw: 1.8e-7
i_tw: 10.0
t_tw: [5.0e-8]
p_tw: [3.0] # A
h_tw-tw: [0.0, 1.0] # ToDo: values not known
h_sl-tw: [0.0, 1.0, 1.0] # ToDo: values not known
# Transformation
N_tr: [12]
b_tr: [1.40e-10]
L_tr: 1.8e-7
i_tr: 3.0
t_tr: [1.0e-7]
p_tr: [3.0] # B
V_mol: 7.09e-6
Delta_G: 1.33343932e+02
Delta_G,T: 2.56640412
Delta_G,T^2: 1.49524179e-03
h_tr-tr: [1.0, 1.0] # guessing
h_sl-tr: [0.0, 1.0, 1.0] # guessing
# Twin & Transformation
T_ref: 298.15
Gamma_sf: 2.89394017e-02
Gamma_sf,T: 1.22823814e-04
Gamma_sf,T^2: 1.47322968e-07
x_c: 1.0e-9
V_cs: 1.67e-29
a_cF: 3.62e-10
c/a_hP: 1.633
# Slip & Twin & Transformation
D: 2.0e-5

View File

@ -80,4 +80,4 @@ commercialFEM:
generic:
random_seed: 0 # fixed seeding for pseudo-random number generator, Default 0: use random seed.
residualStiffness: 1.0e-6 # non-zero residual damage.
phi_min: 1.0e-6 # non-zero residual damage.

View File

@ -4,10 +4,11 @@ references:
- R.H. Bogaard et al.,
Thermochimica Acta 218:373-393, 1993,
https://doi.org/10.1016/0040-6031(93)80437-F,
fit to Fig. 6 (T_min=100K, T_max=1400K)
fit to Fig. 6 (T_min=100K, T_max=1200K)
A_11: 2.068e-08
A_11,T: 1.579e-09
A_11,T^2: 3.449e-13
Alpha_11: 14.9e-6
Alpha_11,T: 1.838e-08
Alpha_11,T^2: -2.028e-11
Alpha_11,T^3: 9.173e-15
T_ref: 293.15

View File

@ -4,4 +4,4 @@ references:
- https://en.wikipedia.org/wiki/Thermal_expansion,
293.15K
A_11: 23.1e-6
Alpha_11: 23.1e-6

View File

@ -4,4 +4,4 @@ references:
- https://en.wikipedia.org/wiki/Thermal_expansion,
293.15K
A_11: 14.e-6
Alpha_11: 14.e-6

View File

@ -4,8 +4,8 @@ references:
- https://commons.wikimedia.org/wiki/File:Coefficient_dilatation_lineique_aciers.svg,
fit to image description (Scilab code)
A_11: 12.70371e-6
A_11,T: 7.54e-9
A_11,T^2: -1.0e-11
Alpha_11: 10.2e-6
Alpha_11,T: 1.260e-08
Alpha_11,T^2: -1.000e-11
T_ref: 273.0
T_ref: 293.15

View File

@ -4,4 +4,4 @@ references:
- https://en.wikipedia.org/wiki/Thermal_expansion,
293.15K
A_11: 17.e-6
Alpha_11: 17.e-6

View File

@ -4,4 +4,4 @@ references:
- https://en.wikipedia.org/wiki/Thermal_expansion,
293.15K
A_11: 11.8e-6
Alpha_11: 11.8e-6

View File

@ -0,0 +1,16 @@
type: thermalexpansion
references:
- Z. Li and R.C. Bradt,
Journal of the American Ceramic Society 69(12):863-866, 1986,
https://doi.org/10.1111/j.1151-2916.1986.tb07385.x
Alpha_11: 3.27e-6
Alpha_11,T: 3.25e-9
Alpha_11,T^2: -1.36e-12
Alpha_33: 3.18e-6
Alpha_33,T: 2.48e-9
Alpha_33,T^2: -8.51e-13
T_ref: 273.15

View File

@ -0,0 +1,12 @@
type: thermalexpansion
references:
- Z. Li and R.C. Bradt,
Journal of Materials Science 21:4366-4368, 1986,
https://doi.org/10.1007/BF01106557
Alpha_11: 3.19e-6
Alpha_11,T: 3.60e-9
Alpha_11,T^2: -1.68e-12
T_ref: 273.15

View File

@ -6,12 +6,12 @@ references:
https://doi.org/10.1107/S0365110X62000742,
fit to Tab. 2 (T_min=30ºC, T_max=210ºC)
A_11: 1.639e-05
A_11,T: 1.799e-08
A_11,T^2: 1.734e-10
Alpha_11: 16.4e-6
Alpha_11,T: 1.799e-08
Alpha_11,T^2: 1.734e-10
A_33: 3.263e-05
A_33,T: 1.387e-08
A_33,T^2: 5.794e-10
Alpha_33: 32.6e-6
Alpha_33,T: 1.387e-08
Alpha_33,T^2: 5.794e-10
T_ref: 293.15

View File

@ -4,4 +4,4 @@ references:
- https://en.wikipedia.org/wiki/Thermal_expansion,
293.15K
A_11: 4.5e-6
Alpha_11: 4.5e-6

View File

@ -2,9 +2,9 @@ type: thermalexpansion
references:
- https://commons.wikimedia.org/wiki/File:Coefficient_dilatation_lineique_aciers.svg,
fit to image description (Scilab code)
fit to Scilab code for generating the image (T_min=100ºC, T_max=400ºC)
A_11: 11.365e-6
A_11,T: 5.0e-9
Alpha_11: 10.1e-6
Alpha_11,T: 5.000e-09
T_ref: 273.0
T_ref: 293.15

View File

@ -3,21 +3,23 @@ type: Hooke
references:
- J.R. Neighbours and G.A. Alers,
Physical Review 111:707-712, 1958,
https://doi.org/10.1103/PhysRev.111.707
https://doi.org/10.1103/PhysRev.111.707,
fit to Tab. I (T_min=100K, T_max=300K)
- Y.A. Chang and L. Himmel,
Journal of Applied Physics 37:3567-3572, 1966,
https://doi.org/10.1063/1.1708903
https://doi.org/10.1063/1.1708903,
fit to Tab. II (T_min=300K, T_max=800K)
C_11: 122.9e+9
C_11,T: -313.5e+5
C_11,T^2: -107.3e+2
C_11: 124.1e+9
C_11,T: -3.148e+7
C_11,T^2: -6.594e+3
C_12: 91.55e+9
C_12,T: -164.1e+5
C_12,T^2: -681.6e+1
C_12: 93.7e+9
C_12,T: -1.657e+7
C_12,T^2: -4.220e+3
C_44: 42.63e+9
C_44,T: -180.5e+5
C_44,T^2: -353.8e+1
C_44: 46.4e+9
C_44,T: -1.775e+7
C_44,T^2: -1.973e+3
T_ref: 300
T_ref: 293.15

View File

@ -6,20 +6,20 @@ references:
https://doi.org/10.1063/1.1713309,
fit to Tab. I (T_min=100K, T_max=300K)
- D. Gerlich and E.S. Fisher,
Journal of Physics and Chemistry of Solids 30:1197-1205, 1969
Journal of Physics and Chemistry of Solids 30:1197-1205, 1969,
https://doi.org/10.1016/0022-3697(69)90377-1,
fit to Tab. 2 (T_min=293K, T_max=900K)
C_11: 106.9e+9
C_11,T: -3.685e+7
C_11,T^2: -1.016e+4
C_11,T: -3.691e+7
C_11,T^2: -9.790e+3
C_12: 60.55e+9
C_12,T: -8.307e+6
C_12,T^2: -4.353e+3
C_12: 60.5e+9
C_12,T: -8.412e+6
C_12,T^2: -3.972e+3
C_44: 28.37e+9
C_44,T: -1.418e+7
C_44,T^2: -3.253e+3
C_44: 28.4e+9
C_44,T: -1.413e+7
C_44,T^2: -3.408e+3
T_ref: 293.15

View File

@ -1,11 +1,25 @@
type: Hooke
references:
- J.P. Hirth and J. Lothe,
Theory of Dislocations, 1982,
John Wiley & Sons,
page 837
- J.R. Neighbours and G.A. Alers,
Physical Review 111:707-712, 1958,
https://doi.org/10.1103/PhysRev.111.707,
fit to Tab. II (T_min=100K, T_max=300K)
- Y.A. Chang and L. Himmel,
Journal of Applied Physics 37:3567-3572, 1966,
https://doi.org/10.1063/1.1708903,
fit to Tab. III (T_min=300K, T_max=800K)
C_11: 186.e+9
C_12: 157.e+9
C_44: 42.e+9
C_11: 192.7e+9
C_11,T: -3.472e+7
C_11,T^2: 1.102e+3
C_12: 163.2e+9
C_12,T: -2.607e+7
C_12,T^2: 2.397e+3
C_44: 42.2e+9
C_44,T: -1.172e+7
C_44,T^2: -3.078e+3
T_ref: 293.15

View File

@ -1,21 +1,25 @@
type: Hooke
references:
- W.C. Overton, Jr. and J. Gaffney,
- W.C. Overton Jr. and J. Gaffney,
Physical Review 98(4):969-977, 1955,
https://doi.org/10.1103/PhysRev.98.969,
fit to Tab. I (T_min=100K, T_max=300K)
- Y.A. Chang and L. Himmel,
Journal of Applied Physics 37:3567-3572, 1966,
https://doi.org/10.1063/1.1708903,
fit to Tab. II (T_min=300K, T_max=800K)
C_11: 168.6e+9
C_11,T: -3.779e+7
C_11,T^2: -2.536e+4
C_11: 168.9e+9
C_11,T: -3.332e+7
C_11,T^2: -1.074e+4
C_12: 121.5e+9
C_12,T: -1.632e+7
C_12,T^2: -1.116e+4
C_12: 121.8e+9
C_12,T: -1.402e+7
C_12,T^2: -9.003e+3
C_44: 75.59e+9
C_44,T: -2.912e+7
C_44,T^2: -1.669e+4
C_44: 75.8e+9
C_44,T: -2.555e+7
C_44,T^2: -2.188e+3
T_ref: 293.15

View File

@ -6,16 +6,16 @@ references:
https://doi.org/10.1063/1.1661710
fit to Tab. II (T_min=25ºC, T_max=880ºC)
C_11: 232.1e+9
C_11,T: -4.678e+7
C_11,T^2: -5.762e+4
C_11: 232.2e+9
C_11,T: -4.683e+7
C_11,T^2: -5.988e+4
C_12: 135.9e+9
C_12,T: -1.695e+7
C_12,T^2: 1.555e+3
C_12: 136.4e+9
C_12,T: -1.970e+7
C_12,T^2: 3.760e+3
C_44: 117.0e+9
C_44,T: -2.047e+7
C_44,T^2: -2.814e+2
C_44,T: -2.015e+7
C_44,T^2: -7.485e+2
T_ref: 293.15

View File

@ -4,18 +4,15 @@ references:
- Wang et al.,
Materials Science and Engineering:A 674:406-412, 2016,
https://doi.org/10.1016/j.msea.2016.08.010,
fitted to Tab. 2 (last 3 rows)
fit to Tab. 2 (last 3 rows)
C_11: 243.3e+9
C_11,T: -6.380e+5
C_11,T^2: -8.362e+4
C_11: 243.9e+9
C_11,T: -5.410e+7
C_12: 156.7e+9
C_12,T: 2.091e+7
C_12,T^2: -4.675e+4
C_12: 157.0e+9
C_12,T: -9.352e+6
C_44: 117.8e+9
C_44,T: -3.800e+7
C_44,T^2: 1.587e+4
C_44: 117.9e+9
C_44,T: -2.798e+7
T_ref: 293.15

View File

@ -6,23 +6,23 @@ references:
https://doi.org/10.1103/PhysRev.107.972,
fit to Tab. I (T_min=100K, T_max=300K)
C_11: 59.50e+9
C_11: 59.5e+9
C_11,T: -1.930e+7
C_11,T^2: -1.215e+4
C_33: 61.72e+9
C_33,T: -2.175e+7
C_33,T^2: -5.624e+3
C_44: 16.46e+9
C_44,T: -1.006e+7
C_44,T^2: -7.692e+3
C_12: 25.62e+9
C_12: 25.6e+9
C_12,T: -2.216e+6
C_12,T^2: -4.138e+3
C_13: 21.46e+9
C_44: 16.5e+9
C_44,T: -1.006e+7
C_44,T^2: -7.692e+3
C_33: 61.7e+9
C_33,T: -2.175e+7
C_33,T^2: -5.624e+3
C_13: 21.5e+9
C_13,T: -1.921e+6
C_13,T^2: -4.283e+3

View File

@ -7,15 +7,15 @@ references:
fit to Tab. 2 (T_min=100K, T_max=700K)
C_11: 251.0e+9
C_11,T: -4.998e+7
C_11,T^2: -2.952e+4
C_11,T: -4.967e+7
C_11,T^2: -3.327e+4
C_12: 150.0e+9
C_12,T: -4.269e+6
C_12,T^2: -6.429e+3
C_12,T: -3.714e+6
C_12,T^2: -7.414e+3
C_44: 123.7e+9
C_44,T: -3.618e+7
C_44,T^2: -7.024e+3
C_44,T: -3.621e+7
C_44,T^2: -8.017e+3
T_ref: 293.15

View File

@ -4,29 +4,24 @@ references:
- J.A. Rayne and B.S. Chandrasekhar,
Physical Review 120(5):1658-1663, 1960,
https://doi.org/10.1103/PhysRev.120.1658,
fit to Fig. 2 (T_min=100K, T_max=300K) and Tab. IV (C_13, T_min=77K, T_max=300K)
fit to Tab. IV (T_min=77K, T_max=300K)
C_11: 72.90e+9
C_11,T: -4.399e+7
C_11,T^2: -2.645e+4
C_11: 72.6e+9
C_11,T: -4.135e+7
C_12: 59.27e+9
C_12,T: 1.058e+7
C_12,T^2: 1.002e+4
C_12: 59.4e+9
C_12,T: 6.726e+6
C_13: 35.80e+9
C_44: 22.2e+9
C_44,T: -1.870e+7
C_33: 88.8e+9
C_33,T: -5.381e+7
C_13: 35.8e+9
C_13,T: -2.870e+6
C_33: 88.78e+9
C_33,T: -5.250e+7
C_33,T^2: 3.546e+3
C_44: 22.26e+9
C_44,T: -1.982e+7
C_44,T^2: -8.711e+3
C_66: 24.18e+9
C_66,T: -1.806e+7
C_66,T^2: -4.112e+3
C_66: 24.1e+9
C_66,T: -1.709e+7
T_ref: 293.15

View File

@ -0,0 +1,21 @@
type: Hooke
references:
- F.H. Featherston and J.R. Neighbours,
Physical Review 130(4):1324-1333, 1963,
https://doi.org/10.1103/PhysRev.130.1324,
fit to Tab. II (T_min=100K, T_max=300K)
C_11: 523.6e+9
C_11,T: -7.704e+7
C_11,T^2: -1.562e+5
C_12: 204.6e+9
C_12,T: -2.485e+7
C_12,T^2: -1.182e+5
C_44: 160.7e+9
C_44,T: -1.028e+7
C_44,T^2: 1.291e+4
T_ref: 293.15

View File

@ -4,30 +4,26 @@ references:
- E.S. Fisher and C.J. Renken,
Physical Review 135(2A):A482-A494, 1964,
https://doi.org/10.1103/PhysRev.135.A482,
fit to Tab. IV (T_min=150K, T_max=250K)
- H. Ogi et al.,
Acta Materialia 52(7):2075-2080, 2004,
https://doi.org/10.1016/j.actamat.2004.01.002,
fit to Fig. 3 (T_min=300K, T_max=900K)
fit to Tab. IV (T_min=77K, T_max=923K)
C_11: 162.6e+9
C_11,T: -6.150e+7
C_11,T^2: -5.557e+2
C_11: 162.5e+9
C_11,T: -5.915e+7
C_11,T^2: 1.156e+4
C_33: 183.3e+9
C_33,T: -1.655e+07
C_33,T^2: -1.022e+04
C_12: 91.8e+9
C_12,T: 2.192e+7
C_12,T^2: -1.621e+4
C_44: 45.80e+9
C_44,T: -2.936e+07
C_44,T^2: 7.120e+02
C_44: 46.8e+9
C_44,T: -1.857e+7
C_44,T^2: -3.745e+3
C_12: 89.97e+9
C_12,T: 2.776e+6
C_12,T^2: -2.389e+4
C_33: 180.6e+9
C_33,T: -4.110e+7
C_33,T^2: 7.330e+3
C_13: 69.53e+9
C_13,T: 1.057e+7
C_13,T^2: -2.966e+3
C_13: 68.9e+9
C_13,T: 2.965e+6
C_13,T^2: -5.767e+3
T_ref: 293.15

View File

@ -1,20 +1,18 @@
type: Hooke
references:
- F.H. Featherston and J.R. Nieghbours,
Physical Review 130(4):1324-1333,
- F.H. Featherston and J.R. Neighbours,
Physical Review 130(4):1324-1333, 1963,
https://doi.org/10.1103/PhysRev.130.1324,
fit to Tab. III (T_min=100K, T_max=300K)
C_11: 523.6e+9
C_11,T: -7.607e+7
C_11,T^2: -1.551e+5
C_11: 524.3e+9
C_11,T: -4.794e+07
C_12: 205.1e+9
C_12,T: -2.843e+6
C_12,T: -2.836e+06
C_44: 160.8e+9
C_44,T: -1.057e+7
C_44,T^2: 9.933e+3
C_44: 160.7e+9
C_44,T: -1.269e+07
T_ref: 293.15

View File

@ -26,7 +26,7 @@ h_sl-sl: [0.009, 0.72, 0.009, 0.05, 0.05, 0.06, 0.09]
w: [2.992e-09] # 11b
# values in Cereceda et al. are high, using parameters from Gröger et al.
a_nonSchmid: [0.0, 0.56, 0.75] # Table 2
a_nonSchmid: [0.0, 0.56, 0.75] # Tab. 2
# (almost) no annhilation, adjustment needed for simulations beyond the yield point
i_sl: [1] # c, eq. (25)

View File

@ -13,7 +13,7 @@ output: [rho_dip, rho_mob]
N_sl: [12, 12]
b_sl: [2.49e-10, 2.49e-10]
rho_mob_0: [2.81e12, 2.8e+12]
rho_mob_0: [2.81e+12, 2.8e+12]
rho_dip_0: [1.0, 1.0] # not given
v_0: [1.4e+3, 1.4e+3]
Q_sl: [1.57e-19, 1.57e-19] # Delta_F

View File

@ -0,0 +1,72 @@
type: dislotwin
references:
- S.L. Wong et al.,
Acta Materialia 118:140-151, 2016,
https://doi.org/10.1016/j.actamat.2016.07.032
- K. Sedighiani et al.,
Mechanics of Materials, 164:104117, 2022,
https://doi.org/10.1016/j.mechmat.2021.104117
- L. Kubin et al.,
Acta Materialia 56:6040-6049,
https://doi.org/10.1016/j.actamat.2008.08.012
output: [rho_mob, rho_dip, gamma_sl, Lambda_sl, tau_pass, f_tw, Lambda_tw, f_tr]
# Glide
N_sl: [12]
b_sl: [2.56e-10] # a/sqrt(2)
Q_sl: [3.5e-19]
p_sl: [0.325]
q_sl: [1.55]
B: [0.001]
i_sl: [30.0]
v_0: [1.4e+3]
tau_0: [5.5e+8] # adjusted
D_a: 2.0
Q_cl: 3.0e-19
rho_mob_0: [5.0e+10]
rho_dip_0: [5.0e+10]
h_sl-sl: [0.122, 0.122, 0.625, 0.07, 0.137, 0.137, 0.122]
# Twin
N_tw: [12]
b_tw: [1.47e-10] # a_cF/sqrt(6)
L_tw: 1.91e-7 # 1300 *b_tw
i_tw: 10.0
t_tw: [5.0e-8]
p_tw: [7] # A, adjusted
h_tw-tw: [1.0, 1.0]
h_sl-tw: [1.0, 1.0, 1.0]
# Transformation
N_tr: [12]
b_tr: [1.47e-10] # a_cF/sqrt(6)
L_tr: 2.21e-7 # 1500 *b_tr
i_tr: 10.0 # adjusted
t_tr: [1.0e-7]
p_tr: [4] # B, adjusted
V_mol: 7.09e-6
c/a_hP: 1.633
Delta_G: 1.2055e+2
Delta_G,T: 2.5515
Delta_G,T^2: 1.4952e-3
h_tr-tr: [1.0, 1.0]
h_sl-tr: [1.5, 1.5, 1.5]
# Twin & Transformation
T_ref: 293.15
Gamma_sf: 2.833e-2
Gamma_sf,T: 1.214e-4
Gamma_sf,T^2: 1.473e-7
x_c: 1.0e-9
V_cs: 1.67e-29
# Slip & Twin & Transformation
D: 5.0e-5

View File

@ -40,7 +40,7 @@ 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
h_sl-sl: [0, 0, 0.625, 0.07, 0.137, 0.137, 0.122] # Tab. 3.4
chi_GB: 0.0 # full blocking at GB
chi_surface: 1.0 # no blocking at surface

View File

@ -40,7 +40,7 @@ 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
h_sl-sl: [0, 0, 0.625, 0.07, 0.137, 0.137, 0.122] # Tab. 3.4
chi_GB: 0.0 # full blocking at GB
chi_surface: 1.0 # no blocking at surface

View File

@ -7,9 +7,11 @@ references:
output: [T]
K_11: 2.380e+2
K_11,T: 2.068e-3
K_11,T^2: -7.765e-5
K_11: 2.374e+2
K_11,T: 8.952e-3
K_11,T^2: 2.650e-5
K_11,T^3: -5.687e-7
K_11,T^4: 6.407e-10
T_ref: 293.15

View File

@ -2,14 +2,16 @@ references:
- J.G. Hust and A.B. Lankford,
Thermal Conductivity of Aluminum, Copper, Iron, and Tungsten from 1K to the Melting Point,
US Department of Commerce, Boulder, Colorado, 1984,
fit to Tab. 2.4.1 (RRR=1000, T_min=200K, T_max=1000K)
fit to Tab. 2.4.1 (RRR=300, T_min=150K, T_max=1000K)
- https://www.mit.edu/~6.777/matprops/copper.htm
output: [T]
K_11: 4.039e+2
K_11,T: -8.119e-2
K_11,T^2: 1.454e-5
K_11: 4.005e+2
K_11,T: -1.075e-1
K_11,T^2: 3.293e-4
K_11,T^3: -7.533e-7
K_11,T^4: 5.223e-10
T_ref: 293.15

View File

@ -2,14 +2,15 @@ references:
- J.G. Hust and A.B. Lankford,
Thermal Conductivity of Aluminum, Copper, Iron, and Tungsten from 1K to the Melting Point,
US Department of Commerce, Boulder, Colorado, 1984,
fit to Tab. 4.4.1 (RRR=300, T_min=200K, T_max=1000K)
fit to Tab. 4.4.1 (RRR=300, T_min=150K, T_max=1000K)
- https://www.engineeringtoolbox.com/specific-heat-metals-d_152.html
output: [T]
K_11: 8.055e+1
K_11,T: -1.051e-1
K_11,T^2: 5.464e-5
K_11: 8.034e+1
K_11,T: -1.216e-1
K_11,T^2: 1.327e-4
K_11,T^3: -7.993e-8
T_ref: 293.15

View File

@ -2,14 +2,16 @@ references:
- Y.S. Touloukian et al.,
TPRC Data Series Volume 1. Thermal conductivity - metallic elements and alloys,
IFI/Plenum, 1970,
fit to Tab. 35R (T_min=150K, T_max=500K)
fit to Tab. 35R (T_min=80K, T_max=500K)
- https://www.engineeringtoolbox.com/specific-heat-metals-d_152.html
output: [T]
K_11: 9.132e+1
K_11,T: -1.525e-1
K_11,T^2: 3.053e-4
K_11: 9.311e+1
K_11,T: -8.719e-2
K_11,T^2: -3.793e-4
K_11,T^3: -4.003e-6
K_11,T^4: 2.676e-8
T_ref: 293.15

View File

@ -2,18 +2,22 @@ references:
- Y.S. Touloukian et al.,
TPRC Data Series Volume 1. Thermal conductivity - metallic elements and alloys,
IFI/Plenum, 1970,
fit to Tab. 61R (T_min=100K, T_max=400K)
fit to Tab. 61R (T_min=80K, T_max=500K)
- https://www.engineeringtoolbox.com/specific-heat-metals-d_152.html
output: [T]
K_11: 7.414e+1
K_11,T: -6.465e-2
K_11,T^2: 2.066e-4
K_11: 7.495e+1
K_11,T: -5.646e-2
K_11,T^2: 1.420e-5
K_11,T^3: -5.390e-7
K_11,T^4: 4.012e-9
K_33: 5.147e+1
K_33,T: -4.506e-2
K_33,T^2: 1.435e-4
K_33: 5.204e+1
K_33,T: -3.940e-2
K_33,T^2: 7.037e-6
K_33,T^3: -3.738e-7
K_33,T^4: 2.873e-9
T_ref: 293.15

View File

@ -2,14 +2,16 @@ references:
- J.G. Hust and A.B. Lankford,
Thermal Conductivity of Aluminum, Copper, Iron, and Tungsten from 1K to the Melting Point,
US Department of Commerce, Boulder, Colorado, 1984,
fit to Tab. 5.4.1 (RRR=300, T_min=200K, T_max=1000K)
fit to Tab. 5.4.1 (RRR=300, T_min=100K, T_max=2000K)
- https://www.mit.edu/~6.777/matprops/tungsten.htm
output: [T]
K_11: 1.758e+2
K_11,T: -1.605e-1
K_11,T^2: 1.160e-4
K_11: 1.750e+2
K_11,T: -1.809e-1
K_11,T^2: 2.257e-4
K_11,T^3: -1.395e-7
K_11,T^4: 3.192e-11
T_ref: 293.15

View File

@ -1,4 +1,4 @@
type: externalheat
f_T: [1, 1, 0, 0]
t_n: [0, 500, 500.001, 1000]
f: [1, 1, 0, 0]
t: [0, 500, 500.001, 1000]

View File

@ -46,7 +46,7 @@
+
+# determine DAMASK version
+if test -n "$DAMASK_USER"; then
+ DAMASKROOT=`dirname $DAMASK_USER`/..
+ DAMASKROOT=`dirname $DAMASK_USER`/../..
+ read DAMASKVERSION < $DAMASKROOT/VERSION
+ DAMASKVERSION="'"$DAMASKVERSION"'"
+else

View File

@ -251,7 +251,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -251,7 +251,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -251,7 +251,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -66,7 +66,7 @@
+ label {
+ position -32 +6
+ size 12 6
+ text "O2 / OpenMP"
+ text "O3 / OpenMP"
+ border_width 1
+ border_color black
+ }

View File

@ -46,7 +46,7 @@
+
+# determine DAMASK version
+if test -n "$DAMASK_USER"; then
+ DAMASKROOT=`dirname $DAMASK_USER`/..
+ DAMASKROOT=`dirname $DAMASK_USER`/../..
+ read DAMASKVERSION < $DAMASKROOT/VERSION
+ DAMASKVERSION="'"$DAMASKVERSION"'"
+else

View File

@ -284,7 +284,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -284,7 +284,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -284,7 +284,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -65,7 +65,7 @@
+ label {
+ position -32 +6
+ size 12 6
+ text "O2 / OpenMP"
+ text "O3 / OpenMP"
+ border_width 1
+ border_color black
+ }

View File

@ -50,7 +50,7 @@
+# determine DAMASK version
+if test -n "$DAMASK_USER"; then
+ DAMASKROOT=`dirname $DAMASK_USER`/..
+ DAMASKROOT=`dirname $DAMASK_USER`/../..
+ read DAMASKVERSION < $DAMASKROOT/VERSION
+ DAMASKVERSION="'"$DAMASKVERSION"'"
+else

View File

@ -283,7 +283,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -283,7 +283,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -301,7 +301,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"

View File

@ -67,7 +67,7 @@
+ label {
+ position -32 +6
+ size 12 6
+ text "O2 / OpenMP"
+ text "O3 / OpenMP"
+ border_width 1
+ border_color black
+ }

View File

@ -32,7 +32,7 @@
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,13 @@ echo "program: $program"
@@ -33,9 +42,13 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
@ -46,4 +46,4 @@
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod
+ /bin/rm $DIRJOB/*_genmod.f90
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -32,7 +32,7 @@
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,13 @@ echo "program: $program"
@@ -33,9 +42,13 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
@ -46,4 +46,4 @@
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod
+ /bin/rm $DIRJOB/*_genmod.f90
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -32,7 +32,7 @@
$LOAD ${program} $DIR/lib/main.o\
@@ -33,9 +42,13 @@ echo "program: $program"
@@ -33,9 +42,13 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
@ -46,4 +46,4 @@
/bin/rm $userobj
+ /bin/rm $DIRJOB/*.mod
+ /bin/rm $DIRJOB/*.smod
+ /bin/rm $DIRJOB/*_genmod.f90
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -1,6 +1,6 @@
---
+++
@@ -166,6 +166,11 @@ if test -n "$MSCCOSIM_HOME"; then
@@ -166,6 +166,15 @@
MARC_COSIM_LIB="$MSCCOSIM_HOME/Cosim$MSCCOSIM_VERSION/Dcosim$MSCCOSIM_VERSION/lib"
fi
@ -16,17 +16,7 @@
# AEM
if test "$MARCDLLOUTDIR" = ""; then
DLLOUTDIR="$MARC_LIB"
@@ -477,8 +486,8 @@ if test "$MARC_INTEGER_SIZE" = "i4" ; then
I8DEFINES=
I8CDEFINES=
else
- I8FFLAGS="-i8"
+ I8FFLAGS="-i8 -integer-size 64"
I8DEFINES="-DI64"
I8CDEFINES="-U_DOUBLE -D_SINGLE"
fi
@@ -594,7 +605,7 @@ then
@@ -594,7 +603,7 @@
PROFILE=" $PROFILE -pg"
fi
@ -35,7 +25,7 @@
if test "$MTHREAD" = "OPENMP"
then
FORT_OPT=" $FORT_OPT -qopenmp"
@@ -607,7 +616,7 @@ else
@@ -607,7 +616,7 @@
FORT_OPT=" $FORT_OPT -save -zero"
fi
if test "$MARCHDF_HDF" = "HDF"; then
@ -44,13 +34,13 @@
fi
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
@@ -621,6 +630,29 @@ FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
@@ -621,6 +630,29 @@
# 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`/..
+ DAMASKROOT=`dirname $DAMASK_USER`/../..
+ read DAMASKVERSION < $DAMASKROOT/VERSION
+ DAMASKVERSION="'"$DAMASKVERSION"'"
+else
@ -74,30 +64,12 @@
if test "$MARCDEBUG" = "ON"
then
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
@@ -778,7 +806,7 @@ SECLIBS="-L$MARC_LIB -llapi"
@@ -778,7 +810,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
@@ -802,7 +830,7 @@ then
OPENSSL=NONE
fi
-SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib $MARC_RPC_LIB"
+SYSLIBS=" $OPENMP -lpthread -cxxlib $MARC_RPC_LIB"
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
# if test $MPITYPE = intelmpi
@@ -812,7 +840,7 @@ SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib $MARC_RPC_LIB"
# 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 $MARC_RPC_LIB"
+ SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -cxxlib $MARC_RPC_LIB"
fi
if test "$ZLIB" = "ZLIB"; then

View File

@ -1,6 +1,6 @@
---
+++
@@ -302,7 +302,23 @@ fi
@@ -302,7 +302,23 @@
. "$DIR/getarch"
@ -24,7 +24,7 @@
#
#
@@ -405,7 +421,7 @@ sid=
@@ -405,7 +421,7 @@
did=
vid=
user=
@ -33,16 +33,7 @@
objs=
qid=background
cpu=
@@ -573,7 +589,7 @@ do
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -676,50 +692,19 @@ do
@@ -676,50 +692,19 @@
esac
;;
-u* | -U*)
@ -99,39 +90,7 @@
;;
-obj | -OBJ)
objs="$value"
@@ -739,19 +724,19 @@ do
;;
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
;;
@@ -1207,12 +1192,12 @@ post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 or $DIRPID/$pid.h5 not accessible
@@ -1207,12 +1192,12 @@
fi
fi
fi
@ -147,16 +106,7 @@
fi
fi
if test "$objs"
@@ -1386,7 +1371,7 @@ else
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1531,7 +1516,7 @@ Program name : $prog
@@ -1531,7 +1516,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
@ -165,7 +115,7 @@
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1564,7 +1549,7 @@ Program name : $prog
@@ -1564,7 +1549,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
@ -174,7 +124,7 @@
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1687,7 +1672,7 @@ Program name ($prog)? $ECHOTXT"
@@ -1687,7 +1672,7 @@
;;
esac
fi
@ -183,7 +133,7 @@
read value
if test "$value"
then
@@ -1696,50 +1681,19 @@ Program name ($prog)? $ECHOTXT"
@@ -1696,50 +1681,19 @@
user=
;;
*)
@ -209,16 +159,13 @@
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
@ -235,8 +182,6 @@
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -245,7 +190,7 @@
;;
esac
fi
@@ -2274,11 +2228,12 @@ fi
@@ -2274,11 +2228,12 @@
#
# user subroutine used
#
@ -260,7 +205,7 @@
case $program in
\/* | \.\/*)
bd=
@@ -2391,7 +2346,7 @@ fi
@@ -2391,7 +2346,7 @@
fi
if test "$user"
then
@ -269,7 +214,7 @@
usersub=1
fi
export execpath
@@ -3274,44 +3229,27 @@ then
@@ -3274,44 +3229,27 @@
echo
if test "$user"
then
@ -283,7 +228,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
@ -319,21 +264,15 @@
fi
@@ -3331,10 +3269,11 @@ then
@@ -3331,6 +3269,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -3344,6 +3283,9 @@ else
@@ -3344,6 +3283,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
@ -343,7 +282,7 @@
#
# run marc
@@ -3390,7 +3332,7 @@ if test $dllrun -eq 0; then
@@ -3390,7 +3332,7 @@
fi
else
if test $cpdll = yes; then
@ -352,7 +291,7 @@
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3556,7 +3498,7 @@ then
@@ -3556,7 +3498,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
@ -361,7 +300,7 @@
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3569,21 +3511,21 @@ then
@@ -3569,21 +3511,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
@ -386,7 +325,7 @@
fi
fi
fi
@@ -3593,39 +3535,27 @@ then
@@ -3593,39 +3535,27 @@
if test "$userhost"
then
echo
@ -432,21 +371,15 @@
fi # if test $user
@@ -3645,10 +3575,11 @@ then
@@ -3645,6 +3575,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
echo " $PRODUCT Exit number 3"
@@ -3686,6 +3617,9 @@ else # if test $link
@@ -3686,6 +3617,9 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
@ -456,69 +389,7 @@
#
# run marc
@@ -3744,42 +3678,42 @@ then
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
@@ -3779,7 +3713,7 @@
else
#dllrun >0
if test $cpdll = yes; then
@ -527,7 +398,7 @@
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3904,7 +3838,7 @@ then
@@ -3904,7 +3838,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
@ -536,7 +407,7 @@
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3917,20 +3851,20 @@ then
@@ -3917,20 +3851,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
@ -560,7 +431,7 @@
fi
fi
fi
@@ -3940,37 +3874,25 @@ then
@@ -3940,37 +3874,25 @@
if test "$userhost"
then
echo
@ -604,7 +475,7 @@
fi # if test $user
@@ -3990,10 +3912,11 @@ then
@@ -3990,6 +3912,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
@ -612,12 +483,7 @@
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -4030,7 +3953,9 @@ else # if test $link
@@ -4030,7 +3953,9 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
@ -628,78 +494,7 @@
# done if no job id given
if test -z "$jid"
then
@@ -4070,7 +3995,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4114,42 +4039,42 @@ then
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
@@ -4149,7 +4074,7 @@
else
#dllrun >0
if test $cpdll = yes; then

View File

@ -1,6 +1,6 @@
---
+++
@@ -302,7 +302,23 @@ fi
@@ -302,7 +302,23 @@
. "$DIR/getarch"
@ -24,7 +24,7 @@
#
#
@@ -405,7 +421,7 @@ sid=
@@ -405,7 +421,7 @@
did=
vid=
user=
@ -33,16 +33,7 @@
objs=
qid=background
cpu=
@@ -573,7 +589,7 @@ do
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -676,50 +692,19 @@ do
@@ -676,50 +692,19 @@
esac
;;
-u* | -U*)
@ -99,39 +90,7 @@
;;
-obj | -OBJ)
objs="$value"
@@ -739,19 +724,19 @@ do
;;
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
;;
@@ -1207,12 +1192,12 @@ post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 or $DIRPID/$pid.h5 not accessible
@@ -1207,12 +1192,12 @@
fi
fi
fi
@ -147,16 +106,7 @@
fi
fi
if test "$objs"
@@ -1386,7 +1371,7 @@ else
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1531,7 +1516,7 @@ Program name : $prog
@@ -1531,7 +1516,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
@ -165,7 +115,7 @@
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1564,7 +1549,7 @@ Program name : $prog
@@ -1564,7 +1549,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
@ -174,7 +124,7 @@
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1687,7 +1672,7 @@ Program name ($prog)? $ECHOTXT"
@@ -1687,7 +1672,7 @@
;;
esac
fi
@ -183,7 +133,7 @@
read value
if test "$value"
then
@@ -1696,50 +1681,19 @@ Program name ($prog)? $ECHOTXT"
@@ -1696,50 +1681,19 @@
user=
;;
*)
@ -209,16 +159,13 @@
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
@ -235,8 +182,6 @@
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -245,7 +190,7 @@
;;
esac
fi
@@ -2274,11 +2228,12 @@ fi
@@ -2274,11 +2228,12 @@
#
# user subroutine used
#
@ -260,7 +205,7 @@
case $program in
\/* | \.\/*)
bd=
@@ -2391,7 +2346,7 @@ fi
@@ -2391,7 +2346,7 @@
fi
if test "$user"
then
@ -269,7 +214,7 @@
usersub=1
fi
export execpath
@@ -3274,44 +3229,27 @@ then
@@ -3274,44 +3229,27 @@
echo
if test "$user"
then
@ -283,7 +228,7 @@
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
@ -319,21 +264,15 @@
fi
@@ -3331,10 +3269,11 @@ then
@@ -3331,6 +3269,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -3344,6 +3283,9 @@ else
@@ -3344,6 +3283,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
@ -343,7 +282,7 @@
#
# run marc
@@ -3390,7 +3332,7 @@ if test $dllrun -eq 0; then
@@ -3390,7 +3332,7 @@
fi
else
if test $cpdll = yes; then
@ -352,7 +291,7 @@
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3556,7 +3498,7 @@ then
@@ -3556,7 +3498,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
@ -361,7 +300,7 @@
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3569,21 +3511,21 @@ then
@@ -3569,21 +3511,21 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
@ -386,7 +325,7 @@
fi
fi
fi
@@ -3593,39 +3535,27 @@ then
@@ -3593,39 +3535,27 @@
if test "$userhost"
then
echo
@ -432,21 +371,15 @@
fi # if test $user
@@ -3645,10 +3575,11 @@ then
@@ -3645,6 +3575,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
echo " $PRODUCT Exit number 3"
@@ -3686,6 +3617,9 @@ else # if test $link
@@ -3686,6 +3617,9 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
@ -456,69 +389,7 @@
#
# run marc
@@ -3744,42 +3678,42 @@ then
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
@@ -3779,7 +3713,7 @@
else
#dllrun >0
if test $cpdll = yes; then
@ -527,7 +398,7 @@
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3904,7 +3838,7 @@ then
@@ -3904,7 +3838,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
@ -536,7 +407,7 @@
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3917,20 +3851,20 @@ then
@@ -3917,20 +3851,20 @@
remoteuser=$DIR1/`$BASENAME $user`
$RSH $i /bin/rm $remoteprog 2> /dev/null
echo
@ -560,7 +431,7 @@
fi
fi
fi
@@ -3940,37 +3874,25 @@ then
@@ -3940,37 +3874,25 @@
if test "$userhost"
then
echo
@ -604,7 +475,7 @@
fi # if test $user
@@ -3990,10 +3912,11 @@ then
@@ -3990,6 +3912,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
@ -612,12 +483,7 @@
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -4030,7 +3953,9 @@ else # if test $link
@@ -4030,7 +3953,9 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
@ -628,78 +494,7 @@
# done if no job id given
if test -z "$jid"
then
@@ -4070,7 +3995,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4114,42 +4039,42 @@ then
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
@@ -4149,7 +4074,7 @@
else
#dllrun >0
if test $cpdll = yes; then

View File

@ -1,8 +1,6 @@
diff --git "a/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_marc.original" "b/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_damask_mp"
index 88a3027..85beabe 100644
--- "a/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_marc.original"
+++ "b/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_damask_mp"
@@ -302,7 +302,23 @@ fi
---
+++
@@ -302,7 +302,23 @@
. "$DIR/getarch"
@ -26,7 +24,7 @@ index 88a3027..85beabe 100644
#
#
@@ -405,7 +421,7 @@ sid=
@@ -405,7 +421,7 @@
did=
vid=
user=
@ -35,16 +33,7 @@ index 88a3027..85beabe 100644
objs=
qid=background
cpu=
@@ -573,7 +589,7 @@ do
justlist=yes
;;
-fe* | -FE*)
- feature=$value
+ feature=$value
;;
-pr* | -PR*)
@@ -676,50 +692,19 @@ do
@@ -676,50 +692,19 @@
esac
;;
-u* | -U*)
@ -101,39 +90,7 @@ index 88a3027..85beabe 100644
;;
-obj | -OBJ)
objs="$value"
@@ -739,19 +724,19 @@ do
;;
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
;;
@@ -1207,12 +1192,12 @@ post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 or $DIRPID/$pid.h5 not accessible
@@ -1207,12 +1192,12 @@
fi
fi
fi
@ -149,16 +106,7 @@ index 88a3027..85beabe 100644
fi
fi
if test "$objs"
@@ -1386,7 +1371,7 @@ else
else
error="$error
job id required"
- fi
+fi
fi
case $qid in
@@ -1531,7 +1516,7 @@ Program name : $prog
@@ -1531,7 +1516,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
@ -167,16 +115,7 @@ index 88a3027..85beabe 100644
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1548,8 +1533,6 @@ GPGPU option : $gpuids
Host file name : $host" > $jid.log
if test "$iprintsimufact" = true ; then
echo "DDM with ARC Mapper : $ddm_arc" >> $jid.log
- echo "Mapper directory : $MESHERDIR" >> $jid.log
- echo "Meshing directory : $MESHERDIR" >> $jid.log
fi
echo \
"Message passing type : $itree
@@ -1564,7 +1547,7 @@ Program name : $prog
@@ -1564,7 +1549,7 @@
Marc shared lib : $progdll
Version type : $mode
Job ID : $DIRJID/$jid$extra_job_info
@ -185,16 +124,7 @@ index 88a3027..85beabe 100644
User objects/libs : $objs
Restart file job ID : $rid
Substructure file ID : $sid
@@ -1579,6 +1562,8 @@ Solver processes : $nsolverprint
Solver threads : $ntsprint"
if test "$iprintsimufact" = true ; then
echo "DDM with ARC Mapper : $ddm_arc"
+ echo "Mapper directory : $MESHERDIR" >> $jid.log
+ echo "Meshing directory : $MESHERDIR" >> $jid.log
fi
echo \
"GPGPU option : $gpuids
@@ -1687,7 +1672,7 @@ Program name ($prog)? $ECHOTXT"
@@ -1687,7 +1672,7 @@
;;
esac
fi
@ -203,7 +133,7 @@ index 88a3027..85beabe 100644
read value
if test "$value"
then
@@ -1696,50 +1681,19 @@ Program name ($prog)? $ECHOTXT"
@@ -1696,50 +1681,19 @@
user=
;;
*)
@ -229,16 +159,13 @@ index 88a3027..85beabe 100644
- fi
+ user=$value
case $user in
- \/*)
- ;;
- *)
+ \/*)
+ ;;
+ *)
\/*)
;;
*)
user=`pwd`/$user
- usersubname=`pwd`/$usersubname
- ;;
- esac
;;
esac
- if test ! -f $usersubname
- then
- if test -f $usersubname.f
@ -255,8 +182,6 @@ index 88a3027..85beabe 100644
- usersubname=$usersubname.F90
- fi
- fi
+ ;;
+ esac
+ usernoext=$user
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
+ usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -265,7 +190,7 @@ index 88a3027..85beabe 100644
;;
esac
fi
@@ -2274,11 +2228,12 @@ fi
@@ -2274,11 +2228,12 @@
#
# user subroutine used
#
@ -280,7 +205,7 @@ index 88a3027..85beabe 100644
case $program in
\/* | \.\/*)
bd=
@@ -2391,7 +2346,7 @@ fi
@@ -2391,7 +2346,7 @@
fi
if test "$user"
then
@ -289,7 +214,7 @@ index 88a3027..85beabe 100644
usersub=1
fi
export execpath
@@ -3274,44 +3229,27 @@ then
@@ -3274,44 +3229,27 @@
echo
if test "$user"
then
@ -303,7 +228,7 @@ index 88a3027..85beabe 100644
- usersub=$usersubname
- fi
-
+ userobj=$usermoext.o
+ userobj=$usernoext.o
fi
cat > $jid.runmarcscript << END4
if test "$user"
@ -315,7 +240,7 @@ index 88a3027..85beabe 100644
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
@ -324,7 +249,7 @@ index 88a3027..85beabe 100644
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
@ -339,21 +264,15 @@ index 88a3027..85beabe 100644
fi
@@ -3331,10 +3269,11 @@ then
@@ -3331,6 +3269,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -3344,6 +3283,9 @@ else
@@ -3344,6 +3283,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
@ -363,7 +282,7 @@ index 88a3027..85beabe 100644
#
# run marc
@@ -3390,7 +3332,7 @@ if test $dllrun -eq 0; then
@@ -3390,7 +3332,7 @@
fi
else
if test $cpdll = yes; then
@ -372,7 +291,7 @@ index 88a3027..85beabe 100644
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes
@@ -3556,7 +3498,7 @@ then
@@ -3556,7 +3498,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
@ -381,12 +300,12 @@ index 88a3027..85beabe 100644
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3569,21 +3511,21 @@ then
@@ -3569,21 +3511,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
+ $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"
@ -406,7 +325,7 @@ index 88a3027..85beabe 100644
fi
fi
fi
@@ -3593,39 +3535,27 @@ then
@@ -3593,39 +3535,27 @@
if test "$userhost"
then
echo
@ -426,7 +345,7 @@ index 88a3027..85beabe 100644
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
@ -436,7 +355,7 @@ index 88a3027..85beabe 100644
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
@ -452,21 +371,15 @@ index 88a3027..85beabe 100644
fi # if test $user
@@ -3645,10 +3575,11 @@ then
@@ -3645,6 +3575,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
- $SFLIB \
+ $DAMASK \
+ $SFLIB \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
echo " $PRODUCT Exit number 3"
@@ -3686,6 +3617,9 @@ else # if test $link
@@ -3686,6 +3617,9 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
@ -476,69 +389,7 @@ index 88a3027..85beabe 100644
#
# run marc
@@ -3744,42 +3678,42 @@ then
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
@@ -3779,7 +3713,7 @@
else
#dllrun >0
if test $cpdll = yes; then
@ -547,7 +398,7 @@ index 88a3027..85beabe 100644
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi
if test $rmdll = yes;then
@@ -3904,7 +3838,7 @@ then
@@ -3904,7 +3838,7 @@
# first copy over the user sub if local directories
if test ${dirstatus[$counter]} = "local"
then
@ -556,12 +407,12 @@ index 88a3027..85beabe 100644
fi
# do the compilation on the other machine
if test ${dirstatus[$counter]} = "shared"
@@ -3917,20 +3851,20 @@ then
@@ -3917,20 +3851,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
+ $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"
@ -580,7 +431,7 @@ index 88a3027..85beabe 100644
fi
fi
fi
@@ -3940,37 +3874,25 @@ then
@@ -3940,37 +3874,25 @@
if test "$userhost"
then
echo
@ -600,7 +451,7 @@ index 88a3027..85beabe 100644
if test $MACHINENAME = "CRAY"
then
- $FORTRAN $usersub || \
+ $DFORTRANMP $user || \
+ $DFORTHIGHMP $user || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
@ -609,7 +460,7 @@ index 88a3027..85beabe 100644
/bin/rm $program 2>/dev/null
else
- $FORTRAN $usersub -o $userobj || \
+ $DFORTRANMP $user -o $userobj || \
+ $DFORTHIGHMP $user -o $userobj || \
{
- echo "$0: compile failed for $user.f"
+ echo "$0: compile failed for $user"
@ -624,7 +475,7 @@ index 88a3027..85beabe 100644
fi # if test $user
@@ -3990,10 +3912,11 @@ then
@@ -3990,6 +3912,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
@ -632,12 +483,7 @@ index 88a3027..85beabe 100644
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
- $SECLIBS || \
+ $SECLIBS || \
{
echo "$0: link failed for ${user:+$userobj }$objs"
exit 1
@@ -4030,7 +3953,9 @@ else # if test $link
@@ -4030,7 +3953,9 @@
prgsav=yes
fi # if test $link
/bin/rm $userobj 2>/dev/null
@ -648,78 +494,7 @@ index 88a3027..85beabe 100644
# done if no job id given
if test -z "$jid"
then
@@ -4070,7 +3995,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
fi
-$RUN_JOB
+ $RUN_JOB
if test $nprocd -gt 1
then
@@ -4114,42 +4039,42 @@ then
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
@@ -4149,7 +4074,7 @@
else
#dllrun >0
if test $cpdll = yes; then

View File

@ -1,6 +1,6 @@
---
+++
@@ -63,10 +64,10 @@ doe_nparallel=$6
@@ -63,10 +63,10 @@
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
slv="-iam sfm"
fi
@ -13,7 +13,7 @@
slv="-iam datfit"
fi
@@ -91,6 +92,7 @@ if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
@@ -91,6 +91,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
@ -21,7 +21,7 @@
srcfile="-prog $srcfile"
;;
esac
@@ -189,12 +191,12 @@ unset PYTHONHOME
@@ -189,12 +190,12 @@
unset PYTHONPATH
if [ "$doe_first" = "-" ]; then # submit of regular Marc job

View File

@ -1,6 +1,6 @@
---
+++
@@ -63,10 +64,10 @@ doe_nparallel=$6
@@ -63,10 +63,10 @@
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
slv="-iam sfm"
fi
@ -13,7 +13,7 @@
slv="-iam datfit"
fi
@@ -91,6 +92,7 @@ if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
@@ -91,6 +91,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
@ -21,7 +21,7 @@
srcfile="-prog $srcfile"
;;
esac
@@ -189,12 +191,12 @@ unset PYTHONHOME
@@ -189,12 +190,12 @@
unset PYTHONPATH
if [ "$doe_first" = "-" ]; then # submit of regular Marc job

View File

@ -1,6 +1,6 @@
---
+++
@@ -63,10 +64,10 @@ doe_nparallel=$6
@@ -63,10 +63,10 @@
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
slv="-iam sfm"
fi
@ -13,7 +13,7 @@
slv="-iam datfit"
fi
@@ -91,6 +92,7 @@ if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
@@ -91,6 +91,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
@ -21,7 +21,7 @@
srcfile="-prog $srcfile"
;;
esac
@@ -189,12 +191,12 @@ unset PYTHONHOME
@@ -189,12 +190,12 @@
unset PYTHONPATH
if [ "$doe_first" = "-" ]; then # submit of regular Marc job

View File

@ -1,6 +1,6 @@
---
+++
@@ -261,11 +261,18 @@ popmenu job_run_popmenu {
@@ -261,12 +261,19 @@
}
button {
position +25 =
@ -10,21 +10,21 @@
help "job_run#Job Submission And Control"
popmenu job_submit_adv_pm
}
+ button {
button {
+ position +18 =
+ size 7 4
+ text "DAMASK"
+ help "damask_run#Job Submission And Control"
+ popmenu damask
+ }
button {
+ button {
position 0 +4
size 12 4
@@ -1189,6 +1196,135 @@ popmenu job_submit_adv_pm {
}
text "UPDATE"
@@ -1190,6 +1197,135 @@
+#--------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------
+popmenu damask {
+
+#ifdef QT_MENTAT
@ -67,7 +67,7 @@
+ label {
+ position -32 +6
+ size 12 6
+ text "O2 / OpenMP"
+ text "O3 / OpenMP"
+ border_width 1
+ border_color black
+ }
@ -153,6 +153,7 @@
+ mode permanent
+}
+
#--------------------------------------------------------------------------------------------------
+#--------------------------------------------------------------------------------------------------
popmenu job_exit_msg_pm {
text "EXIT MESSAGE"

View File

@ -0,0 +1,49 @@
---
+++
@@ -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,13 @@
$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
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -0,0 +1,49 @@
---
+++
@@ -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,13 @@
$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
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -0,0 +1,49 @@
---
+++
@@ -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,13 @@
$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
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -0,0 +1,75 @@
---
+++
@@ -166,6 +166,15 @@
MARC_COSIM_LIB="$MSCCOSIM_HOME/CoSim$MSCCOSIM_VERSION/Dcosim$MSCCOSIM_VERSION/lib"
fi
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
+H5FC=$(h5fc -shlib -show)
+if [[ "$H5FC" == *"$dir is"* ]]; then
+ H5FC=$(echo $(echo "$H5FC" | tail -n1) | sed -e "s/\-shlib/-fPIC -qopenmp/g")
+ H5FC=${H5FC%-lmpifort*}
+fi
+HDF5_LIB=${H5FC//*ifort/}
+FCOMP="$H5FC"
+
# AEM
if test "$MARCDLLOUTDIR" = ""; then
DLLOUTDIR="$MARC_LIB"
@@ -594,7 +603,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"
@@ -607,7 +616,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 \
@@ -621,6 +630,29 @@
# 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=2022.2 -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=2022.2 -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=2022.2 -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
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
@@ -778,7 +810,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

View File

@ -0,0 +1,517 @@
---
+++
@@ -136,6 +136,11 @@
# is created. For job running in the background, the log #
# file is always created. Default is "yes" #
##############################################################################
+# remove all Mentat paths from LD_LIBRARY_PATH
+LD_LIBRARY_PATH=:$LD_LIBRARY_PATH:
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2022.2+([!(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:}
# set DIR to the directory in which this script is
REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`"
DIR=`dirname $REALCOM`
@@ -302,7 +307,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
+
#
#
@@ -405,7 +426,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -676,50 +697,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"
@@ -1207,12 +1197,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"
@@ -1531,7 +1521,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
@@ -1564,7 +1554,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
@@ -1687,7 +1677,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1696,50 +1686,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
+ 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
@@ -2274,11 +2233,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=
@@ -2391,7 +2351,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3274,44 +3234,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=$usernoext.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
@@ -3331,6 +3274,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3344,6 +3288,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3390,7 +3337,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
@@ -3556,7 +3503,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"
@@ -3569,21 +3516,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
@@ -3593,39 +3540,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3645,6 +3580,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3686,6 +3622,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3779,7 +3718,7 @@
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
@@ -3904,7 +3843,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"
@@ -3917,20 +3856,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
@@ -3940,37 +3879,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3990,6 +3917,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4030,7 +3958,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4149,7 +4079,7 @@
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,517 @@
---
+++
@@ -136,6 +136,11 @@
# is created. For job running in the background, the log #
# file is always created. Default is "yes" #
##############################################################################
+# remove all Mentat paths from LD_LIBRARY_PATH
+LD_LIBRARY_PATH=:$LD_LIBRARY_PATH:
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2022.2+([!(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:}
# set DIR to the directory in which this script is
REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`"
DIR=`dirname $REALCOM`
@@ -302,7 +307,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
+
#
#
@@ -405,7 +426,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -676,50 +697,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"
@@ -1207,12 +1197,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"
@@ -1531,7 +1521,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
@@ -1564,7 +1554,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
@@ -1687,7 +1677,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1696,50 +1686,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
+ 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
@@ -2274,11 +2233,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=
@@ -2391,7 +2351,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3274,44 +3234,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=$usernoext.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
@@ -3331,6 +3274,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3344,6 +3288,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3390,7 +3337,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
@@ -3556,7 +3503,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"
@@ -3569,21 +3516,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
@@ -3593,39 +3540,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3645,6 +3580,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3686,6 +3622,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3779,7 +3718,7 @@
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
@@ -3904,7 +3843,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"
@@ -3917,20 +3856,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
@@ -3940,37 +3879,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3990,6 +3917,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4030,7 +3958,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4149,7 +4079,7 @@
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,517 @@
---
+++
@@ -136,6 +136,11 @@
# is created. For job running in the background, the log #
# file is always created. Default is "yes" #
##############################################################################
+# remove all Mentat paths from LD_LIBRARY_PATH
+LD_LIBRARY_PATH=:$LD_LIBRARY_PATH:
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2022.2+([!(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:}
# set DIR to the directory in which this script is
REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`"
DIR=`dirname $REALCOM`
@@ -302,7 +307,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
+
#
#
@@ -405,7 +426,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -676,50 +697,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"
@@ -1207,12 +1197,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"
@@ -1531,7 +1521,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
@@ -1564,7 +1554,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
@@ -1687,7 +1677,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1696,50 +1686,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
+ 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
@@ -2274,11 +2233,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=
@@ -2391,7 +2351,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3274,44 +3234,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=$usernoext.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
@@ -3331,6 +3274,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3344,6 +3288,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3390,7 +3337,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
@@ -3556,7 +3503,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"
@@ -3569,21 +3516,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
@@ -3593,39 +3540,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3645,6 +3580,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3686,6 +3622,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3779,7 +3718,7 @@
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
@@ -3904,7 +3843,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"
@@ -3917,20 +3856,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
@@ -3940,37 +3879,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3990,6 +3917,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4030,7 +3958,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4149,7 +4079,7 @@
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,38 @@
---
+++
@@ -63,10 +63,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
@@ -91,6 +91,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
+ srcfile=${srcfile%.*}".marc"
srcfile="-prog $srcfile"
;;
esac
@@ -189,12 +190,12 @@
unset PYTHONPATH
if [ "$doe_first" = "-" ]; then # submit of regular Marc job
- "${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
else # submit of a DoE Marc job
- "${DIR}/tools/run_marc" $slv -j $job -v n -b n $nprocds $nprocd \
+ "${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b n $nprocds $nprocd \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$assem_recov_nthread $nthread $nsolver $mode $gpu

View File

@ -0,0 +1,38 @@
---
+++
@@ -63,10 +63,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
@@ -91,6 +91,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
+ srcfile=${srcfile%.*}".marc"
srcfile="-prog $srcfile"
;;
esac
@@ -189,12 +190,12 @@
unset PYTHONPATH
if [ "$doe_first" = "-" ]; then # submit of regular Marc job
- "${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
else # submit of a DoE Marc job
- "${DIR}/tools/run_marc" $slv -j $job -v n -b n $nprocds $nprocd \
+ "${DIR}/tools/run_damask_mp" $slv -j $job -v n -b n $nprocds $nprocd \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$assem_recov_nthread $nthread $nsolver $mode $gpu

View File

@ -0,0 +1,38 @@
---
+++
@@ -63,10 +63,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
@@ -91,6 +91,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
+ srcfile=${srcfile%.*}".marc"
srcfile="-prog $srcfile"
;;
esac
@@ -189,12 +190,12 @@
unset PYTHONPATH
if [ "$doe_first" = "-" ]; then # submit of regular Marc job
- "${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
else # submit of a DoE Marc job
- "${DIR}/tools/run_marc" $slv -j $job -v n -b n $nprocds $nprocd \
+ "${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b n $nprocds $nprocd \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$assem_recov_nthread $nthread $nsolver $mode $gpu

View File

@ -0,0 +1,158 @@
---
+++
@@ -261,11 +261,18 @@
}
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
size 16 4
@@ -1202,6 +1209,135 @@
}
+#--------------------------------------------------------------------------------------------------
+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 "O3 / 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,49 @@
---
+++
@@ -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,13 @@
$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
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -0,0 +1,49 @@
---
+++
@@ -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,13 @@
$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
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -0,0 +1,49 @@
---
+++
@@ -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,13 @@
$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
+ /bin/rm $DIRJOB/*_genmod.f90

View File

@ -0,0 +1,75 @@
---
+++
@@ -166,6 +166,15 @@
MARC_COSIM_LIB="$MSCCOSIM_HOME/CoSim$MSCCOSIM_VERSION/Dcosim$MSCCOSIM_VERSION/lib"
fi
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
+H5FC=$(h5fc -shlib -show)
+if [[ "$H5FC" == *"$dir is"* ]]; then
+ H5FC=$(echo $(echo "$H5FC" | tail -n1) | sed -e "s/\-shlib/-fPIC -qopenmp/g")
+ H5FC=${H5FC%-lmpifort*}
+fi
+HDF5_LIB=${H5FC//*ifort/}
+FCOMP="$H5FC"
+
# AEM
if test "$MARCDLLOUTDIR" = ""; then
DLLOUTDIR="$MARC_LIB"
@@ -594,7 +603,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"
@@ -607,7 +616,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 \
@@ -621,6 +630,29 @@
# 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=2022.3 -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=2022.3 -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=2022.3 -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
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
@@ -778,7 +810,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

View File

@ -0,0 +1,517 @@
---
+++
@@ -136,6 +136,11 @@
# is created. For job running in the background, the log #
# file is always created. Default is "yes" #
##############################################################################
+# remove all Mentat paths from LD_LIBRARY_PATH
+LD_LIBRARY_PATH=:$LD_LIBRARY_PATH:
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2022.3+([!(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:}
# set DIR to the directory in which this script is
REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`"
DIR=`dirname $REALCOM`
@@ -302,7 +307,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
+
#
#
@@ -405,7 +426,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -676,50 +697,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"
@@ -1207,12 +1197,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"
@@ -1531,7 +1521,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
@@ -1564,7 +1554,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
@@ -1687,7 +1677,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1696,50 +1686,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
+ 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
@@ -2274,11 +2233,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=
@@ -2391,7 +2351,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3274,44 +3234,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=$usernoext.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
@@ -3331,6 +3274,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3344,6 +3288,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3390,7 +3337,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
@@ -3556,7 +3503,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"
@@ -3569,21 +3516,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
@@ -3593,39 +3540,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3645,6 +3580,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3686,6 +3622,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3779,7 +3718,7 @@
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
@@ -3904,7 +3843,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"
@@ -3917,20 +3856,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
@@ -3940,37 +3879,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3990,6 +3917,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4030,7 +3958,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4149,7 +4079,7 @@
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,517 @@
---
+++
@@ -136,6 +136,11 @@
# is created. For job running in the background, the log #
# file is always created. Default is "yes" #
##############################################################################
+# remove all Mentat paths from LD_LIBRARY_PATH
+LD_LIBRARY_PATH=:$LD_LIBRARY_PATH:
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2022.3+([!(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:}
# set DIR to the directory in which this script is
REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`"
DIR=`dirname $REALCOM`
@@ -302,7 +307,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
+
#
#
@@ -405,7 +426,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -676,50 +697,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"
@@ -1207,12 +1197,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"
@@ -1531,7 +1521,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
@@ -1564,7 +1554,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
@@ -1687,7 +1677,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1696,50 +1686,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
+ 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
@@ -2274,11 +2233,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=
@@ -2391,7 +2351,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3274,44 +3234,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=$usernoext.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
@@ -3331,6 +3274,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3344,6 +3288,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3390,7 +3337,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
@@ -3556,7 +3503,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"
@@ -3569,21 +3516,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
@@ -3593,39 +3540,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3645,6 +3580,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3686,6 +3622,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3779,7 +3718,7 @@
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
@@ -3904,7 +3843,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"
@@ -3917,20 +3856,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
@@ -3940,37 +3879,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3990,6 +3917,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4030,7 +3958,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4149,7 +4079,7 @@
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,517 @@
---
+++
@@ -136,6 +136,11 @@
# is created. For job running in the background, the log #
# file is always created. Default is "yes" #
##############################################################################
+# remove all Mentat paths from LD_LIBRARY_PATH
+LD_LIBRARY_PATH=:$LD_LIBRARY_PATH:
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2022.3+([!(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:}
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:}
# set DIR to the directory in which this script is
REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`"
DIR=`dirname $REALCOM`
@@ -302,7 +307,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
+
#
#
@@ -405,7 +426,7 @@
did=
vid=
user=
-usersubname=
+usernoext=
objs=
qid=background
cpu=
@@ -676,50 +697,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"
@@ -1207,12 +1197,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"
@@ -1531,7 +1521,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
@@ -1564,7 +1554,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
@@ -1687,7 +1677,7 @@
;;
esac
fi
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
read value
if test "$value"
then
@@ -1696,50 +1686,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
+ 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
@@ -2274,11 +2233,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=
@@ -2391,7 +2351,7 @@
fi
if test "$user"
then
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
+ execpath=$usernoext.marc
usersub=1
fi
export execpath
@@ -3274,44 +3234,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=$usernoext.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
@@ -3331,6 +3274,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3344,6 +3288,9 @@
prgsav=yes
fi
/bin/rm $userobj 2>/dev/null
+/bin/rm $DIRJOB/*.mod 2>/dev/null
+/bin/rm $DIRJOB/*.smod 2>/dev/null
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3390,7 +3337,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
@@ -3556,7 +3503,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"
@@ -3569,21 +3516,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
@@ -3593,39 +3540,27 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3645,6 +3580,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -3686,6 +3622,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
#
# run marc
@@ -3779,7 +3718,7 @@
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
@@ -3904,7 +3843,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"
@@ -3917,20 +3856,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
@@ -3940,37 +3879,25 @@
if test "$userhost"
then
echo
- echo "Compiling and linking user subroutine $user.f 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
+ echo "Compiling and linking user subroutine $user on host `hostname`"
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
@@ -3990,6 +3917,7 @@
$TKLIBS \
$MRCLIBS \
$METISLIBS \
+ $DAMASK \
$SFLIB \
$OPENSSL_LIB \
$SYSLIBS \
@@ -4030,7 +3958,9 @@
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
+/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null
# done if no job id given
if test -z "$jid"
then
@@ -4149,7 +4079,7 @@
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,38 @@
---
+++
@@ -63,10 +63,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
@@ -91,6 +91,7 @@
srcfile="-u $srcfile -save y"
;;
runsaved)
+ srcfile=${srcfile%.*}".marc"
srcfile="-prog $srcfile"
;;
esac
@@ -189,12 +190,12 @@
unset PYTHONPATH
if [ "$doe_first" = "-" ]; then # submit of regular Marc job
- "${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
else # submit of a DoE Marc job
- "${DIR}/tools/run_marc" $slv -j $job -v n -b n $nprocds $nprocd \
+ "${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b n $nprocds $nprocd \
$srcfile $restart $postfile $viewfactorsfile $hostfile \
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
$assem_recov_nthread $nthread $nsolver $mode $gpu

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