Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/windows fortran builds #506

Merged
merged 109 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
64db5a0
cmake tweaks for windows fortran builds
balos1 Feb 16, 2024
d90ef4c
fix various spots in f90 examples where long was used instead of long…
balos1 Feb 16, 2024
008ab1f
enable fortran in windows github actions
balos1 Feb 16, 2024
2450d32
fix windows github action syntax
balos1 Feb 16, 2024
4d6138e
use > instead of |
balos1 Feb 16, 2024
7c0911e
use correct windows escape
balos1 Feb 16, 2024
4891267
use one line since github doesnt like more than one
balos1 Feb 16, 2024
8a6587b
oops, no fortran with msvc
balos1 Feb 16, 2024
f616e6c
add a ninja build
balos1 Feb 16, 2024
b6698e2
run ninja build on push temporarily
balos1 Feb 16, 2024
b9c7714
rename ninja build
balos1 Feb 16, 2024
33fa185
install ninja
balos1 Feb 16, 2024
bf03889
turn off unit tests for now
balos1 Feb 16, 2024
60fd509
use intel compilers with ninja
balos1 Feb 16, 2024
483a340
check cmake version
balos1 Feb 16, 2024
892e1bb
use icx-cl
balos1 Feb 16, 2024
33681a8
use different build dirs for static and shared
balos1 Feb 16, 2024
59d891a
default to shared llibs off on Windows, and warn users if they try to…
balos1 Feb 17, 2024
b96f4fa
fix build order for fortran modules
balos1 Feb 17, 2024
0b969f2
temporarily do all windows tests on push
balos1 Feb 17, 2024
57688aa
change space functions to use long int
balos1 Feb 17, 2024
961aa54
Merge branch 'feature/sunindextype-long-int-fixes' into bugfix/window…
balos1 Feb 17, 2024
4489fc2
fix use of Space functions in iterative solvers
balos1 Feb 26, 2024
add4f1b
Merge branch 'feature/sunindextype-long-int-fixes' into bugfix/window…
balos1 Feb 26, 2024
012c896
udpate fortran examples with correct int64_t usage
balos1 Feb 26, 2024
7a89ea6
regen fortran
balos1 Feb 26, 2024
89b9f35
various fixes in examples
balos1 Feb 26, 2024
d779532
test intel mpi on windows
balos1 Feb 26, 2024
01a6b6d
cleanup
balos1 Feb 26, 2024
858cf21
rename file back to what it was so actions sees it as the same
balos1 Feb 26, 2024
4bef213
fix nvector space op
balos1 Feb 26, 2024
37875a7
regen fortran
balos1 Feb 26, 2024
bc2c0c5
Merge branch 'feature/sunindextype-long-int-fixes' into bugfix/window…
balos1 Feb 26, 2024
b6c67fb
update places where Space is called and wrong type of args is used
balos1 Feb 26, 2024
f976102
Merge branch 'feature/sunindextype-long-int-fixes' into bugfix/window…
balos1 Feb 26, 2024
ead7727
more places where liw lrw dont match
balos1 Feb 26, 2024
88b6c44
Merge branch 'feature/sunindextype-long-int-fixes' into bugfix/window…
balos1 Feb 26, 2024
4c91484
Merge remote-tracking branch 'origin/develop' into bugfix/windows-for…
balos1 Jun 14, 2024
330ea32
update windows workflow scripts
balos1 Jun 14, 2024
6dbfe5b
make swig a variable in makefile
balos1 Jun 14, 2024
6a47413
regen fortran
balos1 Jun 14, 2024
8b915d4
revert examples
balos1 Jun 14, 2024
2a70714
undo restriction to only one build type
balos1 Jun 14, 2024
c0e1315
undo space function update
balos1 Jun 15, 2024
3040521
turn of deprecated warnings
balos1 Jun 17, 2024
717798f
use MSYS makefiles
balos1 Jun 17, 2024
c1573be
use a unique fortran module directory for each example
balos1 Jun 17, 2024
74d79fd
minor doc update
balos1 Jun 17, 2024
9f7aa3f
typo
balos1 Jun 17, 2024
95dfe5f
remove on:push
balos1 Jun 17, 2024
ea66c0a
unintended change
balos1 Jun 17, 2024
948caa6
default SWIG variable
balos1 Jun 17, 2024
476b4c1
use CMake_Fortran_MODULE_DIRECTORY before creating executable
balos1 Jun 17, 2024
f37dc0b
set CMake_Fortran_MODULE_DIRECTORY in examples that were missing it
balos1 Jun 17, 2024
0294b86
add --output-on-failure to ctest
balos1 Jun 17, 2024
f578cb0
use msys gcc specifically
balos1 Jun 17, 2024
a4d7894
install gfortran
balos1 Jun 17, 2024
be29747
ensure package fortran libraries link to the main library
balos1 Jun 17, 2024
d69a4f6
add missing SUNDIALS_EXPORT
balos1 Jun 17, 2024
ba56a79
turn off deprecated warnings in mingw build
balos1 Jun 17, 2024
2b6df74
need to set CMAKE_Fortran_MODULE_DIRECTORY first
balos1 Jun 17, 2024
c7a0701
only set sunctx on clone if it is not null
balos1 Jun 17, 2024
16405c8
Revert "ensure package fortran libraries link to the main library"
balos1 Jun 17, 2024
6cf34b8
test static first
balos1 Jun 17, 2024
3391f0b
Update SundialsAddLibrary.cmake
balos1 Jun 17, 2024
ae39cd7
remove windows mpi builds for now
balos1 Jun 17, 2024
ed2bf11
build shared and static at same time with msvc
balos1 Jun 17, 2024
b6b4303
change how constants in sundials_types are treated by swig to avoid c…
balos1 Jun 17, 2024
7ae952e
Merge remote-tracking branch 'origin/bugfix/windows-fortran-builds' i…
balos1 Jun 17, 2024
ce818aa
Merge branch 'bugfix/windows-fortran-builds' of https://github.com/LL…
balos1 Jun 17, 2024
73a7b00
increase max iterations in fortran fixedpoint test
balos1 Jun 17, 2024
9549256
try msys with ninja
balos1 Jun 17, 2024
a88887e
undo rename
balos1 Jun 18, 2024
07448ee
do shared build with msys only
balos1 Jun 18, 2024
510943b
try msys shared
balos1 Jun 18, 2024
f251717
update ark_bruss_f2003
balos1 Jun 18, 2024
00efdd2
add myindextype to arkode examples that didnt have it yet
balos1 Jun 18, 2024
22e9086
fix idx function
balos1 Jun 18, 2024
ee5bb65
add recent changes
balos1 Jun 18, 2024
59d43cd
use c_int64_t instead of c_long
balos1 Jun 18, 2024
6b12e49
revert changes to vectors
balos1 Jun 18, 2024
49f26d7
Revert "add myindextype to arkode examples that didnt have it yet"
balos1 Jun 18, 2024
946723c
use c_int64_t
balos1 Jun 18, 2024
84ba681
revert mxsteps
balos1 Jun 18, 2024
11a3a13
missed myindextype
balos1 Jun 18, 2024
2457a1a
more mismatch index
balos1 Jun 18, 2024
d0158b1
ivar, ix should be c_int
balos1 Jun 18, 2024
6059bcc
idx
balos1 Jun 18, 2024
6b6f525
specify kind
balos1 Jun 18, 2024
43b024f
just pass neq
balos1 Jun 18, 2024
70c46bf
more
balos1 Jun 18, 2024
e1d14c8
missing mod directory
balos1 Jun 18, 2024
60c1621
couple tweaks for literal sizes
balos1 Jun 18, 2024
f3ef77c
fix kinsol mismatch
balos1 Jun 18, 2024
841e14d
revert
balos1 Jun 18, 2024
64099f0
add verbose flag for building
balos1 Jun 18, 2024
0236011
turn shared mingw back on
balos1 Jun 18, 2024
45243ac
need separate build directories
balos1 Jun 18, 2024
4e37d37
fix fixedpoint sunnonlinear solver fortran test
balos1 Jun 18, 2024
9f75459
remove object_lib_only from controllers
balos1 Jun 19, 2024
ee805f3
fix mset, msubset type
balos1 Jun 19, 2024
3d3892f
move note
balos1 Jun 19, 2024
f3205b7
document issue with msys shared libraries and disable fortran interfa…
balos1 Jun 19, 2024
cff922e
make adapt controller object_lib_only
balos1 Jun 19, 2024
c8832ee
duplicate linking to sundials_core
balos1 Jun 19, 2024
1ba6d10
fix for #410
balos1 Jun 19, 2024
fb661b3
typo, andd comment
balos1 Jun 19, 2024
8a4ac74
typo
balos1 Jun 19, 2024
4a1ab4b
guard against non targets
balos1 Jun 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/windows-latest-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
# Execute tests
run: ctest --output-on-failure

# TODO(CJB): shared libraries with the fortran interfaces turned on
# fail to link correctly with this toolchain see https://github.com/LLNL/sundials/issues/507.
- name: Configure CMake (Shared)
# Configure CMake in a 'build' subdirectory
run: |
Expand All @@ -79,7 +81,7 @@ jobs:
-B ${GITHUB_WORKSPACE}/build_shared \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_FLAGS=-Wno-deprecated-declarations \
-DBUILD_FORTRAN_MODULE_INTERFACE=ON \
-DBUILD_FORTRAN_MODULE_INTERFACE=OFF \
-DBUILD_STATIC_LIBS=OFF \
-DSUNDIALS_BUILD_WITH_PROFILING=ON \
-DSUNDIALS_LOGGING_LEVEL=2 \
Expand Down
4 changes: 2 additions & 2 deletions doc/shared/RecentChanges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ Fix bug on LLP64 platforms (like Windows 64-bit) where ``KLU_INDEXTYPE`` could b
Check if size of ``SuiteSparse_long`` is 8 if the size of ``sunindextype`` is 8
when using KLU.

Fixed several build errors with the Fortran interfaces on Windows systems.

**Deprecation Notices**

Numerous ARKODE stepper-specific functions are now deprecated in favor of
Expand All @@ -129,5 +131,3 @@ The unsupported implementations of ``N_VGetArrayPointer`` and
``N_VSetArrayPointer`` for the *hypre* and PETSc vectors are now deprecated.
Users should access the underlying wrapped external library vector objects
instead with ``N_VGetVector_ParHyp`` and ``N_VGetVector_Petsc``, respectively.

Fixed several build errors with the Fortran interfaces on Windows systems.
3 changes: 1 addition & 2 deletions doc/shared/sundials/Fortran.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,7 @@ Important notes on portability
------------------------------

The SUNDIALS Fortran 2003 interface *should* be compatible with any compiler
supporting the Fortran 2003 ISO standard. However, it has only been tested and
confirmed to be working with GNU Fortran 4.9+ and Intel Fortran 18.0.1+.
supporting the Fortran 2003 ISO standard.

Upon compilation of SUNDIALS, Fortran module (``.mod``) files are generated for
each Fortran 2003 interface. These files are highly compiler specific, and thus
Expand Down
5 changes: 5 additions & 0 deletions doc/shared/sundials/Install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,11 @@ illustration only.

Default: ``OFF``

.. warning:: There is a known issue with MSYS/gfortran and SUNDIALS shared libraries
that causes linking the Fortran interfaces to fail when buidling SUNDIALS. For
now the work around is to only build with static libraries when using MSYS with
gfortran on Windows.

.. cmakeoption:: SUNDIALS_LOGGING_LEVEL

Set the maximum logging level for the SUNLogger runtime API. The higher this is set,
Expand Down
2 changes: 1 addition & 1 deletion examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ program main
! local variables
real(c_double) :: fnormtol, fnorm(1)
integer(c_int) :: ierr
integer(c_int) :: mset, msubset
integer(c_long) :: mset, msubset

type(c_ptr) :: sunctx ! sundials context
type(N_Vector), pointer :: sunvec_u ! sundials vectors
Expand Down
2 changes: 0 additions & 2 deletions src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollerimexgus_mod
fsunadaptcontroller_imexgus_mod.f90 fsunadaptcontroller_imexgus_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
balos1 marked this conversation as resolved.
Show resolved Hide resolved
OUTPUT_NAME
sundials_fsunadaptcontrollerimexgus_mod
OBJECT_LIB_ONLY
)

message(STATUS "Added SUNAdaptController_ImExGus F2003 interface")
2 changes: 0 additions & 2 deletions src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollerimexgus_mod
fsunadaptcontroller_imexgus_mod.f90 fsunadaptcontroller_imexgus_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunadaptcontrollerimexgus_mod
OBJECT_LIB_ONLY
)

message(STATUS "Added SUNAdaptController_ImExGus F2003 interface")
2 changes: 0 additions & 2 deletions src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollersoderlind_mod
fsunadaptcontroller_soderlind_mod.f90 fsunadaptcontroller_soderlind_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunadaptcontrollersoderlind_mod
OBJECT_LIB_ONLY
)

message(STATUS "Added SUNAdaptController_Soderlind F2003 interface")
Loading