Merge branch 'development' into pretty-print-init
This commit is contained in:
commit
69843d0833
188
.gitlab-ci.yml
188
.gitlab-ci.yml
|
@ -7,40 +7,33 @@ stages:
|
||||||
- fortran
|
- fortran
|
||||||
- performance
|
- performance
|
||||||
- deploy
|
- deploy
|
||||||
- backup
|
|
||||||
- update_master
|
- update_master
|
||||||
- distclean
|
|
||||||
- clean
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
before_script:
|
default:
|
||||||
- if [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue)x == 'x' ];
|
before_script:
|
||||||
then echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue;
|
- ${LOCAL_HOME}/bin/queue ${CI_JOB_ID}
|
||||||
fi
|
- source $DAMASKROOT/env/DAMASK.sh
|
||||||
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
|
- export PATH=${TESTROOT}/bin:$PATH
|
||||||
do sleep 5m;
|
- cd $DAMASKROOT/PRIVATE/testing
|
||||||
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
|
- echo Job start:" $(date)"
|
||||||
done
|
after_script:
|
||||||
- source $DAMASKROOT/env/DAMASK.sh
|
- echo Job end:" $(date)"
|
||||||
- cd $DAMASKROOT/PRIVATE/testing
|
|
||||||
- echo Job start:" $(date)"
|
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
after_script:
|
|
||||||
- echo Job end:" $(date)"
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
variables:
|
variables:
|
||||||
# ===============================================================================================
|
# ===============================================================================================
|
||||||
# GitLab Settings
|
# GitLab Settings
|
||||||
# ===============================================================================================
|
# ===============================================================================================
|
||||||
GIT_SUBMODULE_STRATEGY: none
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
|
|
||||||
# ===============================================================================================
|
# ===============================================================================================
|
||||||
# Shortcut names
|
# Shortcut names
|
||||||
# ===============================================================================================
|
# ===============================================================================================
|
||||||
|
TESTROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID"
|
||||||
DAMASKROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
|
DAMASKROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
|
||||||
TESTROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/tests"
|
|
||||||
|
|
||||||
# ===============================================================================================
|
# ===============================================================================================
|
||||||
# Names of module files to load
|
# Names of module files to load
|
||||||
|
@ -52,53 +45,42 @@ variables:
|
||||||
MPI_Intel: "MPI/Intel/19.1.2/IntelMPI/2019"
|
MPI_Intel: "MPI/Intel/19.1.2/IntelMPI/2019"
|
||||||
MPI_GNU: "MPI/GNU/10/OpenMPI/4.1.1"
|
MPI_GNU: "MPI/GNU/10/OpenMPI/4.1.1"
|
||||||
# ++++++++++++ PETSc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++ PETSc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
PETSc_Intel: "Libraries/PETSc/3.16.0/Intel-19.1.2-IntelMPI-2019"
|
PETSc_Intel: "Libraries/PETSc/3.16.1/Intel-19.1.2-IntelMPI-2019"
|
||||||
PETSc_GNU: "Libraries/PETSc/3.16.0/GNU-10-OpenMPI-4.1.1"
|
PETSc_GNU: "Libraries/PETSc/3.16.1/GNU-10-OpenMPI-4.1.1"
|
||||||
# ++++++++++++ MSC Marc +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++ MSC Marc +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
MSC: "FEM/MSC/2021.2"
|
MSC: "FEM/MSC/2021.2"
|
||||||
IntelMarc: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
|
IntelMarc: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
|
||||||
HDF5Marc: "HDF5/1.12.1/Intel-19.1.2"
|
HDF5Marc: "HDF5/1.12.1/Intel-19.1.2"
|
||||||
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
checkout:
|
checkout:
|
||||||
stage: prepare
|
stage: prepare
|
||||||
before_script:
|
before_script:
|
||||||
- echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue
|
- ${LOCAL_HOME}/bin/queue ${CI_JOB_ID}
|
||||||
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
|
- echo Job start:" $(date)"
|
||||||
do sleep 5m;
|
|
||||||
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
|
|
||||||
done
|
|
||||||
script:
|
script:
|
||||||
- mkdir -p $DAMASKROOT
|
- mkdir -p ${DAMASKROOT}
|
||||||
- mkdir -p $TESTROOT
|
- cd ${DAMASKROOT}
|
||||||
- cd $DAMASKROOT
|
|
||||||
- git clone -q git@git.damask.mpie.de:damask/DAMASK.git .
|
- git clone -q git@git.damask.mpie.de:damask/DAMASK.git .
|
||||||
- git checkout $CI_COMMIT_SHA
|
- git checkout ${CI_COMMIT_SHA}
|
||||||
- git submodule update --init
|
- git submodule update --init
|
||||||
- source env/DAMASK.sh
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
pytest:
|
pytest:
|
||||||
stage: python
|
stage: python
|
||||||
script:
|
script:
|
||||||
- cd $DAMASKROOT/python
|
- PYTHONPATH=${CI_PROJECT_DIR}/python
|
||||||
- COLUMNS=256 pytest --basetemp=${TESTROOT}/python -v --cov --cov-report=term
|
- cd ${CI_PROJECT_DIR}/python
|
||||||
|
- pytest --basetemp ${TESTROOT}/python -v --cov --cov-report=term
|
||||||
- coverage report --fail-under=90
|
- coverage report --fail-under=90
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
mypy:
|
mypy:
|
||||||
stage: python
|
stage: python
|
||||||
script:
|
script:
|
||||||
- cd $DAMASKROOT/python
|
- cd ${CI_PROJECT_DIR}/python
|
||||||
- mypy -m damask
|
- mypy damask
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
@ -107,50 +89,35 @@ compile_grid_Intel:
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
||||||
- cd pytest
|
- cd pytest
|
||||||
- COLUMNS=256 pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_Intel
|
- pytest -k 'compile and grid' --basetemp ${TESTROOT}/compile_grid_Intel
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
compile_mesh_Intel:
|
compile_mesh_Intel:
|
||||||
stage: compile
|
stage: compile
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
||||||
- cd pytest
|
- cd pytest
|
||||||
- COLUMNS=256 pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_Intel
|
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_Intel
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
compile_grid_GNU:
|
compile_grid_GNU:
|
||||||
stage: compile
|
stage: compile
|
||||||
script:
|
script:
|
||||||
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
||||||
- cd pytest
|
- cd pytest
|
||||||
- COLUMNS=256 pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_GNU
|
- pytest -k 'compile and grid' --basetemp ${TESTROOT}/compile_grid_GNU
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
compile_mesh_GNU:
|
compile_mesh_GNU:
|
||||||
stage: compile
|
stage: compile
|
||||||
script:
|
script:
|
||||||
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
||||||
- cd pytest
|
- cd pytest
|
||||||
- COLUMNS=256 pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_GNU
|
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_GNU
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
compile_Marc:
|
compile_Marc:
|
||||||
stage: compile
|
stage: compile
|
||||||
script:
|
script:
|
||||||
- module load $IntelMarc $HDF5Marc $MSC
|
- module load $IntelMarc $HDF5Marc $MSC
|
||||||
- cd pytest
|
- cd pytest
|
||||||
- COLUMNS=256 pytest -k 'compile and Marc' --basetemp=${TESTROOT}/compile_Marc
|
- pytest -k 'compile and Marc' --basetemp ${TESTROOT}/compile_Marc
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
@ -158,25 +125,18 @@ setup_grid:
|
||||||
stage: setup
|
stage: setup
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
||||||
- BUILD_DIR=$(mktemp -d)
|
- cd $(mktemp -d)
|
||||||
- cd ${BUILD_DIR}
|
- cmake -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${TESTROOT} ${CI_PROJECT_DIR}
|
||||||
- cmake -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
|
|
||||||
- make -j2 all install
|
- make -j2 all install
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
setup_mesh:
|
setup_mesh:
|
||||||
stage: setup
|
stage: setup
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
||||||
- BUILD_DIR=$(mktemp -d)
|
- cd $(mktemp -d)
|
||||||
- cd ${BUILD_DIR}
|
- cmake -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${TESTROOT} ${CI_PROJECT_DIR}
|
||||||
- cmake -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
|
|
||||||
- make -j2 all install
|
- make -j2 all install
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
core:
|
core:
|
||||||
|
@ -184,67 +144,54 @@ core:
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
||||||
- cd pytest
|
- cd pytest
|
||||||
- COLUMNS=256 pytest -k 'not compile' --basetemp=${TESTROOT}/fortran -v
|
- pytest -k 'not compile' --basetemp ${TESTROOT}/fortran -v
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
# Needs closer look
|
# Needs closer look
|
||||||
# Phenopowerlaw_singleSlip:
|
# Phenopowerlaw_singleSlip:
|
||||||
# stage: fortran
|
# stage: fortran
|
||||||
# script: Phenopowerlaw_singleSlip/test.py
|
# script: Phenopowerlaw_singleSlip/test.py
|
||||||
# except:
|
|
||||||
# - master
|
|
||||||
# - release
|
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
SpectralRuntime:
|
grid_runtime:
|
||||||
stage: performance
|
stage: performance
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
||||||
- cd $DAMASKROOT
|
- cd $(mktemp -d)
|
||||||
- make clean grid OPTIMIZATION=AGGRESSIVE
|
- cmake -DOPTIMIZATION=AGGRESSIVE -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${TESTROOT} ${CI_PROJECT_DIR}
|
||||||
- cd $LOCAL_HOME/performance # location of old results
|
- make -j2 all install
|
||||||
- git checkout . # undo any changes (i.e. run time data from non-development branch)
|
- cd $(mktemp -d)
|
||||||
- cd $DAMASKROOT/PRIVATE/testing
|
- git clone -q git@git.damask.mpie.de:damask/performance.git .
|
||||||
- ./runtime.py --results ${LOCAL_HOME}/performance --damask_root ${DAMASKROOT} --tag ${CI_COMMIT_SHA}
|
- ${DAMASKROOT}/PRIVATE/testing/runtime.py --input_dir $DAMASKROOT/examples/grid --output_dir . --tag ${CI_COMMIT_SHA}
|
||||||
except:
|
- if [ ${CI_COMMIT_BRANCH} == development ]; then git commit -am ${CI_PIPELINE_ID}_${CI_COMMIT_SHA}; git push; fi
|
||||||
- master
|
before_script:
|
||||||
- release
|
- ${LOCAL_HOME}/bin/queue ${CI_JOB_ID} --blocking
|
||||||
|
- source $DAMASKROOT/env/DAMASK.sh
|
||||||
|
- export PATH=${TESTROOT}/bin:$PATH
|
||||||
|
- echo Job start:" $(date)"
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
source_distribution:
|
source_distribution:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- cd $(mktemp -d)
|
- cd $(mktemp -d)
|
||||||
- $DAMASKROOT/PRIVATE/releasing/tar.xz/create.sh $DAMASKROOT $CI_COMMIT_SHA
|
- ${CI_PROJECT_DIR}/PRIVATE/releasing/tar.xz/create.sh ${CI_PROJECT_DIR} ${CI_COMMIT_SHA}
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
##################################################################################################
|
|
||||||
backup_runtime_measurement:
|
|
||||||
stage: backup
|
|
||||||
script:
|
|
||||||
- cd $LOCAL_HOME/performance # location of new runtime results
|
|
||||||
- git commit -am"${CI_PIPELINE_ID}_${CI_COMMIT_SHA}"
|
|
||||||
- git push
|
|
||||||
only:
|
|
||||||
- development
|
|
||||||
|
|
||||||
##################################################################################################
|
###################################################################################################
|
||||||
merge_into_master:
|
merge_into_master:
|
||||||
stage: update_master
|
stage: update_master
|
||||||
script:
|
script:
|
||||||
- cd $DAMASKROOT
|
- cd ${DAMASKROOT}
|
||||||
- export TESTEDREV=$(git describe) # might be detached from development branch
|
- export TESTEDREV=$(git describe) # might be detached from development branch
|
||||||
- echo $TESTEDREV > python/damask/VERSION
|
- echo ${TESTEDREV} > python/damask/VERSION
|
||||||
- git add python/damask/VERSION
|
- git add python/damask/VERSION
|
||||||
- >
|
- >
|
||||||
git diff-index --quiet HEAD ||
|
git diff-index --quiet HEAD ||
|
||||||
git commit -m "[skip ci] updated version information after successful test of $TESTEDREV"
|
git commit -m "[skip ci] updated version information after successful test of $TESTEDREV"
|
||||||
- export UPDATEDREV=$(git describe) # tested state + 1 commit
|
- export UPDATEDREV=$(git describe) # tested state + 1 commit
|
||||||
- git checkout master
|
- git checkout master
|
||||||
|
- git pull
|
||||||
- git merge $UPDATEDREV -s recursive -X ours # conflicts occur only for inconsistent state
|
- git merge $UPDATEDREV -s recursive -X ours # conflicts occur only for inconsistent state
|
||||||
- git push origin master # master is now tested version and has updated VERSION file
|
- git push origin master # master is now tested version and has updated VERSION file
|
||||||
- git checkout development
|
- git checkout development
|
||||||
|
@ -253,26 +200,3 @@ merge_into_master:
|
||||||
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
|
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
|
||||||
only:
|
only:
|
||||||
- development
|
- development
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
remove_data:
|
|
||||||
stage: distclean
|
|
||||||
before_script:
|
|
||||||
- echo "Removing data and lock of pipeline $CI_PIPELINE_ID"
|
|
||||||
script:
|
|
||||||
- rm -rf $LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID
|
|
||||||
- sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue # in case pipeline was manually (web GUI) restarted and releaseLock was performed already
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
remove_lock:
|
|
||||||
stage: clean
|
|
||||||
before_script:
|
|
||||||
- echo "Removing lock of pipeline $CI_PIPELINE_ID"
|
|
||||||
when: always
|
|
||||||
script: sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 5a769ec759d9dacc1866c35c6663cd0001e198c5
|
Subproject commit f730bcb8ddd7224011e70c57d0a5c03068532d2d
|
|
@ -1 +1 @@
|
||||||
v3.0.0-alpha5-64-g8e08af31e
|
v3.0.0-alpha5-90-gbb6655045
|
||||||
|
|
|
@ -215,7 +215,7 @@ subroutine readVTI(grid,geomSize,origin,material, &
|
||||||
call cellsSizeOrigin(grid,geomSize,origin,fileContent(startPos:endPos))
|
call cellsSizeOrigin(grid,geomSize,origin,fileContent(startPos:endPos))
|
||||||
end if
|
end if
|
||||||
else
|
else
|
||||||
if (index(fileContent(startPos:endPos),'<CellData>',kind=pI64) /= 0_pI64) then
|
if (index(fileContent(startPos:endPos),'<CellData',kind=pI64) /= 0_pI64) then
|
||||||
gotCellData = .true.
|
gotCellData = .true.
|
||||||
do while (index(fileContent(startPos:endPos),'</CellData>',kind=pI64) == 0_pI64)
|
do while (index(fileContent(startPos:endPos),'</CellData>',kind=pI64) == 0_pI64)
|
||||||
if (index(fileContent(startPos:endPos),'<DataArray',kind=pI64) /= 0_pI64 .and. &
|
if (index(fileContent(startPos:endPos),'<DataArray',kind=pI64) /= 0_pI64 .and. &
|
||||||
|
@ -379,12 +379,13 @@ subroutine readVTI(grid,geomSize,origin,material, &
|
||||||
integer(pI64), dimension(:), allocatable :: temp, size_inflated, size_deflated
|
integer(pI64), dimension(:), allocatable :: temp, size_inflated, size_deflated
|
||||||
integer(pI64) :: headerLen, nBlock, b,s,e
|
integer(pI64) :: headerLen, nBlock, b,s,e
|
||||||
|
|
||||||
if (headerType == 'UInt32') then
|
|
||||||
|
if (headerType == 'UInt32') then
|
||||||
temp = int(prec_bytesToC_INT32_T(base64_to_bytes(base64_str(:base64_nChar(4_pI64)))),pI64)
|
temp = int(prec_bytesToC_INT32_T(base64_to_bytes(base64_str(:base64_nChar(4_pI64)))),pI64)
|
||||||
nBlock = int(temp(1),pI64)
|
nBlock = int(temp(1),pI64)
|
||||||
headerLen = 4_pI64 * (3_pI64 + nBlock)
|
headerLen = 4_pI64 * (3_pI64 + nBlock)
|
||||||
temp = int(prec_bytesToC_INT32_T(base64_to_bytes(base64_str(:base64_nChar(headerLen)))),pI64)
|
temp = int(prec_bytesToC_INT32_T(base64_to_bytes(base64_str(:base64_nChar(headerLen)))),pI64)
|
||||||
elseif (headerType == 'UInt64') then
|
else if (headerType == 'UInt64') then
|
||||||
temp = int(prec_bytesToC_INT64_T(base64_to_bytes(base64_str(:base64_nChar(8_pI64)))),pI64)
|
temp = int(prec_bytesToC_INT64_T(base64_to_bytes(base64_str(:base64_nChar(8_pI64)))),pI64)
|
||||||
nBlock = int(temp(1),pI64)
|
nBlock = int(temp(1),pI64)
|
||||||
headerLen = 8_pI64 * (3_pI64 + nBlock)
|
headerLen = 8_pI64 * (3_pI64 + nBlock)
|
||||||
|
@ -424,13 +425,13 @@ subroutine readVTI(grid,geomSize,origin,material, &
|
||||||
allocate(bytes(0))
|
allocate(bytes(0))
|
||||||
|
|
||||||
s=0_pI64
|
s=0_pI64
|
||||||
if (headerType == 'UInt32') then
|
if (headerType == 'UInt32') then
|
||||||
do while(s+base64_nChar(4_pI64)<(len(base64_str,pI64)))
|
do while(s+base64_nChar(4_pI64)<(len(base64_str,pI64)))
|
||||||
nByte = int(prec_bytesToC_INT32_T(base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(4_pI64)))),pI64)
|
nByte = int(prec_bytesToC_INT32_T(base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(4_pI64)))),pI64)
|
||||||
bytes = [bytes,base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(4_pI64+nByte(1))),5_pI64)]
|
bytes = [bytes,base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(4_pI64+nByte(1))),5_pI64)]
|
||||||
s = s + base64_nChar(4_pI64+nByte(1))
|
s = s + base64_nChar(4_pI64+nByte(1))
|
||||||
end do
|
end do
|
||||||
elseif (headerType == 'UInt64') then
|
else if (headerType == 'UInt64') then
|
||||||
do while(s+base64_nChar(8_pI64)<(len(base64_str,pI64)))
|
do while(s+base64_nChar(8_pI64)<(len(base64_str,pI64)))
|
||||||
nByte = int(prec_bytesToC_INT64_T(base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(8_pI64)))),pI64)
|
nByte = int(prec_bytesToC_INT64_T(base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(8_pI64)))),pI64)
|
||||||
bytes = [bytes,base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(8_pI64+nByte(1))),9_pI64)]
|
bytes = [bytes,base64_to_bytes(base64_str(s+1_pI64:s+base64_nChar(8_pI64+nByte(1))),9_pI64)]
|
||||||
|
@ -510,6 +511,7 @@ function IPcoordinates0(grid,geomSize,grid3Offset)
|
||||||
a,b,c, &
|
a,b,c, &
|
||||||
i
|
i
|
||||||
|
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
do c = 1, grid(3); do b = 1, grid(2); do a = 1, grid(1)
|
do c = 1, grid(3); do b = 1, grid(2); do a = 1, grid(1)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
@ -553,6 +555,7 @@ pure function cellSurfaceArea(geomSize,grid)
|
||||||
|
|
||||||
real(pReal), dimension(6,1,product(grid)) :: cellSurfaceArea
|
real(pReal), dimension(6,1,product(grid)) :: cellSurfaceArea
|
||||||
|
|
||||||
|
|
||||||
cellSurfaceArea(1:2,1,:) = geomSize(2)/real(grid(2)) * geomSize(3)/real(grid(3))
|
cellSurfaceArea(1:2,1,:) = geomSize(2)/real(grid(2)) * geomSize(3)/real(grid(3))
|
||||||
cellSurfaceArea(3:4,1,:) = geomSize(3)/real(grid(3)) * geomSize(1)/real(grid(1))
|
cellSurfaceArea(3:4,1,:) = geomSize(3)/real(grid(3)) * geomSize(1)/real(grid(1))
|
||||||
cellSurfaceArea(5:6,1,:) = geomSize(1)/real(grid(1)) * geomSize(2)/real(grid(2))
|
cellSurfaceArea(5:6,1,:) = geomSize(1)/real(grid(1)) * geomSize(2)/real(grid(2))
|
||||||
|
|
|
@ -123,9 +123,7 @@ subroutine FEM_utilities_init
|
||||||
call PetscOptionsInsertString(PETSC_NULL_OPTIONS,'-mechanical_snes_type newtonls &
|
call PetscOptionsInsertString(PETSC_NULL_OPTIONS,'-mechanical_snes_type newtonls &
|
||||||
&-mechanical_snes_linesearch_type cp -mechanical_snes_ksp_ew &
|
&-mechanical_snes_linesearch_type cp -mechanical_snes_ksp_ew &
|
||||||
&-mechanical_snes_ksp_ew_rtol0 0.01 -mechanical_snes_ksp_ew_rtolmax 0.01 &
|
&-mechanical_snes_ksp_ew_rtol0 0.01 -mechanical_snes_ksp_ew_rtolmax 0.01 &
|
||||||
&-mechanical_ksp_type fgmres -mechanical_ksp_max_it 25 &
|
&-mechanical_ksp_type fgmres -mechanical_ksp_max_it 25', ierr)
|
||||||
&-mechanical_pc_type ml -mechanical_mg_levels_ksp_type chebyshev &
|
|
||||||
&-mechanical_mg_levels_pc_type sor -mechanical_pc_ml_nullspace user',ierr)
|
|
||||||
CHKERRQ(ierr)
|
CHKERRQ(ierr)
|
||||||
call PetscOptionsInsertString(PETSC_NULL_OPTIONS,num_mesh%get_asString('PETSc_options',defaultVal=''),ierr)
|
call PetscOptionsInsertString(PETSC_NULL_OPTIONS,num_mesh%get_asString('PETSc_options',defaultVal=''),ierr)
|
||||||
CHKERRQ(ierr)
|
CHKERRQ(ierr)
|
||||||
|
@ -178,6 +176,7 @@ subroutine utilities_projectBCValues(localVec,section,field,comp,bcPointsIS,BCVa
|
||||||
PetscScalar :: BCValue,BCDotValue,timeinc
|
PetscScalar :: BCValue,BCDotValue,timeinc
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
|
|
||||||
|
|
||||||
call PetscSectionGetFieldComponents(section,field,numComp,ierr); CHKERRQ(ierr)
|
call PetscSectionGetFieldComponents(section,field,numComp,ierr); CHKERRQ(ierr)
|
||||||
call ISGetSize(bcPointsIS,nBcPoints,ierr); CHKERRQ(ierr)
|
call ISGetSize(bcPointsIS,nBcPoints,ierr); CHKERRQ(ierr)
|
||||||
if (nBcPoints > 0) call ISGetIndicesF90(bcPointsIS,bcPoints,ierr)
|
if (nBcPoints > 0) call ISGetIndicesF90(bcPointsIS,bcPoints,ierr)
|
||||||
|
@ -189,8 +188,8 @@ subroutine utilities_projectBCValues(localVec,section,field,comp,bcPointsIS,BCVa
|
||||||
CHKERRQ(ierr)
|
CHKERRQ(ierr)
|
||||||
do dof = offset+comp+1, offset+numDof, numComp
|
do dof = offset+comp+1, offset+numDof, numComp
|
||||||
localArray(dof) = localArray(dof) + BCValue + BCDotValue*timeinc
|
localArray(dof) = localArray(dof) + BCValue + BCDotValue*timeinc
|
||||||
enddo
|
end do
|
||||||
enddo
|
end do
|
||||||
call VecRestoreArrayF90(localVec,localArray,ierr); CHKERRQ(ierr)
|
call VecRestoreArrayF90(localVec,localArray,ierr); CHKERRQ(ierr)
|
||||||
call VecAssemblyBegin(localVec, ierr); CHKERRQ(ierr)
|
call VecAssemblyBegin(localVec, ierr); CHKERRQ(ierr)
|
||||||
call VecAssemblyEnd (localVec, ierr); CHKERRQ(ierr)
|
call VecAssemblyEnd (localVec, ierr); CHKERRQ(ierr)
|
||||||
|
|
16
src/prec.f90
16
src/prec.f90
|
@ -273,27 +273,27 @@ subroutine selfTest
|
||||||
|
|
||||||
|
|
||||||
realloc_lhs_test = [1,2]
|
realloc_lhs_test = [1,2]
|
||||||
if (any(realloc_lhs_test/=[1,2])) error stop 'LHS allocation'
|
if (any(realloc_lhs_test/=[1,2])) error stop 'LHS allocation'
|
||||||
|
|
||||||
call random_number(r)
|
call random_number(r)
|
||||||
r = r/minval(r)
|
r = r/minval(r)
|
||||||
if(.not. all(dEq(r,r+PREAL_EPSILON))) error stop 'dEq'
|
if (.not. all(dEq(r,r+PREAL_EPSILON))) error stop 'dEq'
|
||||||
if(dEq(r(1),r(2)) .and. dNeq(r(1),r(2))) error stop 'dNeq'
|
if (dEq(r(1),r(2)) .and. dNeq(r(1),r(2))) error stop 'dNeq'
|
||||||
if(.not. all(dEq0(r-(r+PREAL_MIN)))) error stop 'dEq0'
|
if (.not. all(dEq0(r-(r+PREAL_MIN)))) error stop 'dEq0'
|
||||||
|
|
||||||
! https://www.binaryconvert.com
|
! https://www.binaryconvert.com
|
||||||
! https://www.rapidtables.com/convert/number/binary-to-decimal.html
|
! https://www.rapidtables.com/convert/number/binary-to-decimal.html
|
||||||
f = real(prec_bytesToC_FLOAT(int([-65,+11,-102,+75],C_SIGNED_CHAR)),pReal)
|
f = real(prec_bytesToC_FLOAT(int([-65,+11,-102,+75],C_SIGNED_CHAR)),pReal)
|
||||||
if(dNeq(f(1),20191102.0_pReal,0.0_pReal)) error stop 'prec_bytesToC_FLOAT'
|
if (dNeq(f(1),20191102.0_pReal,0.0_pReal)) error stop 'prec_bytesToC_FLOAT'
|
||||||
|
|
||||||
f = real(prec_bytesToC_DOUBLE(int([0,0,0,-32,+119,+65,+115,65],C_SIGNED_CHAR)),pReal)
|
f = real(prec_bytesToC_DOUBLE(int([0,0,0,-32,+119,+65,+115,65],C_SIGNED_CHAR)),pReal)
|
||||||
if(dNeq(f(1),20191102.0_pReal,0.0_pReal)) error stop 'prec_bytesToC_DOUBLE'
|
if (dNeq(f(1),20191102.0_pReal,0.0_pReal)) error stop 'prec_bytesToC_DOUBLE'
|
||||||
|
|
||||||
i = int(prec_bytesToC_INT32_T(int([+126,+23,+52,+1],C_SIGNED_CHAR)),pInt)
|
i = int(prec_bytesToC_INT32_T(int([+126,+23,+52,+1],C_SIGNED_CHAR)),pInt)
|
||||||
if(i(1) /= 20191102_pInt) error stop 'prec_bytesToC_INT32_T'
|
if (i(1) /= 20191102_pInt) error stop 'prec_bytesToC_INT32_T'
|
||||||
|
|
||||||
i = int(prec_bytesToC_INT64_T(int([+126,+23,+52,+1,0,0,0,0],C_SIGNED_CHAR)),pInt)
|
i = int(prec_bytesToC_INT64_T(int([+126,+23,+52,+1,0,0,0,0],C_SIGNED_CHAR)),pInt)
|
||||||
if(i(1) /= 20191102_pInt) error stop 'prec_bytesToC_INT64_T'
|
if (i(1) /= 20191102_pInt) error stop 'prec_bytesToC_INT64_T'
|
||||||
|
|
||||||
end subroutine selfTest
|
end subroutine selfTest
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue