Skip to content

SAVE_MESH_FILES missing from "default" Par_file — VTK mesh output silently disabled #1276

@AbolfazlKhanMo

Description

@AbolfazlKhanMo

Hi everyone,

I use SPECFEM2D both locally and on clusters. I noticed something very weird/interesting :-)
This test was done with the same SPECFEM2D build:

  • Version 8.1.0
  • GPU (CUDA) compiled
  • MPI (for simultaneous source runs) compiled

When running locally, regardless of the parameter SAVE_MODEL in the "main" Par_file (located in DATA/) and subsequent Par_file s (located in run####/DATA), the solver (xspecfem2d) generates .vtk files of the elastic properties (isotropic: Density, Vp, and Vs in my case) which could be used later for all sorts of post-processing techniques.

However, when running the same simulations on a cluster, the solver (xspecfem2d) does NOT generate the .vtk files of the elastic properties, even though everything, including the Par_file s, is the same. So I thought there might be some compatibility issues with how the cluster environment is set up. But when I dived deep into the source code, I noticed that the original/initial Par_file after cloning the repo, does NOT have a Boolean parameter/variable named SAVE_MESH_FILES that is read by the script specfem2d/src/shared/read_parameter_file.F90

If you look at the line 213 in this .F90 file, you can see the following:
call bcast_all_singlel(SAVE_MESH_FILES) where the default value is basically here
specfem2d/src/shared/shared_par.F90, where at line 323 we can see this logical :: SAVE_MESH_FILES = .false.

My cluster build was newer than my local build. The last commit by the package developers on the cluster build was for January 2026 (bb9cd02) and the last commit on the local build, again by the developers, goes back to June 2025 (785f9d9). But either way, the default Par_file does not (I just checked the Master branch) and did not (locally/remotely the *devel branch) have the parameter SAVE_MESH_FILES, and I think it should be added rather than defaulting to .false.

Thanks very much and bye for now,
Abolfazl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions