Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ddbca4f
initial changes for time-dependent plasma and impurity profiles
mbeidler3 Apr 18, 2024
bf0db1d
including early_pspline_check
mbeidler3 Apr 19, 2024
8fe3407
tested implementation of Hollmanndt
mbeidler3 Apr 26, 2024
39f5895
Merge remote-tracking branch 'origin' into hollmann_dt
mbeidler3 Apr 26, 2024
241d6ad
using workaround for bug in rewriting restart_file.h5
mbeidler3 Apr 29, 2024
7fcdc5b
finishing workaround
mbeidler3 Apr 29, 2024
2b9e09f
including inquire(exist)
mbeidler3 Apr 29, 2024
6beca22
deallocating field, looking at max threads, removing simd from GCfiel…
mbeidler3 May 21, 2024
191323b
created acc multicore routines
mbeidler3 May 21, 2024
fde4225
use new ACC multicore routines
mbeidler3 May 22, 2024
fc31fe2
include GC_init_ACC
mbeidler3 May 22, 2024
9e3354b
fixing RNG for collision operator
mbeidler3 May 22, 2024
43e018c
adding analytic_profiles_ACC routines, and radiation to GCeOM_ACC rou…
mbeidler3 May 23, 2024
019e896
changes to fix simulations with analytical profiles
mbeidler3 May 24, 2024
69e3d73
including acc routine seq for routines getting profiles in GCEoM_ACC
mbeidler3 May 24, 2024
85a0b18
new routine to for analytic profile
mbeidler3 May 24, 2024
6cca1e0
initial additions for scalar avalanche operator using ACC on CPU
mbeidler3 Jun 27, 2024
73d385e
merging in main to hollmann_dt
mbeidler3 Nov 4, 2024
25e9048
adding test for collision operators using ionbalance data from Eric H…
mbeidler3 Nov 6, 2024
66b6d61
merging in main
mbeidler3 Dec 12, 2025
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
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ cmake -DCMAKE_BUILD_TYPE:String=$BUILD_TYPE \
-DCMAKE_Fortran_FLAGS="-malign-double -fconvert='big-endian'" \
-DCMAKE_C_FLAGS="-malign-double" \
-DCMAKE_CXX_FLAGS="-malign-double" \
-DCMAKE_Fortran_FLAGS_DEBUG="-g3 -ffpe-trap='zero,overflow' -fbacktrace" \
-DCMAKE_C_FLAGS_DEBUG="-g3" \
-DCMAKE_CXX_FLAGS_DEBUG="-g3" ../
-DCMAKE_Fortran_FLAGS_DEBUG="-g -ffpe-trap=zero,overflow -fbacktrace" \
-DCMAKE_C_FLAGS_DEBUG="-g" \
-DCMAKE_CXX_FLAGS_DEBUG="-g" \
../

make -j VERBOSE=1
139 changes: 108 additions & 31 deletions src/korc_HDF5.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1547,25 +1547,84 @@ subroutine save_simulation_parameters(params,spp,F,P)
call save_1d_array_to_hdf5(h5file_id,dset, &
P%X%Z*params%cpp%length,attr_array)

dset = TRIM(gname) // "/ne"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%ne_2D)

dset = TRIM(gname) // "/Te"
units = params%cpp%temperature
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%Te_2D)

dset = TRIM(gname) // "/Zeff"
call rsave_2d_array_to_hdf5(h5file_id, dset, &
P%Zeff_2D)
if (.not.(params%profile_model(10:12).eq.'Hdt')) then
dset = TRIM(gname) // "/ne"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%ne_2D)

dset = TRIM(gname) // "/Te"
units = params%cpp%temperature
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%Te_2D)

dset = TRIM(gname) // "/Zeff"
call rsave_2d_array_to_hdf5(h5file_id, dset, &
P%Zeff_2D)
else
dset = TRIM(gname) // "/ne"
units = params%cpp%density
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%ne_3D)

dset = TRIM(gname) // "/Te"
units = params%cpp%temperature
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%Te_3D)

dset = TRIM(gname) // "/Zeff"
call rsave_3d_array_to_hdf5(h5file_id, dset, &
P%Zeff_3D)
endif

if (params%profile_model(10:10).eq.'H') then
if (params%profile_model(10:11).eq.'H0') then

dset = TRIM(gname) // "/RHON"
call rsave_2d_array_to_hdf5(h5file_id, dset, &
P%RHON_2D)

dset = TRIM(gname) // "/nRE"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nRE_2D)

dset = TRIM(gname) // "/nAr0"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr0_2D)

dset = TRIM(gname) // "/nAr1"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr1_2D)

dset = TRIM(gname) // "/nAr2"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr2_2D)

dset = TRIM(gname) // "/nAr3"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr3_2D)

dset = TRIM(gname) // "/nD"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nD_2D)

dset = TRIM(gname) // "/nD1"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nD1_2D)

endif

if (params%profile_model(10:12).eq.'Hdt') then

dset = TRIM(gname) // "/RHON"
call rsave_2d_array_to_hdf5(h5file_id, dset, &
P%RHON)
call rsave_3d_array_to_hdf5(h5file_id, dset, &
P%RHON_3D)

dset = TRIM(gname) // "/nRE"
units = params%cpp%density
Expand All @@ -1574,33 +1633,38 @@ subroutine save_simulation_parameters(params,spp,F,P)

dset = TRIM(gname) // "/nAr0"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr0_2D)
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%nAr0_3D)

dset = TRIM(gname) // "/nAr1"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr1_2D)
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%nAr1_3D)

dset = TRIM(gname) // "/nAr2"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr2_2D)
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%nAr2_3D)

dset = TRIM(gname) // "/nAr3"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nAr3_2D)
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%nAr3_3D)

dset = TRIM(gname) // "/nAr4"
units = params%cpp%density
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%nAr4_3D)

dset = TRIM(gname) // "/nD"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nD_2D)
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%nD_3D)

dset = TRIM(gname) // "/nD1"
units = params%cpp%density
call rsave_2d_array_to_hdf5(h5file_id, dset, &
units*P%nD1_2D)
call rsave_3d_array_to_hdf5(h5file_id, dset, &
units*P%nD1_3D)

endif

Expand Down Expand Up @@ -2707,20 +2771,33 @@ subroutine save_restart_variables(params,spp,F)
!! Iterator for reading all the entried of params::outputs_list.
INTEGER :: mpierr
!! MPI error status.
INTEGER :: numel_send, numel_receive
INTEGER :: numel_send, numel_receive,exei
!! Variable used by MPI to count the amount of data sent by each MPI
!! procces.
!! Variable used by MPI to count the amount of data received by the main
!! MPI procces.
LOGICAL :: exist


! if ( MODULO(params%it,params%restart_output_cadence) .EQ. 0_ip ) then
if (params%mpi_params%rank.EQ.0_idef) then

write(output_unit_write,'("Saving restart: ",I15)') &
params%it/(params%t_skip*params%t_it_SC)
write(output_unit_write,'("Saving restart: ",I15)') &
params%it/(params%t_skip*params%t_it_SC)

filename = TRIM(params%path_to_outputs) // "restart_file.h5"

inquire(FILE=filename,exist=exist)

if (exist) then
call execute_command_line("rm " // TRIM(params%path_to_outputs) // "restart_file.h5",exitstat=exei)
IF (exei/=0) then
write(6,*) 'Error removing restart_file.h5'
call korc_abort(28)
end if
end if


call h5fcreate_f(TRIM(filename), H5F_ACC_TRUNC_F, h5file_id, h5error)

dset = "it"
Expand Down
Loading
Loading