-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add GCD parallel implementation for macOS #1
Open
StarrMoonn
wants to merge
21
commits into
main
Choose a base branch
from
macos
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 删除了 VTI_SingleShotModeling 类中与波场存储模式相关的属性和方法 - 移除了 unit_test 目录下与波场存储模式相关的测试代码 - 优化了 forward_modeling_single_shot 方法,直接返回完整波场数据 - 简化了 test_SingleShotModeling.m 中的测试逻辑,专注于验证输出数据维度
- 将 compute_wave_propagation_gpu 方法重命名为 compute_wave_propagation_cpu3 - 更新 compute_wave_propagation 方法中的 case 语句,支持 'openMP' 选项 - 修改 compute_wave_propagation_cpu3 方法的注释,反映新的并行计算实现 - 删除与 GPU 计算相关的代码和注释
- 移除不必要的.DS_Store文件 - 更新 VTI_Adjoint.m 中的注释和路径设置 - 修改参数文件中 compute_mode 和 compute_kernel 的值 - 优化 run_create_reverse_gif.m 和 run_plot_adjoint_snapshots.m 脚本 - 新增 startup.m 文件以自动添加项目路径
- 在 VTI_Adjoint 中添加 current_forward_wavefield 属性,存储当前炮的正演波场 - 在 compute_residuals_single_shot 方法中保存正演波场 - 在 VTI_Gradient 中直接使用已计算好的正演波场,提高效率 - 新增 gradient_shot_1.mat 文件,用于存储梯度信息
- 在 compute_single_shot_gradient 函数中添加计时和日志输出 - 增加单炮梯度保存到磁盘的功能 - 优化梯度维度验证逻辑,确保所有分量维度一致 - 调整梯度维度输出格式,简化信息
- 移除了冗余的路径设置和文件保存操作 - 优化了错误处理机制,提高测试脚本的可读性和稳定性
- Introduced computeFourthOrderDiff.m for calculating spatial derivatives using fourth-order central differences, with special handling for boundaries. - Added computeGradientField.m to compute spatial derivatives using MATLAB's built-in gradient function, ensuring correct physical units. - Updated VTI_Gradient.m to utilize the new gradient computation methods, enhancing flexibility in gradient calculations. - Removed obsolete GPU computation files to streamline the project structure.
… configuration - Introduced compute_wave_propagation_optimized.cpp for enhanced wave propagation calculations using OpenMP for parallel processing. - Added .DS_Store files in the mex directory to manage macOS metadata. - Updated test_WaveFieldSolver.m to switch computation mode to 'openMP', reflecting the new parallel processing capabilities.
…p and update output formatting in VTI_WaveFieldSolver.m - Deleted compute_wave_propagation_optimized.cpp to streamline the codebase. - Updated output formatting in VTI_WaveFieldSolver.m to simplify the display of current time step and shot number. - Added .DS_Store files to track macOS metadata in the project directories.
- 重构了 FWI 测试流程,使用相对路径和 utils.load_json_params 加载参数 - 优化了梯度计算过程,采用直接累加单炮梯度的方法 - 添加了 BB 法默认参数设置,并允许自定义参数覆盖 - 在计算梯度时增加了错误捕获和内存清理机制 - 移除了不必要的梯度输出目录创建
- 新增单炮误差计算和保存功能 - 新增总误差读取功能 - 优化梯度计算流程,支持分炮计算和累加 - 调整目录创建逻辑,确保必要目录存在 - 简化误差计算,避免重复计算
- 新增 FWI 误差点和梯度计算结果 - 更新波场能量图 - 添加新的地震记录文件 - 修改现有地震记录文件
- 在 VTI_Adjoint.m 中添加 compute_residuals_all_shots 函数,用于计算所有炮的残差和二范数 - 修改 GradientDescentOptimizer.m 中的 compute_step_length 函数,使用新的残差计算方法 - 优化抛物线法步长计算过程,提高效率和准确性
…ory structure - Deleted misfit_shot_1.mat to misfit_shot_10.mat files as they are no longer needed. - Updated BaseOptimizer.m to include a new gradient_output_dir for better organization of output files. - Refactored directory creation logic to ensure all necessary output directories are created efficiently.
- 将 compute_wave_propagation 方法拆分为三个独立的函数 - 新增 compute_wave_propagation_cpu1、cpu2 和 cpu3 函数分别处理不同计算方式 - 优化了代码结构,提高了可读性和可维护性 - 修改GCD版本的并行同步机制,修正异步并行
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.