LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
484 stars 118 forks source link

Possible incorrect build order when building FORTRAN interface #410

Closed mvsivaselvan closed 2 weeks ago

mvsivaselvan commented 5 months ago

I am building SUNDIALS 7.0.0 with BUILD_FORTRAN_MODULE_INTERFACE=ON.

I am using the Intel oneAPI C (icx) and FORTRAN (ifx) compilers on Windows.

It appears that the target sundials_fnvecmanyvector_mod is attemped to be built before the target sundials_fgeneric_mod although the former depends on the latter. During the attempted build of sundials_fnvecmanyvector_mod, I get the error below indicating that the modules fsundials_nvector_mod and fsundials_context_mod cannot be found. Both should be present if the sundials_fgeneric_mod had been built. I am not sure why this happens, because the CMakeLists.txt for sundials_fnvecmanyvector_mod has the dependency on sundials_fgeneric_mod.

Any suggestions would be much appreciated.


[51/341] Building Fortran object src\nvector\serial\fmod\C...fnvecserial_mod_obj_static.dir\fnvector_serial_mod.f90.obj FAILED: src/nvector/serial/fmod/CMakeFiles/sundials_fnvecserial_mod_obj_static.dir/fnvector_serial_mod.f90.obj fortran_STATIC/fnvector_serial_mod.mod C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin\ifx.exe /nologo /fpp -DSUNDIALS_STATIC_DEFINE -D_CRT_SECURE_NO_WARNINGS -IC:\Users\mvs\source\repos\sundials\src\nvector\serial\fmod -IC:\Users\mvs\source\repos\sundials\include -IC:\Users\mvs\source\repos\sundials\build\include -IC:\Users\mvs\source\repos\sundials\src\sundials -IC:\Users\mvs\source\repos\sundials\build\fortran_STATIC /W1 /nologo /fpp /libs:dll /threads /Od /debug:full /dbglibs -module:fortran_STATIC /Fosrc\nvector\serial\fmod\CMakeFiles\sundials_fnvecserial_mod_obj_static.dir\fnvector_serial_mod.f90.obj /Fdsrc\nvector\serial\fmod\CMakeFiles\sundials_fnvecserial_mod_obj_static.dir\ -c src\nvector\serial\fmod\CMakeFiles\sundials_fnvecserial_mod_obj_static.dir\fnvector_serial_mod.f90-pp.f90 C:\Users\mvs\source\repos\sundials\src\nvector\serial\fmod\fnvector_serial_mod.f90(23): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [FSUNDIALS_NVECTOR_MOD] use fsundials_nvector_mod -----^ C:\Users\mvs\source\repos\sundials\src\nvector\serial\fmod\fnvector_serial_mod.f90(24): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [FSUNDIALS_CONTEXT_MOD] use fsundials_context_mod -----^ C:\Users\mvs\source\repos\sundials\src\nvector\serial\fmod\fnvector_serial_mod.f90(25): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [FSUNDIALS_TYPES_MOD] use fsundials_types_mod

balos1 commented 5 months ago

Can you confirm that this is with SUNDIALS v7.0.0 release candidate and not v6.7.0? The main branch is pointing at v6.7.0.

mvsivaselvan commented 5 months ago

Apologies, I had previously cloned the main branch.

I just cloned the v7.0.0-rc.1 tag and tried to build it. I got the exact same error.

balos1 commented 4 months ago

What CMake generator are you using?

mvsivaselvan commented 4 months ago

I am using the Ninja CMake generator. I have also tried the Visual Studio 2022 generator with the same outcome.

From: Cody Balos @.> Sent: Thursday, February 15, 2024 3:25 PM To: LLNL/sundials @.> Cc: Mettupalayam Sivaselvan @.>; Author @.> Subject: Re: [LLNL/sundials] Possible incorrect build order when building FORTRAN interface (Issue #410)

You don't often get email from @.**@.>. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

What CMake generator are you using?

- Reply to this email directly, view it on GitHubhttps://github.com/LLNL/sundials/issues/410#issuecomment-1947270727, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKE7RJQRLAM4Y7JDZ26WQRTYTZVJVAVCNFSM6AAAAABCYRDULOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBXGI3TANZSG4. You are receiving this because you authored the thread.Message ID: @.**@.>>

balos1 commented 2 weeks ago

This should be fixed by #506.