Skip to content

Commit

Permalink
fixing mpi runs for agate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeidler3 committed Oct 31, 2024
1 parent 793a483 commit d18b588
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions src/korc_ppusher.f90
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@ subroutine FO_init(params,F,spp,output,step)
eta_tmp=180.0_rp/C_PI* &
ACOS((B_X(cc)*V_X(cc)+B_Y(cc)*V_Y(cc)+B_Z(cc)*V_Z(cc))/(Bmag(cc)*v(cc)))

if ((eta_tmp.gt.20._rp).or. &
((spp(ii)%vars%eta(pp-1+cc)-eta_tmp)/spp(ii)%vars%eta(pp-1+cc).gt.0.01)) then
write(6,*) 'abberation',pp
write(6,*) pp,spp(ii)%vars%eta(pp-1+cc),eta_tmp,'B', &
spp(ii)%vars%B(pp-1+cc,:),'PSI_P',spp(ii)%vars%PSI_P(pp-1+cc)
!if ((eta_tmp.gt.20._rp).or. &
! ((spp(ii)%vars%eta(pp-1+cc)-eta_tmp)/spp(ii)%vars%eta(pp-1+cc).gt.0.01)) then
! write(6,*) 'abberation',pp
! write(6,*) pp,spp(ii)%vars%eta(pp-1+cc),eta_tmp,'B', &
! spp(ii)%vars%B(pp-1+cc,:),'PSI_P',spp(ii)%vars%PSI_P(pp-1+cc)

endif
!endif

spp(ii)%vars%eta(pp-1+cc) = eta_tmp

Expand Down
12 changes: 6 additions & 6 deletions src/korc_velocity_distribution.f90
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,12 @@ subroutine gyro_distribution(params,random,F,spp)
ALLOCATE( theta(spp%ppp) )

! * * * * INITIALIZE VELOCITY * * * *
if (.not.params%SameRandSeed) then
CALL random%uniform%set(0.0_rp,1.0_rp)
do pp=1_idef,spp%ppp
theta(pp)=random%uniform%get()
enddo
endif
!if (.not.params%SameRandSeed) then
CALL random%uniform%set(0.0_rp,1.0_rp)
do pp=1_idef,spp%ppp
theta(pp)=random%uniform%get()
enddo
!endif
theta = 2.0_rp*C_PI*theta

if (spp%spatial_distribution.eq.'TRACER') theta=2.0*C_PI
Expand Down
24 changes: 12 additions & 12 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ set_property(TARGET xtest PROPERTY LINKER_LANGUAGE Fortran)
configure_file(${CMAKE_SOURCE_DIR}/test/egyro/korc_egyro.sh.in ${CMAKE_BINARY_DIR}/egyro_test/korc_egyro.sh)
configure_file(${CMAKE_SOURCE_DIR}/test/mars/korc_mars.sh.in ${CMAKE_BINARY_DIR}/mars_test/korc_mars.sh)

if(USE_PSPLINE)
add_test (NAME mars_test_1
COMMAND ${CMAKE_BINARY_DIR}/mars_test/korc_mars.sh 1
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set_tests_properties (mars_test_1 PROPERTIES PROCESSORS 1 ENVIRONMENT OMP_NUM_THREADS=1)
endif()
#if(USE_PSPLINE)
# add_test (NAME mars_test_1
# COMMAND ${CMAKE_BINARY_DIR}/mars_test/korc_mars.sh 1
# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# set_tests_properties (mars_test_1 PROPERTIES PROCESSORS 1 ENVIRONMENT OMP_NUM_THREADS=1)
#endif()

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/egyro_test)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/mars_test)
Expand All @@ -40,12 +40,12 @@ foreach(RANK IN ITEMS 1 2 4 8 16)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set_tests_properties (egyro_test_${RANK} PROPERTIES PROCESSORS ${RANK} ENVIRONMENT OMP_NUM_THREADS=1)

# if(USE_PSPLINE)
# add_test (NAME mars_test_${RANK}
# COMMAND ${CMAKE_BINARY_DIR}/mars_test/korc_mars.sh ${RANK}
# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# set_tests_properties (mars_test_${RANK} PROPERTIES PROCESSORS ${RANK} ENVIRONMENT OMP_NUM_THREADS=1)
# endif()
if(USE_PSPLINE)
add_test (NAME mars_test_${RANK}
COMMAND ${CMAKE_BINARY_DIR}/mars_test/korc_mars.sh ${RANK}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set_tests_properties (mars_test_${RANK} PROPERTIES PROCESSORS ${RANK} ENVIRONMENT OMP_NUM_THREADS=1)
endif()

add_test (NAME unit_testing_${RANK}
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${RANK} ./xtest TEST_OUT
Expand Down
Binary file modified test/mars/file_0.h5
Binary file not shown.
Binary file added test/mars/file_0_1.h5
Binary file not shown.
Binary file added test/mars/file_0_2.h5
Binary file not shown.
Binary file added test/mars/file_0_4.h5
Binary file not shown.
Binary file added test/mars/file_0_8.h5
Binary file not shown.
Binary file removed test/mars/file_0_new_random.h5
Binary file not shown.
4 changes: 2 additions & 2 deletions test/mars/input_file_D3D_191366_1762ms_MARS.korc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
! Append simulation results after previous simulation_time reached
reinit = F
! Begin a new simulation, reinitializing from restart file state
simulation_time = 1.E-7
simulation_time = 1.E-8
! Total aimed simulation time in seconds
! Run 10 mu s If transients exist put 5 extra mu s.
snapshot_frequency = 1.E-8
snapshot_frequency = 1.E-9
! Time between snapshots in seconds
restart_overwrite_frequency = 1.E-1
! Time between overwritting of restart file in seconds
Expand Down
2 changes: 1 addition & 1 deletion test/mars/korc_mars.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ fi

${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} $1 ./xkorc $INPUT_FILE $OUT_DIR/

h5diff -r -p 0.000008 $OUT_DIR/file_0.h5 ${CMAKE_SOURCE_DIR}/test/mars/file_0_new_random.h5
h5diff -r -p 0.000008 $OUT_DIR/file_0.h5 ${CMAKE_SOURCE_DIR}/test/mars/file_0_$1.h5

0 comments on commit d18b588

Please sign in to comment.