diff --git a/bmad/custom/apply_element_edge_kick_hook.f90 b/bmad/custom/apply_element_edge_kick_hook.f90 index 108066c50a..7e62cc6846 100644 --- a/bmad/custom/apply_element_edge_kick_hook.f90 +++ b/bmad/custom/apply_element_edge_kick_hook.f90 @@ -25,7 +25,7 @@ subroutine apply_element_edge_kick_hook (orb, fringe_info, track_ele, param, finished, mat6, make_matrix, rf_time) -use fringe_mod, dummy => apply_element_edge_kick_hook +use fringe_mod implicit none diff --git a/bmad/custom/check_aperture_limit_custom.f90 b/bmad/custom/check_aperture_limit_custom.f90 index 5f3cc2f2a3..49e925363a 100644 --- a/bmad/custom/check_aperture_limit_custom.f90 +++ b/bmad/custom/check_aperture_limit_custom.f90 @@ -23,7 +23,7 @@ subroutine check_aperture_limit_custom (orb, ele, particle_at, param, err_flag) -use bmad_interface, dummy => check_aperture_limit_custom +use bmad_interface implicit none diff --git a/bmad/custom/distance_to_aperture_custom.f90 b/bmad/custom/distance_to_aperture_custom.f90 index 7d921d4c95..7c32d5bdad 100644 --- a/bmad/custom/distance_to_aperture_custom.f90 +++ b/bmad/custom/distance_to_aperture_custom.f90 @@ -23,7 +23,7 @@ function distance_to_aperture_custom (orbit, particle_at, ele, no_aperture_here) result (dist) -use bmad, dummy => distance_to_aperture_custom +use bmad implicit none diff --git a/bmad/custom/ele_geometry_hook.f90 b/bmad/custom/ele_geometry_hook.f90 index 81fb2904a3..981dde6cd2 100644 --- a/bmad/custom/ele_geometry_hook.f90 +++ b/bmad/custom/ele_geometry_hook.f90 @@ -26,7 +26,7 @@ subroutine ele_geometry_hook (floor0, ele, floor, finished, len_scale) -use bmad_interface, dummy => ele_geometry_hook +use bmad_interface implicit none diff --git a/bmad/custom/ele_to_fibre_hook.f90 b/bmad/custom/ele_to_fibre_hook.f90 index 7f9df69d73..15cfd04267 100644 --- a/bmad/custom/ele_to_fibre_hook.f90 +++ b/bmad/custom/ele_to_fibre_hook.f90 @@ -17,7 +17,7 @@ subroutine ele_to_fibre_hook (ele, ptc_fibre, param, use_offsets, err_flag) -use bmad, except_dummy => ele_to_fibre_hook +use bmad use s_family, only: work, suntao, assignment(=) ! PTC implicit none diff --git a/bmad/custom/em_field_custom.f90 b/bmad/custom/em_field_custom.f90 index 6db82d8203..31eeddba21 100644 --- a/bmad/custom/em_field_custom.f90 +++ b/bmad/custom/em_field_custom.f90 @@ -47,7 +47,7 @@ recursive subroutine em_field_custom (ele, param, s_rel, orbit, local_ref_frame, field, calc_dfield, err_flag, & calc_potential, use_overlap, grid_allow_s_out_of_bounds, rf_time, used_eles) -use em_field_mod, except_dummy => em_field_custom +use em_field_mod implicit none diff --git a/bmad/custom/init_custom.f90 b/bmad/custom/init_custom.f90 index e415062907..1232508df0 100644 --- a/bmad/custom/init_custom.f90 +++ b/bmad/custom/init_custom.f90 @@ -19,8 +19,7 @@ subroutine init_custom (ele, err_flag) -use bmad_struct -use bmad_interface, except_dummy => init_custom +use bmad_interface implicit none diff --git a/bmad/custom/make_mat6_custom.f90 b/bmad/custom/make_mat6_custom.f90 index 7bc65a8836..2d8566be12 100644 --- a/bmad/custom/make_mat6_custom.f90 +++ b/bmad/custom/make_mat6_custom.f90 @@ -21,8 +21,7 @@ subroutine make_mat6_custom (ele, param, start_orb, end_orb, err_flag) -use bmad_struct -use bmad_interface, except_dummy => make_mat6_custom +use bmad_interface implicit none diff --git a/bmad/custom/radiation_integrals_custom.f90 b/bmad/custom/radiation_integrals_custom.f90 index 5dd24a30c2..04a55814aa 100644 --- a/bmad/custom/radiation_integrals_custom.f90 +++ b/bmad/custom/radiation_integrals_custom.f90 @@ -20,7 +20,7 @@ subroutine radiation_integrals_custom (lat, ir, orb, rad_int1, err_flag) -use bmad_interface, dummy => radiation_integrals_custom +use bmad_interface implicit none diff --git a/bmad/custom/time_runge_kutta_periodic_kick_hook.f90 b/bmad/custom/time_runge_kutta_periodic_kick_hook.f90 index 9907e31cf3..9f6dc384f3 100644 --- a/bmad/custom/time_runge_kutta_periodic_kick_hook.f90 +++ b/bmad/custom/time_runge_kutta_periodic_kick_hook.f90 @@ -32,7 +32,7 @@ subroutine time_runge_kutta_periodic_kick_hook (orbit, ele, param, stop_time, init_needed) -use bmad, except_dummy => time_runge_kutta_periodic_kick_hook +use bmad implicit none diff --git a/bmad/custom/track1_bunch_hook.f90 b/bmad/custom/track1_bunch_hook.f90 index edda787387..dfa337d6e0 100644 --- a/bmad/custom/track1_bunch_hook.f90 +++ b/bmad/custom/track1_bunch_hook.f90 @@ -24,7 +24,7 @@ subroutine track1_bunch_hook (bunch, ele, err, centroid, direction, finished, bunch_track) -use bmad, dummy => track1_bunch_hook +use bmad implicit none diff --git a/bmad/custom/track1_custom.f90 b/bmad/custom/track1_custom.f90 index 6ab42f7d89..9f1238de1d 100644 --- a/bmad/custom/track1_custom.f90 +++ b/bmad/custom/track1_custom.f90 @@ -35,7 +35,7 @@ subroutine track1_custom (orbit, ele, param, err_flag, finished, track) -use bmad, except_dummy => track1_custom +use bmad implicit none diff --git a/bmad/custom/track1_postprocess.f90 b/bmad/custom/track1_postprocess.f90 index 13f5722077..a99e9b69fa 100644 --- a/bmad/custom/track1_postprocess.f90 +++ b/bmad/custom/track1_postprocess.f90 @@ -23,7 +23,7 @@ subroutine track1_postprocess (start_orb, ele, param, end_orb) -use bmad, except_dummy => track1_postprocess +use bmad implicit none diff --git a/bmad/custom/track1_preprocess.f90 b/bmad/custom/track1_preprocess.f90 index 30890dd7d7..af3b91591e 100644 --- a/bmad/custom/track1_preprocess.f90 +++ b/bmad/custom/track1_preprocess.f90 @@ -32,7 +32,7 @@ subroutine track1_preprocess (start_orb, ele, param, err_flag, finished, radiation_included, track) -use bmad, except_dummy => track1_preprocess +use bmad implicit none diff --git a/bmad/custom/track1_spin_custom.f90 b/bmad/custom/track1_spin_custom.f90 index 698b479127..a89a9d9ad7 100644 --- a/bmad/custom/track1_spin_custom.f90 +++ b/bmad/custom/track1_spin_custom.f90 @@ -24,7 +24,7 @@ subroutine track1_spin_custom (start, ele, param, end, err_flag, make_quaternion) -use bmad_interface, except_dummy => track1_spin_custom +use bmad_interface implicit none diff --git a/bmad/custom/track1_wake_hook.f90 b/bmad/custom/track1_wake_hook.f90 index 932ac7a758..1af7333767 100644 --- a/bmad/custom/track1_wake_hook.f90 +++ b/bmad/custom/track1_wake_hook.f90 @@ -16,7 +16,7 @@ subroutine track1_wake_hook (bunch, ele, finished) -use bmad_interface, dummy => track1_wake_hook +use bmad_interface implicit none diff --git a/bmad/custom/track_many_hook.f90 b/bmad/custom/track_many_hook.f90 index 2555e7e208..8c07f247c6 100644 --- a/bmad/custom/track_many_hook.f90 +++ b/bmad/custom/track_many_hook.f90 @@ -24,7 +24,7 @@ subroutine track_many_hook (finished, lat, orbit, ix_start, ix_end, direction, ix_branch, track_state) -use bmad_interface, except_dummy => track_many_hook +use bmad_interface implicit none diff --git a/bmad/doc/misc-programming.tex b/bmad/doc/misc-programming.tex index 1eb8a158da..7720a79901 100644 --- a/bmad/doc/misc-programming.tex +++ b/bmad/doc/misc-programming.tex @@ -28,8 +28,14 @@ \section{Custom and Hook Routines} procedure(track1_custom_def), pointer :: track1_custom_ptr => null() \end{example} -To implement custom code for, say, \vn{track1_custom}, copy the file \vn{/bmad/custom/track1_custom.f90} -to the area where the program is +To implement custom code for, say, \vn{track1_custom}: +\begin{itemize} +% +\item +copy the file \vn{/bmad/custom/track1_custom.f90} to the area where the program is to be compiled. +% +\item +Code desired, diff --git a/bmad/modules/bmad_routine_interface.f90 b/bmad/modules/bmad_routine_interface.f90 index 37a8eab28c..3d681322b5 100644 --- a/bmad/modules/bmad_routine_interface.f90 +++ b/bmad/modules/bmad_routine_interface.f90 @@ -3237,192 +3237,6 @@ subroutine zero_ele_offsets (ele) ! Custom and hook routines -interface - -subroutine apply_element_edge_kick_hook (orb, fringe_info, track_ele, param, finished, mat6, make_matrix, rf_time) - import - implicit none - type (coord_struct) orb - type (fringe_field_info_struct) fringe_info - type (ele_struct) track_ele - type (lat_param_struct) param - real(rp), optional :: mat6(6,6), rf_time - logical, optional :: make_matrix - logical finished -end subroutine - -subroutine check_aperture_limit_custom (orb, ele, particle_at, param, err_flag) - import - implicit none - type (coord_struct) :: orb - type (ele_struct) :: ele - type (lat_param_struct) :: param - integer particle_at - logical err_flag -end subroutine - -function distance_to_aperture_custom (orbit, particle_at, ele, no_aperture_here) result (dist) - import - implicit none - type (coord_struct) orbit - type (ele_struct) ele - real(rp) dist - integer particle_at - logical no_aperture_here -end function - -subroutine ele_geometry_hook (floor0, ele, floor, finished, len_scale) - import - implicit none - type (ele_struct) ele - type (floor_position_struct) floor0, floor - real(rp) len_scale - logical finished -end subroutine - -subroutine wall_hit_handler_custom (orb, ele, s) - import - implicit none - type (coord_struct) :: orb - type (ele_struct) :: ele - real(rp) s -end subroutine - -recursive subroutine em_field_custom (ele, param, s_rel, orbit, local_ref_frame, field, calc_dfield, err_flag, & - calc_potential, use_overlap, grid_allow_s_out_of_bounds, rf_time, used_eles) - import - implicit none - type (ele_struct), target :: ele - type (lat_param_struct) param - type (coord_struct), intent(in) :: orbit - type (ele_pointer_struct), allocatable, optional :: used_eles(:) - real(rp), intent(in) :: s_rel - real(rp), optional :: rf_time - logical local_ref_frame - type (em_field_struct) :: field - logical, optional :: err_flag, grid_allow_s_out_of_bounds - logical, optional :: calc_dfield, calc_potential, use_overlap -end subroutine - -subroutine ele_to_fibre_hook (ele, ptc_fibre, param, use_offsets, err_flag) - import - implicit none - type (ele_struct) ele - type (fibre) ptc_fibre - type (lat_param_struct) param - logical use_offsets, err_flag -end subroutine - -subroutine radiation_integrals_custom (lat, ir, orb, rad_int1, err_flag) - import - implicit none - type (lat_struct) lat - type (coord_struct) orb(0:) - type (rad_int1_struct) rad_int1 - integer ir - logical err_flag -end subroutine - -subroutine init_custom (ele, err_flag) - import - implicit none - type (ele_struct), target :: ele - logical err_flag -end subroutine - -subroutine make_mat6_custom (ele, param, start_orb, end_orb, err_flag) - import - implicit none - type (ele_struct), target :: ele - type (coord_struct) :: start_orb, end_orb - type (lat_param_struct) param - logical err_flag, finished -end subroutine - -subroutine time_runge_kutta_periodic_kick_hook (orbit, ele, param, stop_time, init_needed) - import - type (coord_struct) orbit - type (ele_struct) ele - type (lat_param_struct) param - real(rp) stop_time - integer :: init_needed -end subroutine - -subroutine track1_bunch_hook (bunch, ele, err, centroid, direction, finished, bunch_track) - import - implicit none - type (bunch_struct), target :: bunch - type (ele_struct), target :: ele - type (coord_struct), optional :: centroid(0:) - type (bunch_track_struct), optional :: bunch_track - integer, optional :: direction - logical err, finished -end subroutine - -subroutine track1_custom (start_orb, ele, param, err_flag, finished, track) - import - implicit none - type (coord_struct) :: start_orb - type (coord_struct) :: end_orb - type (ele_struct) :: ele - type (lat_param_struct) :: param - type (track_struct), optional :: track - logical err_flag, finished, radiation_included -end subroutine - -subroutine track_many_hook (finished, lat, orbit, ix_start, ix_end, direction, ix_branch, track_state) - import - implicit none - type (lat_struct), target :: lat - type (coord_struct) orbit(0:) - integer ix_start - integer ix_end - integer direction - integer, optional :: ix_branch, track_state - logical finished -end subroutine - -subroutine track1_postprocess (start_orb, ele, param, end_orb) - import - implicit none - type (coord_struct) :: start_orb - type (coord_struct) :: end_orb - type (ele_struct) :: ele - type (lat_param_struct) :: param -end subroutine - -subroutine track1_preprocess (start_orb, ele, param, err_flag, finished, radiation_included, track) - import - implicit none - type (coord_struct) :: start_orb - type (coord_struct) :: end_orb - type (ele_struct), target :: ele - type (lat_param_struct) :: param - type (track_struct), optional :: track - logical err_flag, finished, radiation_included -end subroutine - -subroutine track1_spin_custom (start_orb, ele, param, end_orb, err_flag, make_quaternion) - import - implicit none - type (coord_struct) :: start_orb - type (coord_struct) :: end_orb - type (ele_struct) :: ele - type (lat_param_struct) :: param - logical err_flag - logical, optional :: make_quaternion -end subroutine - -subroutine track1_wake_hook (bunch, ele, finished) - import - implicit none - type (bunch_struct) bunch - type (ele_struct) ele - logical finished -end subroutine - -end interface - ! Hook and custom abstract definitions abstract interface diff --git a/bsim/dynamic_aperture/dynamic_aperture.f90 b/bsim/dynamic_aperture/dynamic_aperture.f90 index 3533d820c8..acaebfed19 100644 --- a/bsim/dynamic_aperture/dynamic_aperture.f90 +++ b/bsim/dynamic_aperture/dynamic_aperture.f90 @@ -27,6 +27,8 @@ program dynamic_aperture_program type (ele_struct), pointer :: ele type (branch_struct), pointer :: branch +procedure(track_many_hook_def) :: track_many_hook + real(rp) dpz(20) real(rp) :: ramping_start_time = 0 integer nargs, ios, i, j, n_dpz, nt diff --git a/bsim/dynamic_aperture/track_many_hook.f90 b/bsim/dynamic_aperture/track_many_hook.f90 index 4264ceeba0..841d5582e3 100644 --- a/bsim/dynamic_aperture/track_many_hook.f90 +++ b/bsim/dynamic_aperture/track_many_hook.f90 @@ -26,7 +26,7 @@ subroutine track_many_hook (finished, lat, orbit, ix_start, ix_end, direction, ix_branch, track_state) -use da_program_mod, except_dummy => track_many_hook +use da_program_mod implicit none diff --git a/bsim/spin_stroboscope/spin_stroboscope.f90 b/bsim/spin_stroboscope/spin_stroboscope.f90 index 34afdd9a69..0dc5ee45af 100644 --- a/bsim/spin_stroboscope/spin_stroboscope.f90 +++ b/bsim/spin_stroboscope/spin_stroboscope.f90 @@ -77,6 +77,8 @@ program spin_stroboscope type (fourier_mode_struct) fourier ! Fourier transform for the spin x-axis type (spin_results_struct), allocatable :: result(:) +procedure(track1_custom_def) :: track1_custom + real(rp) orbit_start(3), orbit_stop(3), delta(3), xfer_mat(3,3), closed_orb_invar_spin(3), dtune real(rp) time, unit_mat(3,3), norm_max, norm, tune2, r, axis(3), ave_invar_spin(3), dphase_long, dphase_transverse real(rp) f(3), p_lim, angle, angle0, angle1, angle2, dangle, j_amp(3), old_relaxed_invar_spin(3), old_scatter_min_invar_spin(3) diff --git a/bsim/spin_stroboscope/track1_custom.f90 b/bsim/spin_stroboscope/track1_custom.f90 index 3c104b43f3..745b771147 100644 --- a/bsim/spin_stroboscope/track1_custom.f90 +++ b/bsim/spin_stroboscope/track1_custom.f90 @@ -37,7 +37,7 @@ subroutine track1_custom (orbit, ele, param, err_flag, finished, track) -use bmad, except_dummy => track1_custom +use bmad implicit none diff --git a/regression_tests/patch_test/em_field_custom.f90 b/regression_tests/patch_test/em_field_custom.f90 index 38e48e9fdd..431be84e06 100644 --- a/regression_tests/patch_test/em_field_custom.f90 +++ b/regression_tests/patch_test/em_field_custom.f90 @@ -37,7 +37,7 @@ recursive subroutine em_field_custom (ele, param, s_rel, orbit, local_ref_frame, field, calc_dfield, err_flag, & calc_potential, use_overlap, grid_allow_s_out_of_bounds, rf_time, used_eles) -use em_field_mod, except_dummy2 => em_field_custom +use em_field_mod implicit none diff --git a/tao/code/tao_interface.f90 b/tao/code/tao_interface.f90 index 65e32820cd..086ffe3984 100644 --- a/tao/code/tao_interface.f90 +++ b/tao/code/tao_interface.f90 @@ -351,159 +351,6 @@ subroutine tao_help (what1, what2, lines, n_lines) integer, optional :: n_lines end subroutine -subroutine tao_hook_branch_calc (u, tao_lat, branch) - import - implicit none - type (tao_universe_struct), target :: u - type (tao_lattice_struct), target :: tao_lat - type (branch_struct), target :: branch -end subroutine - -subroutine tao_hook_command (command_line, found) - implicit none - character(*) command_line - logical found -end subroutine - -function tao_hook_curve_s_pt (s_default, ix_now, x1, x2, n_pts, tao_lat, curve) result (s_pt) - import - implicit none - type (tao_curve_struct) curve - type (tao_lattice_struct) tao_lat - real(rp) s_default, x1, x2, s_pt - integer ix_now, n_pts -end function - -subroutine tao_hook_draw_floor_plan (plot, graph) - import - implicit none - type (tao_plot_struct) plot - type (tao_graph_struct) graph -end subroutine - -subroutine tao_hook_draw_graph (plot, graph, found) - import - implicit none - type (tao_plot_struct) plot - type (tao_graph_struct) graph - logical found -end subroutine - -subroutine tao_hook_evaluate_a_datum (found, datum, u, tao_lat, datum_value, valid_value, why_invalid) - import - implicit none - type (tao_data_struct) datum - type (tao_universe_struct), target :: u - type (tao_lattice_struct), target :: tao_lat - real(rp) datum_value - logical found, valid_value - character(*), optional :: why_invalid -end subroutine - -subroutine tao_hook_graph_postsetup (plot, graph) - import - implicit none - type (tao_plot_struct) plot - type (tao_graph_struct) graph -end subroutine - -subroutine tao_hook_graph_setup (plot, graph, found) - import - implicit none - type (tao_plot_struct) plot - type (tao_graph_struct) graph - logical found -end subroutine - -subroutine tao_hook_init_beam () - implicit none -end subroutine - -subroutine tao_hook_init_data () - implicit none -end subroutine - -subroutine tao_hook_init_global (init_file, global) - import - implicit none - type (tao_global_struct) global - character(*) init_file -end subroutine - -subroutine tao_hook_init_lattice_post_parse (u) - import - implicit none - type (tao_universe_struct) u -end subroutine - -subroutine tao_hook_init_plotting () - import - implicit none -end subroutine - -subroutine tao_hook_init_read_lattice_info (lat_file) - implicit none - character(*) lat_file -end subroutine - -subroutine tao_hook_init1 (init_file_name) - implicit none - character(*) init_file_name -end subroutine - -subroutine tao_hook_init2 () - implicit none -end subroutine - -subroutine tao_hook_init_var() - implicit none -end subroutine - -subroutine tao_hook_lattice_calc (calc_ok) - implicit none - logical calc_ok -end subroutine - -subroutine tao_hook_merit_data (i_uni, j_data, data, valid_value_set) - import - implicit none - type (tao_data_struct) data - integer, intent(in) :: i_uni, j_data - logical valid_value_set -end subroutine - -subroutine tao_hook_merit_var (i_uni, j_var, var) - import - implicit none - type (tao_var_struct) var - integer, intent(in) :: i_uni, j_var -end subroutine - -subroutine tao_hook_optimizer (abort) - implicit none - logical abort -end subroutine - -subroutine tao_hook_parse_command_args() - implicit none -end subroutine - -subroutine tao_hook_plot_setup() - import - implicit none -end subroutine - -subroutine tao_hook_post_process_data () - implicit none -end subroutine - -subroutine tao_hook_show_cmd (what, result_id, lines, nl) - implicit none - character(*) what, result_id - character(*), allocatable :: lines(:) - integer nl -end subroutine - subroutine tao_init (err_flag) implicit none logical :: err_flag diff --git a/tao/hook/tao_hook_branch_calc.f90 b/tao/hook/tao_hook_branch_calc.f90 index ac81d6004c..af42d06eb3 100644 --- a/tao/hook/tao_hook_branch_calc.f90 +++ b/tao/hook/tao_hook_branch_calc.f90 @@ -11,7 +11,7 @@ subroutine tao_hook_branch_calc (u, tao_lat, branch) -use tao_interface, dummy => tao_hook_branch_calc +use tao_interface implicit none diff --git a/tao/hook/tao_hook_command.f90 b/tao/hook/tao_hook_command.f90 index 80ec339e78..9e840eda2f 100644 --- a/tao/hook/tao_hook_command.f90 +++ b/tao/hook/tao_hook_command.f90 @@ -21,7 +21,7 @@ subroutine tao_hook_command (command_line, found) -use tao_command_mod, dummy => tao_hook_command +use tao_command_mod implicit none diff --git a/tao/hook/tao_hook_curve_s_pt.f90 b/tao/hook/tao_hook_curve_s_pt.f90 index 43bde8f805..289ed3bd79 100644 --- a/tao/hook/tao_hook_curve_s_pt.f90 +++ b/tao/hook/tao_hook_curve_s_pt.f90 @@ -20,7 +20,7 @@ function tao_hook_curve_s_pt (s_default, ix_now, x1, x2, n_pts, tao_lat, curve) result (s_pt) -use tao_interface, dummy => tao_hook_curve_s_pt +use tao_interface implicit none diff --git a/tao/hook/tao_hook_draw_floor_plan.f90 b/tao/hook/tao_hook_draw_floor_plan.f90 index 95a3d93e01..97f8154585 100644 --- a/tao/hook/tao_hook_draw_floor_plan.f90 +++ b/tao/hook/tao_hook_draw_floor_plan.f90 @@ -11,7 +11,7 @@ subroutine tao_hook_draw_floor_plan (plot, graph) -use tao_interface, dummy => tao_hook_draw_floor_plan +use tao_interface implicit none diff --git a/tao/hook/tao_hook_draw_graph.f90 b/tao/hook/tao_hook_draw_graph.f90 index 2a13971e64..4078838908 100644 --- a/tao/hook/tao_hook_draw_graph.f90 +++ b/tao/hook/tao_hook_draw_graph.f90 @@ -15,7 +15,7 @@ subroutine tao_hook_draw_graph (plot, graph, found) -use tao_interface, dummy => tao_hook_draw_graph +use tao_interface implicit none diff --git a/tao/hook/tao_hook_evaluate_a_datum.f90 b/tao/hook/tao_hook_evaluate_a_datum.f90 index 3b8e766b25..156a7f1d89 100644 --- a/tao/hook/tao_hook_evaluate_a_datum.f90 +++ b/tao/hook/tao_hook_evaluate_a_datum.f90 @@ -17,7 +17,7 @@ subroutine tao_hook_evaluate_a_datum (found, datum, u, tao_lat, datum_value, valid_value, why_invalid) -use tao_data_and_eval_mod, dummy => tao_hook_evaluate_a_datum +use tao_data_and_eval_mod implicit none diff --git a/tao/hook/tao_hook_graph_postsetup.f90 b/tao/hook/tao_hook_graph_postsetup.f90 index 886a608904..293d71b9ef 100644 --- a/tao/hook/tao_hook_graph_postsetup.f90 +++ b/tao/hook/tao_hook_graph_postsetup.f90 @@ -13,7 +13,7 @@ subroutine tao_hook_graph_postsetup (plot, graph) -use tao_interface, dummy => tao_hook_graph_postsetup +use tao_interface implicit none diff --git a/tao/hook/tao_hook_graph_setup.f90 b/tao/hook/tao_hook_graph_setup.f90 index 3555e46801..e466de81a0 100644 --- a/tao/hook/tao_hook_graph_setup.f90 +++ b/tao/hook/tao_hook_graph_setup.f90 @@ -15,7 +15,7 @@ subroutine tao_hook_graph_setup (plot, graph, found) -use tao_interface, dummy => tao_hook_graph_setup +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init1.f90 b/tao/hook/tao_hook_init1.f90 index a499c2a6df..11ed4b9212 100644 --- a/tao/hook/tao_hook_init1.f90 +++ b/tao/hook/tao_hook_init1.f90 @@ -9,7 +9,7 @@ subroutine tao_hook_init1 (init_file_name) -use tao_interface, dummy => tao_hook_init1 +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init2.f90 b/tao/hook/tao_hook_init2.f90 index 02076e0a5d..478d2f2f33 100644 --- a/tao/hook/tao_hook_init2.f90 +++ b/tao/hook/tao_hook_init2.f90 @@ -6,7 +6,7 @@ subroutine tao_hook_init2 () -use tao_interface, dummy => tao_hook_init2 +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init_beam.f90 b/tao/hook/tao_hook_init_beam.f90 index aa9afb76c3..3400ce15c1 100644 --- a/tao/hook/tao_hook_init_beam.f90 +++ b/tao/hook/tao_hook_init_beam.f90 @@ -8,7 +8,7 @@ subroutine tao_hook_init_beam () -use tao_interface, dummy => tao_hook_init_beam +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init_data.f90 b/tao/hook/tao_hook_init_data.f90 index a029ab0cf0..03d04872e5 100644 --- a/tao/hook/tao_hook_init_data.f90 +++ b/tao/hook/tao_hook_init_data.f90 @@ -6,7 +6,7 @@ subroutine tao_hook_init_data () -use tao_init_data_mod, dummy => tao_hook_init_data +use tao_init_data_mod implicit none diff --git a/tao/hook/tao_hook_init_global.f90 b/tao/hook/tao_hook_init_global.f90 index dc5be6ba8a..0be5e23fc2 100644 --- a/tao/hook/tao_hook_init_global.f90 +++ b/tao/hook/tao_hook_init_global.f90 @@ -7,7 +7,7 @@ subroutine tao_hook_init_global (init_file, global) -use tao_interface, dummy => tao_hook_init_global +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init_lattice_post_parse.f90 b/tao/hook/tao_hook_init_lattice_post_parse.f90 index 3da531b60f..bc05b1be21 100644 --- a/tao/hook/tao_hook_init_lattice_post_parse.f90 +++ b/tao/hook/tao_hook_init_lattice_post_parse.f90 @@ -12,7 +12,7 @@ subroutine tao_hook_init_lattice_post_parse (u) -use tao_interface, dummy => tao_hook_init_lattice_post_parse +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init_plotting.f90 b/tao/hook/tao_hook_init_plotting.f90 index 152bd6a827..c176661d31 100644 --- a/tao/hook/tao_hook_init_plotting.f90 +++ b/tao/hook/tao_hook_init_plotting.f90 @@ -6,7 +6,7 @@ subroutine tao_hook_init_plotting () -use tao_interface, dummy => tao_hook_init_plotting +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init_read_lattice_info.f90 b/tao/hook/tao_hook_init_read_lattice_info.f90 index 76e3973e13..c30ffa92de 100644 --- a/tao/hook/tao_hook_init_read_lattice_info.f90 +++ b/tao/hook/tao_hook_init_read_lattice_info.f90 @@ -11,7 +11,7 @@ subroutine tao_hook_init_read_lattice_info (file_name) -use tao_interface, dummy => tao_hook_init_read_lattice_info +use tao_interface implicit none diff --git a/tao/hook/tao_hook_init_var.f90 b/tao/hook/tao_hook_init_var.f90 index 8fdd439957..935b88c8ed 100644 --- a/tao/hook/tao_hook_init_var.f90 +++ b/tao/hook/tao_hook_init_var.f90 @@ -6,7 +6,7 @@ subroutine tao_hook_init_var () -use tao_init_variables_mod, dummy => tao_hook_init_var +use tao_init_variables_mod implicit none diff --git a/tao/hook/tao_hook_lattice_calc.f90 b/tao/hook/tao_hook_lattice_calc.f90 index 22ccc29c60..e13a485802 100644 --- a/tao/hook/tao_hook_lattice_calc.f90 +++ b/tao/hook/tao_hook_lattice_calc.f90 @@ -25,7 +25,7 @@ subroutine tao_hook_lattice_calc (calc_ok) -use tao_interface, dummy => tao_hook_lattice_calc +use tao_interface implicit none diff --git a/tao/hook/tao_hook_merit_data.f90 b/tao/hook/tao_hook_merit_data.f90 index 7b55bd4511..13575c3dde 100644 --- a/tao/hook/tao_hook_merit_data.f90 +++ b/tao/hook/tao_hook_merit_data.f90 @@ -19,7 +19,7 @@ subroutine tao_hook_merit_data (i_uni, j_data, data, valid_value_set) -use tao_interface, dummy => tao_hook_merit_data +use tao_interface implicit none diff --git a/tao/hook/tao_hook_merit_var.f90 b/tao/hook/tao_hook_merit_var.f90 index 80c76d6868..9b0a501ecf 100644 --- a/tao/hook/tao_hook_merit_var.f90 +++ b/tao/hook/tao_hook_merit_var.f90 @@ -18,7 +18,7 @@ subroutine tao_hook_merit_var (i_uni, j_var, var) -use tao_interface, dummy => tao_hook_merit_var +use tao_interface implicit none diff --git a/tao/hook/tao_hook_optimizer.f90 b/tao/hook/tao_hook_optimizer.f90 index eb0ec5e451..8cba6f6c70 100644 --- a/tao/hook/tao_hook_optimizer.f90 +++ b/tao/hook/tao_hook_optimizer.f90 @@ -10,7 +10,7 @@ subroutine tao_hook_optimizer (abort) -use tao_interface, dummy => tao_hook_optimizer +use tao_interface implicit none diff --git a/tao/hook/tao_hook_parse_command_args.f90 b/tao/hook/tao_hook_parse_command_args.f90 index cf79669879..f121f03485 100644 --- a/tao/hook/tao_hook_parse_command_args.f90 +++ b/tao/hook/tao_hook_parse_command_args.f90 @@ -10,7 +10,7 @@ subroutine tao_hook_parse_command_args () -use tao_interface, dummy => tao_hook_parse_command_args +use tao_interface implicit none diff --git a/tao/hook/tao_hook_plot_setup.f90 b/tao/hook/tao_hook_plot_setup.f90 index df33158d9f..dc9b5df980 100644 --- a/tao/hook/tao_hook_plot_setup.f90 +++ b/tao/hook/tao_hook_plot_setup.f90 @@ -6,7 +6,7 @@ subroutine tao_hook_plot_setup () -use tao_interface, dummy => tao_hook_plot_setup +use tao_interface implicit none diff --git a/tao/hook/tao_hook_post_process_data.f90 b/tao/hook/tao_hook_post_process_data.f90 index 06ab02a79e..0a80f9adfa 100644 --- a/tao/hook/tao_hook_post_process_data.f90 +++ b/tao/hook/tao_hook_post_process_data.f90 @@ -10,7 +10,7 @@ subroutine tao_hook_post_process_data () -use tao_interface, dummy => tao_hook_post_process_data +use tao_interface implicit none diff --git a/tao/hook/tao_hook_show_cmd.f90 b/tao/hook/tao_hook_show_cmd.f90 index 3eb6f46864..6b423f4bcd 100644 --- a/tao/hook/tao_hook_show_cmd.f90 +++ b/tao/hook/tao_hook_show_cmd.f90 @@ -17,7 +17,7 @@ subroutine tao_hook_show_cmd (what, result_id, lines, nl) -use tao_interface, dummy => tao_hook_show_cmd +use tao_interface implicit none diff --git a/util/Master.cmake b/util/Master.cmake index e964353508..ef6af05704 100644 --- a/util/Master.cmake +++ b/util/Master.cmake @@ -246,13 +246,8 @@ ENDIF () # C / C++ Compiler flags #----------------------------------- -IF (CMAKE_SYSTEM_NAME MATCHES "HARDWARE-DEVEL") - SET (BASE_C_FLAGS) - SET (BASE_CXX_FLAGS) -ELSE () - SET (BASE_C_FLAGS "-Df2cFortran -O0 -std=gnu99 ${CESR_FLAGS} ${PLOT_LIBRARY_FLAG} -D_POSIX -D_REENTRANT -Wall -fPIC -Wno-trigraphs -Wno-unused ${MPI_COMPILE_FLAGS}") - SET (BASE_CXX_FLAGS "-O0 -Wno-deprecated ${CESR_FLAGS} ${PLOT_LIBRARY_FLAG} -D_POSIX -D_REENTRANT -Wall -fPIC -Wno-trigraphs -Wno-unused ${MPI_COMPILE_FLAGS}") -ENDIF () +SET (BASE_C_FLAGS "-Df2cFortran -O0 -std=gnu99 ${CESR_FLAGS} ${PLOT_LIBRARY_FLAG} -D_POSIX -D_REENTRANT -Wall -fPIC -Wno-trigraphs -Wno-unused ${MPI_COMPILE_FLAGS}") +SET (BASE_CXX_FLAGS "-O0 -Wno-deprecated ${CESR_FLAGS} ${PLOT_LIBRARY_FLAG} -D_POSIX -D_REENTRANT -Wall -fPIC -Wno-trigraphs -Wno-unused ${MPI_COMPILE_FLAGS}") #----------------------------------- # For non-Linux or non-ifort or @@ -264,9 +259,6 @@ ENDIF () IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND ${FORTRAN_COMPILER} MATCHES "ifort" AND CMAKE_SIZEOF_VOID_P EQUAL 8) SET (BASE_C_FLAGS "${BASE_C_FLAGS} -mcmodel=medium") SET (BASE_CXX_FLAGS "${BASE_CXX_FLAGS} -mcmodel=medium") -ELSEIF (CMAKE_SYSTEM_NAME MATCHES "HARDWARE-DEVEL") - SET (BASE_C_FLAGS) - SET (BASE_CXX_FLAGS) ENDIF () #-------------------------------------- @@ -412,19 +404,11 @@ ELSE () set (BASE_Fortran_FLAGS "${BASE_Fortran_FLAGS} ${ACC_GFORTRAN_OPTIMIZATION_FLAG}") ENDIF () -IF (${CMAKE_SYSTEM_NAME} MATCHES "HARDWARE-DEVEL") - message("Build Target : ${CMAKE_SYSTEM_NAME}") - message("C Compiler : ${CMAKE_C_COMPILER}") - message("Fortran Compiler : ${CMAKE_Fortran_COMPILER}") - message("Linker : ${CMAKE_LINKER}") - set (BASE_C_FLAGS) -ELSE () - message("Current Directory : ${CMAKE_CURRENT_SOURCE_DIR}") - message("Linking with release : ${RELEASE_NAME} \(${RELEASE_NAME_TRUE}\)") - message("C Compiler : ${CMAKE_C_COMPILER}") - message("Fortran Compiler : ${CMAKE_Fortran_COMPILER}") - message("Plotting Libraries : ${PLOT_LINK_LIBS}") -ENDIF () +message("Current Directory : ${CMAKE_CURRENT_SOURCE_DIR}") +message("Linking with release : ${RELEASE_NAME} \(${RELEASE_NAME_TRUE}\)") +message("C Compiler : ${CMAKE_C_COMPILER}") +message("Fortran Compiler : ${CMAKE_Fortran_COMPILER}") +message("Plotting Libraries : ${PLOT_LINK_LIBS}") IF (DEFINED SHARED_LINK_LIBS) message("Shared Libraries : ${SHARED_LINK_LIBS}") @@ -495,13 +479,6 @@ foreach(h5dir ${HDF5_Fortran_INCLUDE_DIRS}) endif() endforeach() -# If building for HARDWARE-DEVEL, remove the include directories which are not needed - -IF (CMAKE_SYSTEM_NAME MATCHES "HARDWARE-DEVEL") - SET (MASTER_INC_DIRS) -ENDIF () - - #------------------------------------------------------ # Add local include paths to search list if they exist #------------------------------------------------------ @@ -575,13 +552,8 @@ ELSE () ENDIF () ENDIF () -IF (CMAKE_SYSTEM_NAME MATCHES "HARDWARE-DEVEL") - SET (MASTER_LINK_DIRS) -ENDIF () - LINK_DIRECTORIES (${MASTER_LINK_DIRS}) - #------------------------------------------- # Collect list of all source files for all # supported languages from all directories @@ -789,8 +761,8 @@ foreach(exespec ${EXE_SPECS}) IF(${LIBNAME} MATCHES ${dep}) ELSE() - LIST(FIND TARGETS ${dep} DEP_SEEN) - IF(${DEP_SEEN} EQUAL -1) + LIST(FIND TARGETS ${dep} DEP_SEEN) + IF(${DEP_SEEN} EQUAL -1) IF (EXISTS ${OUTPUT_BASEDIR}/lib/lib${dep}.so) add_library(${dep} SHARED IMPORTED) LIST(APPEND TARGETS ${dep}) @@ -804,8 +776,8 @@ foreach(exespec ${EXE_SPECS}) LIST(APPEND TARGETS ${dep}) set_property(TARGET ${dep} PROPERTY IMPORTED_LOCATION ${RELEASE_DIR}/lib/lib${dep}.so) ENDIF () - ENDIF() ENDIF() + ENDIF() endforeach(dep) @@ -815,8 +787,8 @@ foreach(exespec ${EXE_SPECS}) IF(${LIBNAME} MATCHES ${dep}) ELSE() - LIST(FIND TARGETS ${dep} DEP_SEEN) - IF(${DEP_SEEN} EQUAL -1) + LIST(FIND TARGETS ${dep} DEP_SEEN) + IF(${DEP_SEEN} EQUAL -1) IF (EXISTS ${OUTPUT_BASEDIR}/lib/lib${dep}.dylib) add_library(${dep} SHARED IMPORTED) LIST(APPEND TARGETS ${dep}) @@ -841,8 +813,8 @@ foreach(exespec ${EXE_SPECS}) IF(${LIBNAME} MATCHES ${dep}) ELSE() - LIST(FIND TARGETS ${dep} DEP_SEEN) - IF(${DEP_SEEN} EQUAL -1) + LIST(FIND TARGETS ${dep} DEP_SEEN) + IF(${DEP_SEEN} EQUAL -1) IF (EXISTS ${OUTPUT_BASEDIR}/lib/lib${dep}.a) add_library(${dep} STATIC IMPORTED) LIST(APPEND TARGETS ${dep}) @@ -856,8 +828,8 @@ foreach(exespec ${EXE_SPECS}) LIST(APPEND TARGETS ${dep}) set_property(TARGET ${dep} PROPERTY IMPORTED_LOCATION ${RELEASE_DIR}/lib/lib${dep}.a) ENDIF () - ENDIF() ENDIF() + ENDIF() endforeach(dep) @@ -1079,21 +1051,12 @@ foreach(exespec ${EXE_SPECS}) set (EXTRA_SHARED_LINK_LIBS "") ENDIF () - IF (CMAKE_SYSTEM_NAME MATCHES "HARDWARE-DEVEL") - foreach(file ${SRC_FILES}) - set(OBJ_FILES "${OBJ_FILES} CMakeFiles/${EXENAME}-exe.dir/${file}.o") - endforeach(file) - set (CMAKE_C_LINK_EXECUTABLE "${CMAKE_LINKER} ${LINK_FLAGS} ${OBJ_FILES} -o ${OUTPUT_BASEDIR}/bin/${EXENAME}.exe") - TARGET_LINK_LIBRARIES(${EXENAME}-exe - ) - ELSE () - TARGET_LINK_LIBRARIES(${EXENAME}-exe - ${STATIC_FLAG} ${LINK_LIBS} - ${SHARED_FLAG} ${SHARED_LINK_LIBS} ${EXTRA_SHARED_LINK_LIBS} - ${X11_LIBRARIES} ${ACC_LINK_FLAGS} ${OPENMP_LINK_LIBS} - ${LINK_FLAGS} ${MAPLINE} ${IMPLICIT_LINKER_LIBRARIES} - ) - ENDIF () + TARGET_LINK_LIBRARIES(${EXENAME}-exe + ${STATIC_FLAG} ${LINK_LIBS} + ${SHARED_FLAG} ${SHARED_LINK_LIBS} ${EXTRA_SHARED_LINK_LIBS} + ${X11_LIBRARIES} ${ACC_LINK_FLAGS} ${OPENMP_LINK_LIBS} + ${LINK_FLAGS} ${MAPLINE} ${IMPLICIT_LINKER_LIBRARIES} + ) SET(CFLAGS) SET(FFLAGS)