append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
- # Test OpenACC with available accelerators.
- foreach offload_target_openacc $offload_targets_s_openacc {
- set tagopt "-DACC_DEVICE_TYPE_$offload_target_openacc=1"
+ # Test with available OpenACC device types.
+ global openacc_device_type
+ foreach openacc_device_type $openacc_device_types_s {
+ set tagopt "-DACC_DEVICE_TYPE_$openacc_device_type=1"
- switch $offload_target_openacc {
+ switch $openacc_device_type {
host {
set acc_mem_shared 1
}
nvidia {
if { ![check_effective_target_openacc_nvidia_accel_present] } {
# Don't bother; execution testing is going to FAIL.
- untested "$subdir $offload_target_openacc offloading: supported, but hardware not accessible"
+ untested "$subdir $openacc_device_type offloading: supported, but hardware not accessible"
continue
}
set acc_mem_shared 0
}
default {
- error "Unknown OpenACC device type: $offload_target_openacc"
+ error "Unknown OpenACC device type: $openacc_device_type"
}
}
set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
- setenv ACC_DEVICE_TYPE $offload_target_openacc
+ setenv ACC_DEVICE_TYPE $openacc_device_type
# For Fortran we're doing torture testing, as Fortran has far more tests
# with arrays etc. that testing just -O0 or -O2 is insufficient, that is