Skip to content

Commit

Permalink
Fixed compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
drreynolds committed Nov 28, 2023
1 parent c6f2209 commit 4cc9ea9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
28 changes: 15 additions & 13 deletions examples/ida/F2003_openmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

# Examples using SUNDIALS linear solvers
set(FIDA_examples_OMP
"idaHeat2D_kry_omp_f2003\;4\;develop"
"idaHeat2D_kry_omp_f2003\;8\;develop"
"idaHeat2D_kry_omp_f2003.f90\;4\;develop"
"idaHeat2D_kry_omp_f2003.f90\;8\;develop"
)

# Specify libraries to link against
Expand All @@ -37,42 +37,44 @@ foreach(example_tuple ${FIDA_examples_OMP})
list(GET example_tuple 1 example_args)
list(GET example_tuple 2 example_type)

if(NOT TARGET ${example})
# example source files
add_executable(${example} ${example}.f90)
# extract the file name without extension
get_filename_component(example_target ${example} NAME_WE)

set_target_properties(${example} PROPERTIES FOLDER "Examples")
if(NOT TARGET ${example_target})
add_executable(${example_target} ${example})

set_target_properties(${example_target} PROPERTIES FOLDER "Examples")

# libraries to link against
target_link_libraries(${example}
target_link_libraries(${example_target}
sundials_ida
sundials_fida_mod
sundials_nvecopenmp
sundials_fnvecopenmp_mod
${SUNDIALS_LIBS})

# Install fortran modules to a unique directory to avoid naming collisions
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir)
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example_target}.dir)

endif()

# check if example args are provided and set the test name
if("${example_args}" STREQUAL "")
set(test_name ${example})
set(test_name ${example_target})
else()
string(REGEX REPLACE " " "_" test_name ${example}_${example_args})
string(REGEX REPLACE " " "_" test_name ${example_target}_${example_args})
endif()

# add example to regression tests
sundials_add_test(${example} ${example}
sundials_add_test(${test_name} ${example_target}
TEST_ARGS ${example_args}
ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR}
ANSWER_FILE ${example}.out
ANSWER_FILE ${test_name}.out
EXAMPLE_TYPE ${example_type})

# install example source and out files
if(EXAMPLES_INSTALL)
install(FILES ${example}.f90 ${example}.out
install(FILES ${example} ${example}.out
DESTINATION ${EXAMPLES_INSTALL_PATH}/ida/F2003_opemp)
endif()
endforeach(example_tuple ${FIDA_examples_OMP})
Expand Down
24 changes: 12 additions & 12 deletions examples/ida/F2003_openmp/idaHeat2D_kry_omp_f2003_4.out
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ Tolerance parameters: rtol = 0.0E+00 atol = 1.0E-03
0.04 4.69419E-01 2 28 42 124 42 124 3.99E-03 11 166
0.08 2.44066E-01 2 35 57 192 57 192 1.01E-02 14 249
0.16 6.23528E-02 2 44 69 296 69 296 7.46E-03 14 365
0.32 1.41345E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41279E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82904E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11107E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.15927E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.33520E-02 1 100 171 691 171 691 9.06E-01 46 862
0.32 1.41347E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41331E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82940E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11147E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.16023E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.32995E-02 1 100 171 691 171 691 9.06E-01 46 862

Error test failures = 3
Nonlinear convergence failures = 5
Expand All @@ -45,12 +45,12 @@ Linear convergence failures = 2
0.04 4.69419E-01 2 28 42 124 42 124 3.99E-03 11 166
0.08 2.44066E-01 2 35 57 192 57 192 1.01E-02 14 249
0.16 6.23528E-02 2 44 69 296 69 296 7.46E-03 14 365
0.32 1.41345E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41282E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82906E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11109E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.15933E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.33486E-02 1 100 171 691 171 691 9.06E-01 46 862
0.32 1.41347E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41337E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82944E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11152E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.16035E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.32936E-02 1 100 171 691 171 691 9.06E-01 46 862

Error test failures = 3
Nonlinear convergence failures = 5
Expand Down
24 changes: 12 additions & 12 deletions examples/ida/F2003_openmp/idaHeat2D_kry_omp_f2003_8.out
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ Tolerance parameters: rtol = 0.0E+00 atol = 1.0E-03
0.04 4.69419E-01 2 28 42 124 42 124 3.99E-03 11 166
0.08 2.44066E-01 2 35 57 192 57 192 1.01E-02 14 249
0.16 6.23528E-02 2 44 69 296 69 296 7.46E-03 14 365
0.32 1.41348E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41356E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82958E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11166E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.16071E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.32754E-02 1 100 171 691 171 691 9.06E-01 46 862
0.32 1.41346E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41313E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82928E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11134E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.15991E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.33163E-02 1 100 171 691 171 691 9.06E-01 46 862

Error test failures = 3
Nonlinear convergence failures = 5
Expand All @@ -45,12 +45,12 @@ Linear convergence failures = 2
0.04 4.69419E-01 2 28 42 124 42 124 3.99E-03 11 166
0.08 2.44066E-01 2 35 57 192 57 192 1.01E-02 14 249
0.16 6.23528E-02 2 44 69 296 69 296 7.46E-03 14 365
0.32 1.41343E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41212E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82858E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11055E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.15811E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.34206E-02 1 100 171 691 171 691 9.06E-01 46 862
0.32 1.41342E-02 1 64 105 530 105 530 2.76E-03 20 635
0.64 1.41198E-02 1 82 138 590 138 590 1.13E-01 37 728
1.28 1.82848E-02 1 86 144 615 144 615 1.97E-01 38 759
2.56 2.11044E-02 1 90 151 646 151 646 6.51E-01 39 797
5.12 3.15787E-02 1 94 160 663 160 663 1.69E+00 42 823
10.24 4.32463E-02 1 100 171 691 171 691 9.06E-01 46 862

Error test failures = 3
Nonlinear convergence failures = 5
Expand Down

0 comments on commit 4cc9ea9

Please sign in to comment.