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

Feat/time integrator #41

Merged
merged 8 commits into from
Dec 22, 2024
Merged

Feat/time integrator #41

merged 8 commits into from
Dec 22, 2024

Conversation

HenningScheufler
Copy link
Collaborator

This branch applies the necessary adaptions to support the sundials time intergration
@greole

@HenningScheufler HenningScheufler added this to the 0.1 Release milestone Dec 20, 2024
Copy link
Contributor

@greole greole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@HenningScheufler
Copy link
Collaborator Author

tutorials / scalarAdvection


ddtSchemes
{
    default         none;
    ddt(T)          Euler;
    ddt(rho,U)      Euler;
    ddt(rho,T)      Euler;
    // type            forwardEuler; <-- works on all executors
    type            Runge-Kutta; <-- does not work an crashes with the following error
    Runge-Kutta-Method Forward-Euler;
}
type            Runge-Kutta; 
executor        Serial;

error:
creating NeoFOAM mesh
creating NeoFOAM fields
Courant Number mean: 0.04897273441866695 max: 0.0999151015802838
max(phi) : 0.0004999074680291148
max(U) : (0.9998149360582285 0.9998149360582285 0)
deltaT = 0.0003846153846153846
Time = 0.00038461538
[stack trace]
=============
#1  Foam::sigSegv::sigHandler(int) in ~/OpenFOAM/OpenFOAM-v2406/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  Kokkos::Impl::ViewTracker<Kokkos::View<double*, Kokkos::HostSpace> >::ViewTracker(Kokkos::Impl::ViewTracker<Kokkos::View<double*, Kokkos::HostSpace> > const&) at ~/libsAndApps/FoamAdapter/build/profiling/_deps/kokkos-src/core/src/impl/Kokkos_SharedAlloc.hpp:587 (discriminator 2)
#4  ? at ~/libsAndApps/FoamAdapter/build/profiling/_deps/kokkos-src/core/src/Kokkos_View.hpp:1309 (discriminator 1)
#5  int NeoFOAM::sundials::explicitRKSolve<NeoFOAM::finiteVolume::cellCentred::VolumeField<double> >(double, _generic_N_Vector*, _generic_N_Vector*, void*) at ~/libsAndApps/FoamAdapter/NeoFOAM/include/NeoFOAM/timeIntegration/sundials.hpp:196
#6  erkStep_FullRHS at ~/libsAndApps/FoamAdapter/build/profiling/_deps/sundials-src/src/arkode/arkode_erkstep.c:521
#7  erkStep_TakeStep at ~/libsAndApps/FoamAdapter/build/profiling/_deps/sundials-src/src/arkode/arkode_erkstep.c:656
#8  ARKodeEvolve at ~/libsAndApps/FoamAdapter/build/profiling/_deps/sundials-src/src/arkode/arkode.c:890
#9  NeoFOAM::timeIntegration::RungeKutta<NeoFOAM::finiteVolume::cellCentred::VolumeField<double> >::solve(NeoFOAM::dsl::Expression&, NeoFOAM::finiteVolume::cellCentred::VolumeField<double>&, double, double) at ~/libsAndApps/FoamAdapter/NeoFOAM/src/timeIntegration/rungeKutta.cpp:45 (discriminator 1)
#10  ?
#11  ? in /lib/x86_64-linux-gnu/libc.so.6
#12  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#13  ?
=============
Segmentation fault (core dumped)
type            Runge-Kutta; 
executor        GPU;

error:
creating NeoFOAM mesh
creating NeoFOAM fields
Courant Number mean: 0.04897273441866695 max: 0.0999151015802838
max(phi) : 0.0004999074680291148
max(U) : (0.9998149360582285 0.9998149360582285 0)
deltaT = 0.0003846153846153846
Time = 0.00038461538
(instance.impl_internal_space_instance()->cuda_memcpy_async_wrapper( dst, src, n, cudaMemcpyDefault)) error( cudaErrorIllegalAddress): an illegal memory access was encountered /home/henning/libsAndApps/FoamAdapter/build/profiling/_deps/kokkos-src/core/src/Cuda/Kokkos_CudaSpace.cpp:75
Backtrace:
[0x77ae1b081769] Kokkos::Impl::save_stacktrace()
[0x77ae1b05c3d8] Kokkos::Impl::host_abort(char const*)
[0x77ae1b0895ae] Kokkos::Impl::cuda_internal_error_abort(cudaError, char const*, char const*, int)
[0x77ae1b08326a] Kokkos::Impl::DeepCopyAsyncCuda(Kokkos::Cuda const&, void*, void const*, unsigned long)
[0x77ae1b086a0a] Kokkos::Impl::HostInaccessibleSharedAllocationRecordCommon<Kokkos::CudaSpace>::get_record(void*)
[0x77ae1b086d02] Kokkos::Impl::HostInaccessibleSharedAllocationRecordCommon<Kokkos::CudaSpace>::deallocate_tracked(void*)
[0x77ae1afb1ed5] NeoFOAM::finiteVolume::cellCentred::computeDiv(NeoFOAM::finiteVolume::cellCentred::SurfaceField<double> const&, NeoFOAM::finiteVolume::cellCentred::VolumeField<double> const&, NeoFOAM::finiteVolume::cellCentred::SurfaceInterpolation const&, NeoFOAM::Field<double>&)
[0x627cfdb9a57f] 
[0x77ae1aff79fb] int NeoFOAM::sundials::explicitRKSolve<NeoFOAM::finiteVolume::cellCentred::VolumeField<double> >(double, _generic_N_Vector*, _generic_N_Vector*, void*)
[0x77ae1b01d370] erkStep_FullRHS
[0x77ae1b01e3eb] erkStep_TakeStep
[0x77ae1b02b4b5] ARKodeEvolve
[0x77ae1b011585] NeoFOAM::timeIntegration::RungeKutta<NeoFOAM::finiteVolume::cellCentred::VolumeField<double> >::solve(NeoFOAM::dsl::Expression&, NeoFOAM::finiteVolume::cellCentred::VolumeField<double>&, double, double)
[0x627cfdb5a9bb] 
[0x77ae1a02a1ca] 
[0x77ae1a02a28b] __libc_start_main
[0x627cfdb5b965] 
Aborted (core dumped)

HenningScheufler and others added 3 commits December 20, 2024 19:38
Co-authored-by: bevanwsjones <bevanwsjones@users.noreply.github.com>
@HenningScheufler HenningScheufler merged commit bbb350d into main Dec 22, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants