Skip to content

Commit f8696dd

Browse files
authored
Merge pull request #1815 from danielpeter/devel
updates azure tests; updates Mesh_Par_file reading (optional parameters); updates rhostore storage & usage
2 parents c172806 + efb8ea7 commit f8696dd

21 files changed

+282
-136
lines changed

.azure-pipelines.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
displayName: 'Run checks'
8585
8686
- job: compilation_default
87-
# ubuntu-latest: ubuntu-22.04 w/ GCC 11
87+
# ubuntu-latest: ubuntu-24.04 w/ GCC 13.3
8888
displayName: 'Compilation Default GCC'
8989
steps:
9090
- template: .azure-pipelines/install-template.yml
@@ -96,14 +96,14 @@ jobs:
9696
CUDA: false
9797
BUILD: true
9898

99-
- job: compilation_default_gcc9
100-
displayName: 'Compilation Default GCC 9'
99+
- job: compilation_default_gcc10
100+
displayName: 'Compilation Default GCC 10'
101101
pool:
102-
vmImage: 'ubuntu-20.04'
102+
vmImage: 'ubuntu-22.04'
103103
variables:
104-
CC: gcc-9
105-
CXX: g++-9
106-
FC: gfortran-9
104+
CC: gcc-10
105+
CXX: g++-10
106+
FC: gfortran-10
107107
steps:
108108
- template: .azure-pipelines/install-template.yml
109109
parameters:
@@ -114,14 +114,14 @@ jobs:
114114
CUDA: false
115115
BUILD: true
116116

117-
- job: compilation_default_gcc10
118-
displayName: 'Compilation Default GCC 10'
117+
- job: compilation_default_gcc11
118+
displayName: 'Compilation Default GCC 11'
119119
pool:
120-
vmImage: 'ubuntu-20.04'
120+
vmImage: 'ubuntu-22.04'
121121
variables:
122-
CC: gcc-10
123-
CXX: g++-10
124-
FC: gfortran-10
122+
CC: gcc-11
123+
CXX: g++-11
124+
FC: gfortran-11
125125
steps:
126126
- template: .azure-pipelines/install-template.yml
127127
parameters:
@@ -132,52 +132,52 @@ jobs:
132132
CUDA: false
133133
BUILD: true
134134

135-
- job: compilation_CUDA11_gcc9
136-
displayName: 'Compilation CUDA 11 GCC 9'
135+
- job: compilation_CUDA11_gcc10
136+
displayName: 'Compilation CUDA 11 GCC 10'
137137
pool:
138-
vmImage: 'ubuntu-20.04'
138+
vmImage: 'ubuntu-22.04'
139139
variables:
140-
CC: gcc-9
141-
CXX: g++-9
142-
FC: gfortran-9
140+
CC: gcc-10
141+
CXX: g++-10
142+
FC: gfortran-10
143143
steps:
144144
- template: .azure-pipelines/install-template.yml
145145
parameters:
146146
CUDA: true
147-
CUDA_V: '11.4'
147+
CUDA_V: '11.7'
148148
- template: .azure-pipelines/configure-template.yml
149149
parameters:
150-
TESTFLAGS: '--with-mpi --enable-vectorization --with-cuda=cuda10'
150+
TESTFLAGS: '--with-mpi --enable-vectorization --with-cuda=cuda11'
151151
CUDA: true
152152
BUILD: true
153153

154-
- job: compilation_CUDA11_gcc10
155-
displayName: 'Compilation CUDA 11 GCC 10'
154+
- job: compilation_CUDA11_gcc11
155+
displayName: 'Compilation CUDA 11 GCC 11'
156156
pool:
157-
vmImage: 'ubuntu-20.04'
157+
vmImage: 'ubuntu-22.04'
158158
variables:
159-
CC: gcc-10
160-
CXX: g++-10
161-
FC: gfortran-10
159+
CC: gcc-11
160+
CXX: g++-11
161+
FC: gfortran-11
162162
steps:
163163
- template: .azure-pipelines/install-template.yml
164164
parameters:
165165
CUDA: true
166-
CUDA_V: '11.4'
166+
CUDA_V: '11.7'
167167
- template: .azure-pipelines/configure-template.yml
168168
parameters:
169-
TESTFLAGS: '--with-mpi --enable-vectorization --with-cuda=cuda11'
169+
TESTFLAGS: '--with-mpi --enable-vectorization --with-cuda=cuda10'
170170
CUDA: true
171171
BUILD: true
172172

173173
- job: compilation_CUDA12
174-
displayName: 'Compilation CUDA 12 GCC 10'
174+
displayName: 'Compilation CUDA 12 GCC 12'
175175
pool:
176-
vmImage: 'ubuntu-20.04'
176+
vmImage: 'ubuntu-22.04'
177177
variables:
178-
CC: gcc-10
179-
CXX: g++-10
180-
FC: gfortran-10
178+
CC: gcc-12
179+
CXX: g++-12
180+
FC: gfortran-12
181181
steps:
182182
- template: .azure-pipelines/install-template.yml
183183
parameters:
@@ -195,7 +195,7 @@ jobs:
195195
- template: .azure-pipelines/install-template.yml
196196
parameters:
197197
CUDA: true
198-
CUDA_V: '12.1'
198+
CUDA_V: '12.9'
199199
- template: .azure-pipelines/configure-template.yml
200200
parameters:
201201
TESTFLAGS: '--with-mpi --enable-vectorization --with-cuda=cuda12'

.azure-pipelines/install-template.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
77
# ubuntu-20.04:
88
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
9-
# ubuntu-22.04 "ubuntu-latest":
9+
# ubuntu-22.04:
1010
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
11-
#
11+
# ubuntu-24.04: "ubuntu-latest"
1212
parameters:
1313
- name: CUDA
1414
type: boolean
@@ -118,35 +118,38 @@ steps:
118118
#UBUNTU_VERSION=ubuntu2004
119119
## distribution jammy: from ubuntu 22.04
120120
#UBUNTU_VERSION=ubuntu2204
121+
## distribution noble: from ubuntu 24.04
122+
#UBUNTU_VERSION=ubuntu2204
121123
122124
# default
123-
UBUNTU_VERSION=ubuntu2004
125+
UBUNTU_VERSION=ubuntu2204
124126
125127
# CUDA_VERSION - specifies CUDA toolkit version
126128
echo "CUDA version: $CUDA_V"
127129
# http://developer.download.nvidia.com/compute/cuda/repos/
128130
if [ "$CUDA_V" == "6.5" ]; then
129-
## trusty
130131
CUDA_VERSION=6.5-14
131132
elif [ "$CUDA_V" == "9.2" ]; then
132-
## xenial
133133
CUDA_VERSION=9.2.148-1
134134
elif [ "$CUDA_V" == "10.2" ]; then
135-
## bionic
136135
CUDA_VERSION=10.2.89-1
137136
elif [ "$CUDA_V" == "11.4" ]; then
138-
## focal
139137
CUDA_VERSION=11.4.0-1
138+
elif [ "$CUDA_V" == "11.7" ]; then
139+
CUDA_VERSION=11.7.0-1
140140
elif [ "$CUDA_V" == "12.1" ]; then
141-
## focal
142141
CUDA_VERSION=12.1.1-1
142+
elif [ "$CUDA_V" == "12.9" ]; then
143+
CUDA_VERSION=12.9.0-1
143144
else
144145
# note: - on azure VM nodes with ubuntu 18.04, default gcc version is 9.3;
145146
# needs at least CUDA version 10.x
146147
# - on azure VM nodes with ubuntu 20.04, default gcc version is 10.3;
147148
# needs at least CUDA version 11.x
148-
# - on azure VM nodes with ubuntu-latest (22.04), default gcc version is 11.3;
149+
# - on azure VM nodes with ubuntu 22.04, default gcc version is 11.3;
149150
# needs at least CUDA version 11.7
151+
# - on azure VM nodes with ubuntu 24.04 (ubuntu-latest), default gcc version is 13.3;
152+
# needs at least CUDA version ?
150153
CUDA_VERSION=12.1.1-1
151154
fi
152155
echo

src/generate_databases/model_tomography.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ subroutine tomo_read_next_line(unit_in,string_read)
762762
if (ier /= 0) stop 'error while reading tomography file'
763763

764764
! suppress leading white spaces, if any
765-
string_read = adjustl(string_read)
765+
string_read = trim(adjustl(string_read))
766766

767767
! suppress trailing carriage return (ASCII code 13) if any (e.g. if input text file coming from Windows/DOS)
768768
if (index(string_read,achar(13)) > 0) string_read = string_read(1:index(string_read,achar(13))-1)

src/generate_databases/model_vs30.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ subroutine read_next_line(unit_in,string_read)
215215
if (ier /= 0) stop 'Error while reading Vs30 interface file'
216216

217217
! suppress leading white spaces, if any
218-
string_read = adjustl(string_read)
218+
string_read = trim(adjustl(string_read))
219219

220220
! suppress trailing carriage return (ASCII code 13) if any (e.g. if input text file coming from Windows/DOS)
221221
if (index(string_read,achar(13)) > 0) string_read = string_read(1:index(string_read,achar(13))-1)

src/generate_databases/save_arrays_solver.F90

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,11 @@ subroutine save_arrays_solver_mesh()
143143
write(IOUT) gammazstore
144144
write(IOUT) jacobianstore
145145

146+
! these arrays are needed for acoustic and elastic simulations (and ..)
147+
! thus we allocate it and read it in all cases (whether the simulation is acoustic, elastic, or acoustic/elastic, ..)
146148
write(IOUT) kappastore
147149
write(IOUT) mustore
150+
write(IOUT) rhostore
148151

149152
write(IOUT) ispec_is_acoustic
150153
write(IOUT) ispec_is_elastic
@@ -159,10 +162,6 @@ subroutine save_arrays_solver_mesh()
159162
write(IOUT) rmass_acoustic
160163
endif
161164

162-
! this array is needed for acoustic simulations but also for elastic simulations with CPML,
163-
! thus we allocate it and read it in all cases (whether the simulation is acoustic, elastic, or acoustic/elastic)
164-
write(IOUT) rhostore
165-
166165
! elastic
167166
if (ELASTIC_SIMULATION) then
168167
write(IOUT) rmass

src/generate_databases/save_arrays_solver_hdf5.F90

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,11 @@ subroutine save_arrays_solver_mesh_hdf5()
394394

395395
dset_name = "kappastore" ! 4 r (/0,0,0,offset_nspec/)
396396
call h5_create_dataset_gen(dset_name,(/NGLLX,NGLLY,NGLLZ,sum(offset_nspec(:))/), 4, CUSTOM_REAL)
397-
dset_name = "mustore" ! 4 r (/0,0,0,offset_nspec/)
397+
dset_name = "mustore" ! 4 r (/0,0,0,offset_nspec/)
398398
call h5_create_dataset_gen(dset_name,(/NGLLX,NGLLY,NGLLZ,sum(offset_nspec(:))/), 4, CUSTOM_REAL)
399+
dset_name = "rhostore" ! 4 r (/0,0,0,offset_nspec/)
400+
call h5_create_dataset_gen(dset_name,(/NGLLX,NGLLY,NGLLZ,sum(offset_nspec(:))/), 4, CUSTOM_REAL)
401+
399402
dset_name = "ispec_is_acoustic" ! 1 l (/0,0,0,offset_nspec/)
400403
call h5_create_dataset_gen(dset_name,(/sum(offset_nspec(:))/), 1, 0)
401404
dset_name = "ispec_is_elastic" ! 1 l (/0,0,0,offset_nspec/)
@@ -409,11 +412,6 @@ subroutine save_arrays_solver_mesh_hdf5()
409412
call h5_create_dataset_gen(dset_name,(/sum(offset_nglob(:))/), 1, CUSTOM_REAL)
410413
endif
411414

412-
! this array is needed for acoustic simulations but also for elastic simulations with CPML,
413-
! thus we allocate it and read it in all cases (whether the simulation is acoustic, elastic, or acoustic/elastic)
414-
dset_name = "rhostore" ! 4 r (/0,0,0,offset_nspec/)
415-
call h5_create_dataset_gen(dset_name,(/NGLLX,NGLLY,NGLLZ,sum(offset_nspec(:))/), 4, CUSTOM_REAL)
416-
417415
! elastic
418416
if (ELASTIC_SIMULATION) then
419417
dset_name = "rmass" ! 1 r (/offset_nglob/)
@@ -940,10 +938,14 @@ subroutine save_arrays_solver_mesh_hdf5()
940938
call h5_write_dataset_collect_hyperslab(dset_name,gammazstore,(/0,0,0,sum(offset_nspec_irregular(0:myrank-1))/),H5_COL)
941939
dset_name = "jacobianstore" ! 4 r (/0,0,0,offset_nspec_irregular = offset_nspec/)
942940
call h5_write_dataset_collect_hyperslab(dset_name,jacobianstore,(/0,0,0,sum(offset_nspec_irregular(0:myrank-1))/),H5_COL)
941+
943942
dset_name = "kappastore" ! 4 r (/0,0,0,offset_nspec/)
944943
call h5_write_dataset_collect_hyperslab(dset_name,kappastore,(/0,0,0,sum(offset_nspec(0:myrank-1))/),H5_COL)
945944
dset_name = "mustore" ! 4 r (/0,0,0,offset_nspec/)
946945
call h5_write_dataset_collect_hyperslab(dset_name,mustore,(/0,0,0,sum(offset_nspec(0:myrank-1))/),H5_COL)
946+
dset_name = "rhostore" ! 4 r (/0,0,0,offset_nspec/)
947+
call h5_write_dataset_collect_hyperslab(dset_name, rhostore, (/0,0,0,sum(offset_nspec(0:myrank-1))/),H5_COL)
948+
947949
dset_name = "ispec_is_acoustic" ! 1 l (/0,0,0,offset_nspec/)
948950
call h5_write_dataset_collect_hyperslab(dset_name, ispec_is_acoustic, (/sum(offset_nspec(0:myrank-1))/),H5_COL)
949951
dset_name = "ispec_is_elastic" ! 1 l (/0,0,0,offset_nspec/)
@@ -957,11 +959,6 @@ subroutine save_arrays_solver_mesh_hdf5()
957959
call h5_write_dataset_collect_hyperslab(dset_name, rmass_acoustic,(/sum(offset_nglob(0:myrank-1))/),H5_COL)
958960
endif
959961

960-
! this array is needed for acoustic simulations but also for elastic simulations with CPML,
961-
! thus we allocate it and read it in all cases (whether the simulation is acoustic, elastic, or acoustic/elastic)
962-
dset_name = "rhostore" ! 4 r (/0,0,0,offset_nspec/)
963-
call h5_write_dataset_collect_hyperslab(dset_name, rhostore, (/0,0,0,sum(offset_nspec(0:myrank-1))/),H5_COL)
964-
965962
! elastic
966963
if (ELASTIC_SIMULATION) then
967964
dset_name = "rmass" ! 1 r (/offset_nglob/)

src/generate_databases/setup_color_perm.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,12 @@ subroutine setup_permutation(myrank,nspec,nglob,ibool,ANISOTROPY,perm,SAVE_MESH_
631631

632632
call permute_elements_real(kappastore,temp_array_real,perm,nspec)
633633
call permute_elements_real(mustore,temp_array_real,perm,nspec)
634+
call permute_elements_real(rhostore,temp_array_real,perm,nspec)
634635

635636
if (ATTENUATION) then
636637
call permute_elements_real(qmu_attenuation_store,temp_array_real,perm,nspec)
637638
call permute_elements_real(qkappa_attenuation_store,temp_array_real,perm,nspec)
638639
endif
639-
call permute_elements_real(rhostore,temp_array_real,perm,nspec)
640640

641641
! elastic arrays
642642
if (ELASTIC_SIMULATION) then

src/meshfem3D/meshfem3D_par.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ module meshfem_par
9090

9191
! CPML
9292
double precision :: THICKNESS_OF_X_PML,THICKNESS_OF_Y_PML,THICKNESS_OF_Z_PML
93-
logical :: ADD_PML_AS_EXTRA_MESH_LAYERS
94-
integer :: NUMBER_OF_PML_LAYERS_TO_ADD
93+
logical :: ADD_PML_AS_EXTRA_MESH_LAYERS = .false. ! for mesh extension with PML layers
94+
integer :: NUMBER_OF_PML_LAYERS_TO_ADD = 0
9595
logical, dimension(:), allocatable :: is_CPML
9696
integer, dimension(:), allocatable :: CPML_to_spec,CPML_regions
9797
integer :: nspec_CPML

src/meshfem3D/read_mesh_parameter_file.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,13 @@ subroutine read_mesh_parameter_file()
197197
if (THICKNESS_OF_Y_PML < 0.0) stop 'Error invalid negative value THICKNESS_OF_Y_PML'
198198
if (THICKNESS_OF_Z_PML < 0.0) stop 'Error invalid negative value THICKNESS_OF_Z_PML'
199199

200-
! add PML as extra mesh layers
201-
call read_value_logical_mesh(IIN,IGNORE_JUNK,ADD_PML_AS_EXTRA_MESH_LAYERS, 'ADD_PML_AS_EXTRA_MESH_LAYERS', ier)
202-
if (ier /= 0) stop 'Error reading Mesh parameter ADD_PML_AS_EXTRA_MESH_LAYERS'
203-
204-
! number of PML layers added as extra outer layers
205-
call read_value_integer_mesh(IIN,IGNORE_JUNK,NUMBER_OF_PML_LAYERS_TO_ADD, 'NUMBER_OF_PML_LAYERS_TO_ADD', ier)
206-
if (ier /= 0) stop 'Error reading Mesh parameter NUMBER_OF_PML_LAYERS_TO_ADD'
200+
! PML mesh extension
201+
! (optional) add PML as extra mesh layers
202+
call read_value_logical_mesh_optional(IIN,ADD_PML_AS_EXTRA_MESH_LAYERS, 'ADD_PML_AS_EXTRA_MESH_LAYERS', ier)
203+
if (ier /= 0) stop 'Error reading (optional) Mesh parameter ADD_PML_AS_EXTRA_MESH_LAYERS'
204+
! (optional) number of PML layers added as extra outer layers
205+
call read_value_integer_mesh_optional(IIN,NUMBER_OF_PML_LAYERS_TO_ADD, 'NUMBER_OF_PML_LAYERS_TO_ADD', ier)
206+
if (ier /= 0) stop 'Error reading (optional) Mesh parameter NUMBER_OF_PML_LAYERS_TO_ADD'
207207

208208
! user output
209209
if (myrank == 0) then

0 commit comments

Comments
 (0)