Skip to content

Commit 87aa848

Browse files
authored
Merge pull request #195 from Bruno02468/main
Buckling MPC fixes
2 parents 14e6780 + 54f6f53 commit 87aa848

8 files changed

Lines changed: 363 additions & 341 deletions

File tree

CMakeLists.txt

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,14 @@ include_directories("${CMAKE_SOURCE_DIR}/INCLUDE")
2929
# uncomment this to debug
3030
# set(CMAKE_VERBOSE_MAKEFILE true)
3131

32-
# a new build type for profiling
33-
set(CMAKE_PROFILING_FLAGS "-O2 -g -fno-omit-frame-pointer -fno-inline-functions")
34-
35-
set(CMAKE_C_FLAGS_PROFILING "${CMAKE_PROFILING_FLAGS}")
36-
set(CMAKE_CXX_FLAGS_PROFILING "${CMAKE_PROFILING_FLAGS}")
37-
set(CMAKE_Fortran_FLAGS_PROFILING "${CMAKE_PROFILING_FLAGS}")
38-
39-
set(CMAKE_EXE_LINKER_FLAGS_PROFILING "")
40-
set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "")
41-
4232
# register the Profile build type, just in case
4333
set(CMAKE_CONFIGURATION_TYPES
4434
Debug
4535
Release
4636
RelWithDebInfo
4737
MinSizeRel
4838
Profiling
39+
Deterministic
4940
CACHE STRING "" FORCE
5041
)
5142

@@ -346,6 +337,30 @@ if(CMAKE_COMPILER_IS_GNUCC)
346337
set(CMAKE_Fortran_FLAGS_DEBUG
347338
"-g -O0 -fcheck=all -fbacktrace -fbounds-check \
348339
-fno-inline -fno-ipa-sra -fno-ipa-cp -fno-optimize-sibling-calls")
340+
set(CMAKE_Fortran_FLAGS_DETERMINISTIC
341+
"-O0 -g \
342+
-fno-fast-math \
343+
-ffp-contract=off \
344+
-fno-unsafe-math-optimizations \
345+
-fno-associative-math \
346+
-fno-reciprocal-math \
347+
-frounding-math"
348+
)
349+
set(CMAKE_C_FLAGS_DETERMINISTIC
350+
"-O0 -g \
351+
-fno-fast-math \
352+
-ffp-contract=off \
353+
-frounding-math"
354+
)
355+
set(CMAKE_CXX_FLAGS_DETERMINISTIC
356+
"${CMAKE_C_FLAGS_DETERMINISTIC}"
357+
)
358+
set(CMAKE_PROFILING_FLAGS "-O2 -g -fno-omit-frame-pointer -fno-inline-functions")
359+
set(CMAKE_C_FLAGS_PROFILING "${CMAKE_PROFILING_FLAGS}")
360+
set(CMAKE_CXX_FLAGS_PROFILING "${CMAKE_PROFILING_FLAGS}")
361+
set(CMAKE_Fortran_FLAGS_PROFILING "${CMAKE_PROFILING_FLAGS}")
362+
set(CMAKE_EXE_LINKER_FLAGS_PROFILING "")
363+
set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "")
349364
endif()
350365

351366
# issue a couple messages about compilation
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
! ###############################################################################################################################
2-
! Begin MIT license text.
2+
! Begin MIT license text.
33
! _______________________________________________________________________________________________________
4-
5-
! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)
6-
7-
! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
4+
5+
! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)
6+
7+
! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
88
! associated documentation files (the "Software"), to deal in the Software without restriction, including
99
! without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
11-
! the following conditions:
12-
13-
! The above copyright notice and this permission notice shall be included in all copies or substantial
14-
! portions of the Software and documentation.
15-
16-
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17-
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22-
! THE SOFTWARE.
10+
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
11+
! the following conditions:
12+
13+
! The above copyright notice and this permission notice shall be included in all copies or substantial
14+
! portions of the Software and documentation.
15+
16+
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17+
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
! THE SOFTWARE.
2323
! _______________________________________________________________________________________________________
24-
25-
! End MIT license text.
24+
25+
! End MIT license text.
2626

2727
MODULE MPC_PROC_Interface
2828

2929
INTERFACE
3030

3131
SUBROUTINE MPC_PROC
3232

33-
33+
3434
USE PENTIUM_II_KIND, ONLY : BYTE, LONG, DOUBLE
3535
USE IOUNT1, ONLY : WRT_ERR, WRT_LOG, ERR, F04, F06, L1J, L1S, LINK1S, L1S_MSG
36-
USE SCONTR, ONLY : BLNK_SUB_NAM, FATAL_ERR, LMPCADDC, NGRID, NMPC, NMPCADD, NUM_MPCSIDS
36+
USE SCONTR, ONLY : BLNK_SUB_NAM, FATAL_ERR, LMPCADDC, NGRID, NMPC, NMPCADD, NUM_MPCSIDS, SOL_NAME
3737
USE TIMDAT, ONLY : TSEC
3838
USE SUBR_BEGEND_LEVELS, ONLY : MPC_PROC_BEGEND
3939
USE MODEL_STUF, ONLY : GRID_ID, MPCSET, MPCSIDS
4040
USE DOF_TABLES, ONLY : TDOF, TDOF_ROW_START
41+
USE NONLINEAR_PARAMS, ONLY : LOAD_ISTEP
4142

4243
IMPLICIT NONE
43-
44+
4445
CHARACTER( 1*BYTE) :: MPC_SET_USED ! 'Y'/'N' indicator if an MPC set in B.D. is used
4546

4647
INTEGER(LONG), PARAMETER :: SUBR_BEGEND = MPC_PROC_BEGEND
47-
48+
4849
END SUBROUTINE MPC_PROC
4950

5051
END INTERFACE
5152

5253
END MODULE MPC_PROC_Interface
53-
Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
! ###############################################################################################################################
2-
! Begin MIT license text.
2+
! Begin MIT license text.
33
! _______________________________________________________________________________________________________
4-
5-
! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)
6-
7-
! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
4+
5+
! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)
6+
7+
! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
88
! associated documentation files (the "Software"), to deal in the Software without restriction, including
99
! without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
11-
! the following conditions:
12-
13-
! The above copyright notice and this permission notice shall be included in all copies or substantial
14-
! portions of the Software and documentation.
15-
16-
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17-
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22-
! THE SOFTWARE.
10+
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
11+
! the following conditions:
12+
13+
! The above copyright notice and this permission notice shall be included in all copies or substantial
14+
! portions of the Software and documentation.
15+
16+
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17+
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
! THE SOFTWARE.
2323
! _______________________________________________________________________________________________________
24-
25-
! End MIT license text.
24+
25+
! End MIT license text.
2626

2727
MODULE REDUCE_KGGD_TO_KNND_Interface
2828

2929
INTERFACE
3030

3131
SUBROUTINE REDUCE_KGGD_TO_KNND ( PART_VEC_G_NM )
3232

33-
33+
3434
USE PENTIUM_II_KIND, ONLY : BYTE, LONG, DOUBLE
35-
USE IOUNT1, ONLY : ERR, F04, F06, L2J, LINK2J, L2J_MSG, SC1, WRT_ERR, WRT_LOG
35+
USE IOUNT1, ONLY : ERR, F04, F06, LINK2A, L2A, L2ASTAT, L2A_MSG, L2J, LINK2J, L2J_MSG, SC1, WRT_ERR, WRT_LOG
3636
USE SCONTR, ONLY : BLNK_SUB_NAM, FATAL_ERR, NDOFG, NDOFN, NDOFM, NTERM_HMN, NTERM_KGGD, NTERM_KNND, &
3737
NTERM_KNMD, NTERM_KMMD, NTERM_GMN
3838
USE PARAMS, ONLY : EPSIL, SPARSTOR
3939
USE TIMDAT, ONLY : TSEC
4040
USE SUBR_BEGEND_LEVELS, ONLY : REDUCE_KGGD_TO_KNND_BEGEND
41-
USE CONSTANTS_1, ONLY : ONE
41+
USE CONSTANTS_1, ONLY : ONE
4242
USE SPARSE_MATRICES, ONLY : I_HMN, J_HMN, HMN, I_KGGD, J_KGGD, KGGD, I_KNND, J_KNND, KNND, I_KNMD, J_KNMD, KNMD, &
4343
I_KMMD, J_KMMD, KMMD, I_KMND, J_KMND, KMND, I_GMN, J_GMN, GMN, I_GMNt, J_GMNt, GMNt
4444
USE SPARSE_MATRICES, ONLY : SYM_GMN, SYM_HMN, SYM_KGGD, SYM_KNND, SYM_KNMD, SYM_KMMD, SYM_KMND
@@ -47,7 +47,7 @@ SUBROUTINE REDUCE_KGGD_TO_KNND ( PART_VEC_G_NM )
4747
IMPLICIT NONE
4848

4949
CHARACTER, PARAMETER :: CR13 = CHAR(13) ! This causes a carriage return simulating the "+" action in a FORMAT
50-
INTEGER(LONG), INTENT(IN) :: PART_VEC_G_NM(NDOFG)! Partitioning vector (G set into N and M sets)
50+
INTEGER(LONG), INTENT(IN) :: PART_VEC_G_NM(NDOFG)! Partitioning vector (G set into N and M sets)
5151
INTEGER(LONG), PARAMETER :: NUM1 = 1 ! Used in subr's that partition matrices
5252
INTEGER(LONG), PARAMETER :: NUM2 = 2 ! Used in subr's that partition matrices
5353
INTEGER(LONG), PARAMETER :: SUBR_BEGEND = REDUCE_KGGD_TO_KNND_BEGEND
@@ -57,4 +57,3 @@ END SUBROUTINE REDUCE_KGGD_TO_KNND
5757
END INTERFACE
5858

5959
END MODULE REDUCE_KGGD_TO_KNND_Interface
60-

0 commit comments

Comments
 (0)