### Install GeoCubit using setup.py Source: https://github.com/specfem/specfem3d/blob/master/CUBIT_GEOCUBIT/README.md Install GeoCubit by running the setup script. Alternatively, you can add the GeoCubit directory to your PYTHONPATH and PATH. ```bash python setup.py install ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Change the working directory to the Gmsh_simple_box_hex27 example folder and list its contents. ```python %cd /content/specfem3d %cd EXAMPLES/applications/Gmsh_simple_box_hex27 ! ls -al ! ls -al ./bin ``` -------------------------------- ### Install and Run SPECFEM3D Source: https://github.com/specfem/specfem3d/blob/master/README.md Commands to configure, compile, and run a default example of SPECFEM3D. Ensure you have Fortran and C compilers available. ```bash ./configure FC=gfortran CC=gcc make all ./run_this_example.sh ``` -------------------------------- ### Build and Install Git from Source Source: https://github.com/specfem/specfem3d/wiki/Using-Git-for-SPECFEM Commands to download, compile, and install a recent version of Git. ```bash $ cd $HOME $ mkdir bin/git src $ cd src $ git clone git://git.kernel.org/pub/scm/git/git.git $ sudo apt-get remove git-core $ cd git $ make prefix=/usr/local all $ sudo make install prefix=/usr/local ``` -------------------------------- ### Run SPECFEM3D Noise Tomography Example Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/09_noise_simulations Execute the pre-processing script for the noise tomography example. This script is designed for a specific workstation setup but outlines a universal procedure. ```bash ./pre-processing.sh ``` -------------------------------- ### Configure and Run Example Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Modify the Par_file to set the simulation steps and disable GPU mode, then execute the example script. ```python ! sed -i "s:^NSTEP .*:NSTEP = 500:" DATA/Par_file ! sed -i "s:^GPU_MODE .*:GPU_MODE = .false.:" DATA/Par_file ! ./run_this_example.sh ``` -------------------------------- ### Configure Command Example Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/C_troubleshooting Example of specifying Fortran compiler and MPI wrapper during configuration to resolve compiler mixing issues. Ensure these paths are correct for your system. ```bash > ./configure FC=gfortran MPIF90=/usr/local/openmpi-gfortran/bin/mpif90 ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Change the current working directory to the specific Gmsh example folder within the SPECFEM3D project. ```python %cd /content/specfem3d %cd EXAMPLES/applications/Gmsh_simple_box_hex27 ! ls -al ``` -------------------------------- ### Install Matlab GUI Source: https://github.com/specfem/specfem3d/blob/master/external_libs/README_how_to_use_hybrid_specfem_axisem.txt Run the installation script within the Matlab environment. ```matlab INSTALL_MATLAB_GUI_FOR_SPECFEM ``` -------------------------------- ### Install Doxygen and Graphviz Source: https://github.com/specfem/specfem3d/blob/master/doc/call_trees_of_the_source_code/README.txt Commands to install the required documentation generation tools on Linux systems. ```bash sudo apt-get install doxygen ``` ```bash sudo apt-get install graphviz ``` -------------------------------- ### Configure and Run Simulation Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Update the Par_file to set NSTEP to 2000 and enable GPU_MODE, then execute the example script. ```python ! sed -i "s:^NSTEP .*:NSTEP = 2000:" DATA/Par_file ! sed -i "s:^GPU_MODE .*:GPU_MODE = .true.:" DATA/Par_file ! ./run_this_example.sh ``` -------------------------------- ### Push Local Changes to Examples Directory Source: https://github.com/specfem/specfem3d/wiki/Advanced-Git-Topics This alias is specifically for pushing committed local changes to the 'examples' directory on GitHub. ```bash alias gitpushexamples "git push origin master" ``` -------------------------------- ### Install Git Dependencies Source: https://github.com/specfem/specfem3d/wiki/Using-Git-for-SPECFEM Install necessary development libraries for building Git from source on various Linux distributions. ```bash sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel ``` ```bash sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev ssh expat zlib1g zlib1g-dev tk python ``` -------------------------------- ### Basic Meshing Script with Cubit Source: https://github.com/specfem/specfem3d/blob/master/CUBIT_GEOCUBIT/README.md A simple 'hello world' example demonstrating how to initialize Cubit and create a basic mesh. This script uses the `cubit` library to execute commands. ```python import cubit cubit.init([""]) cubit.cmd('brick x 10') cubit.cmd('mesh vol all') ``` -------------------------------- ### Locate build tools Source: https://github.com/specfem/specfem3d/blob/master/external_libs/scotch_5.1.12b/INSTALL.txt Use the which command to find the installation path of make, lex, and yacc. ```bash which make ``` ```bash which lex which yacc ``` -------------------------------- ### Configure SPECFEM3D for Eiger Source: https://github.com/specfem/specfem3d/blob/master/utils/infos/readme_cuda_cscs.txt Example ./configure commands for the Eiger cluster. ```bash ./configure --with-cuda FC=mpif90 MPIFC=mpif90 CUDA_LIB=-L/apps/eiger/Cuda-4.0/cuda/lib64 MPI_INC=-I/apps/eiger/mvapich2/1.5.1p1/mvapich2-gnu/include ``` ```bash ./configure --with-cuda FC=mpif90 MPIFC=mpif90 FLAGS_CHECK="-O3 -ffree-line-length-none -fopenmp" FLAGS_NO_CHECK="-Ofast -mfpmath=sse -funroll-loops -ffree-line-length-none -fopenmp" CUDA_LIB=-L/apps/eiger/Cuda-4.0/cuda/lib64 MPI_INC=-I/apps/eiger/mvapich2/1.5.1p1/mvapich2-gnu/include ``` ```bash ./configure --with-cuda FC=mpif90 MPIFC=mpif90 FLAGS_CHECK="`echo $ICC_CHECK`" FLAGS_NO_CHECK='`echo $ICC_FCFLAGS`' CUDA_LIB=-L/apps/eiger/Cuda-4.0/cuda/lib64 MPI_INC=-I/apps/eiger/mvapich2/1.5.1p1/mvapich2-gnu/include ``` -------------------------------- ### Configure SPECFEM3D with CUDA Source: https://github.com/specfem/specfem3d/blob/master/utils/infos/Cray_compiler_information/Daniel_Peter_here_is_how_to_configure_SPECFEM3D_on_Piz_Daint_jan2017.txt Example configuration command for building with CUDA support on a Cray system. ```bash MPI_INC="${CRAY_MPICH2_DIR}/include" ./configure \ --with-cuda=cuda5 CUDA_INC="$CUDA_INC" CUDA_LIB="$CUDA_LIB" MPI_INC="$MPI_INC" \ MPIFC=$mpif90 MPICC=$mpicc FC=$f90 CC=$cc CXX=$cc FLAGS_CHECK="$flags" CFLAGS="$cflags" ``` -------------------------------- ### Configure with ADIOS Support Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/02_getting_started Enable ADIOS library support for parallel I/O during configuration. Ensure ADIOS is installed and its environment variables are set. ```bash ./configure --with-adios .. ``` -------------------------------- ### Example Solver Timestamp File Content Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/05_running_the_solver Monitor simulation progress and performance using timestamp files. These files provide information on the current time step, elapsed time, and maximum displacement. ```plaintext Time step # 10000 Time: 108.4890 seconds Elapsed time in seconds = 1153.28696703911 Elapsed time in hh:mm:ss = 0 h 19 m 13 s Mean elapsed time per time step in seconds = 0.115328696703911 Max norm displacement vector U in all slices (m) = 1.0789589E-02 ``` -------------------------------- ### Locate Compilers Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Verify the installation paths for GCC, GFortran, and NVCC. ```python ! which gcc ! which gfortran ! which nvcc ``` -------------------------------- ### Check GNU Make version Source: https://github.com/specfem/specfem3d/blob/master/external_libs/scotch_5.1.12b/INSTALL.txt Verify that GNU Make is installed and accessible in the system path. ```bash make --version ``` -------------------------------- ### Setup Tracking Branch Source: https://github.com/specfem/specfem3d/wiki/Advanced-Git-Topics Creates a local tracking branch for the remote devel branch. ```bash $ git checkout --track origin/devel ``` -------------------------------- ### Configure SPECFEM3D for Cray Source: https://github.com/specfem/specfem3d/blob/master/utils/infos/Cray_compiler_information/here_are_more_details_on_how_to_successfully_configure_the_code_on_CRAY_machines.txt Example configuration script using specific compiler flags and paths for Cray systems. ```bash mpif90=ftn mpicc=cc f90=ftn cc=cc # run flags #flags="-eF -em -rm" #cflags="-h list=m" ## memory > 2GB #flags="-eF -em -rm -O3,fp3 -hpic -dynamic" #cflags="-h list=m -hpic -dynamic" # debug flags flags="-g -Rb -eF -rm -eC -eD" # -hfp2" cflags="-g -h list=m" ### ### CUDA ### CUDA_INC="${CRAY_CUDATOOLKIT_DIR}/include" CUDA_LIB="${CRAY_CUDATOOLKIT_DIR}/lib64" ### ### mpi.h / mpif.h ### MPI_INC="${CRAY_MPICH2_DIR}/include" ./configure \ --with-cuda=cuda5 CUDA_INC="$CUDA_INC" CUDA_LIB="$CUDA_LIB" MPI_INC="$MPI_INC" \ MPIFC=$mpif90 MPICC=$mpicc FC=$f90 CC=$cc CXX=$cc FLAGS_CHECK="$flags" CFLAGS="$cflags" ``` -------------------------------- ### Get Initial Copy of the Code Source: https://github.com/specfem/specfem3d/wiki/Advanced-Git-Topics Run this command once to obtain the initial copy of the SPECFEM3D codebase after creating a fork on your GitHub page. ```bash getinitialcopyofthecode ``` -------------------------------- ### MPI Initialization and Barrier Check Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/C_troubleshooting A basic Fortran program to verify a working MPI installation. Ensure you can compile and run this to confirm MPI is set up correctly before configuring SPECFEM3D. ```Fortran program main include 'mpif.h' integer, parameter :: CUSTOM_MPI_TYPE = MPI_REAL integer ier call MPI_INIT(ier) call MPI_BARRIER(MPI_COMM_WORLD,ier) call MPI_FINALIZE(ier) end ``` -------------------------------- ### Install Trelis for Python 2.6 on MacOSX Source: https://github.com/specfem/specfem3d/blob/master/CUBIT_GEOCUBIT/README.md Install Trelis using `setup.py` for a specific Python version (2.6) and installation path on MacOSX. This is relevant for older Trelis versions. ```bash python2.6 setup.py install --install-lib=/Library/Python/2.6/site-packages/ ``` -------------------------------- ### Install GeoCubit for Python 2.5 on MacOSX Source: https://github.com/specfem/specfem3d/blob/master/CUBIT_GEOCUBIT/README.md Install GeoCubit using `setup.py` for a specific Python version (2.5) and installation path on MacOSX. This is relevant for older Trelis versions. ```bash python2.5 setup.py install --install-lib=/Library/Python/2.5/site-packages/ ``` -------------------------------- ### Copy Input Files for Figure 4 Example Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/reproducible_study/seismoacoustic_bishop2022/README.md Copy the input data files for the Figure 4 example (planar halfspace) into the SPECFEM3D/DATA/ directory. Replace DATA_FIG4 with DATA_FIG8 to use the topography example. ```bash cp -r EXAMPLES/reproducible_study/seismoacoustic_bishop2022/DATA_FIG4/ DATA ``` -------------------------------- ### Load Environment and Configure Source: https://github.com/specfem/specfem3d/blob/master/utils/infos/Cray_compiler_information/Daniel_Peter_here_is_how_to_configure_SPECFEM3D_on_Piz_Daint_jan2017.txt Standard module loading and configuration command for Piz Daint. ```bash module load daint-gpu ./configure FC=ftn MPIFC=ftn CC=cc CXX=CC ``` -------------------------------- ### Launch Matlab GUI Source: https://github.com/specfem/specfem3d/blob/master/external_libs/README_how_to_use_hybrid_specfem_axisem.txt Initialize the hybrid GUI tools in Matlab. ```matlab Hybrid_Axisem_Specfem ``` -------------------------------- ### Install VTK in Blender Python Source: https://github.com/specfem/specfem3d/blob/master/utils/Visualization/Blender/python_blender/README.md Install the required VTK package directly into the Python environment bundled with Blender. ```bash /Applications/Blender.app/Contents/Resources/3.6/python/bin/python3.10 -m ensurepip /Applications/Blender.app/Contents/Resources/3.6/python/bin/python3.10 -m pip install vtk==9.2.6 ``` -------------------------------- ### CMake Project Configuration for sep_topo Source: https://github.com/specfem/specfem3d/blob/master/utils/small_utilities/bathy_sep_to_ascii/CMakeLists.txt Initializes the project, checks for C compiler flags, and sets up build directories and source files. ```cmake cmake_minimum_required (VERSION 2.6) ### Project Configuration project(sep_topo) include(CheckCCompilerFlag) check_c_compiler_flag(-std=gnu99 HAS_STD_GNU99) if(HAS_STD_GNU99) add_definitions(-std=gnu99) endif() file(MAKE_DIRECTORY ./bin) set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE}) include_directories( ./inc ) set(sources src/sep_header.c src/convert_topo.c src/parse_sep.c) add_executable( create_ascii_bathy_from_sep_vs src/create_ascii_bathy_from_sep_vs.c ${sources} ) ``` -------------------------------- ### Example Seismogram Filenames Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/B_channel_codes Examples of generated seismogram filenames based on different sampling rates defined in the parameter file. ```text AZ.ASBS.MXZ.semd.sac ``` ```text AZ.ASBS.BXZ.semd.sac ``` -------------------------------- ### Configure SCOTCH with Custom Directory Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/02_getting_started Use this command to configure the build process when SCOTCH libraries are installed in a non-standard location. Specify the path to your SCOTCH installation using the --with-scotch-dir option. ```bash ./configure FC=ifort MPIFC=mpif90 --with-scotch-dir=/opt/scotch ``` -------------------------------- ### Navigate and List Repository Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Change the working directory to the cloned repository and list its contents. ```python %cd /content/specfem3d ! ls -al ``` -------------------------------- ### Run Adjoint Simulation Source: https://context7.com/specfem/specfem3d/llms.txt Steps for performing adjoint simulations, including forward simulation, adjoint source preparation, and adjoint solver execution. ```bash # Step 1: Run forward simulation and record seismograms # Set in DATA/Par_file: SIMULATION_TYPE = 1 SAVE_FORWARD = .false. mpirun -np 4 ./bin/xspecfem3D # Step 2: Prepare adjoint sources from recorded seismograms # Create SEM/ directory with adjoint source files mkdir SEM # Format: NETWORK.STATION.COMPONENT.adj (same format as seismograms) # Time-reversal is done internally - provide forward-time adjoint sources # Step 3: Create STATIONS_ADJOINT file cp DATA/STATIONS DATA/STATIONS_ADJOINT # Step 4: Run adjoint simulation # Modify DATA/Par_file: SIMULATION_TYPE = 2 SAVE_FORWARD = .false. ``` -------------------------------- ### Mesh Skewness Histogram Example Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/C_troubleshooting This output shows a histogram of element skewness values, indicating mesh quality. Lower skewness values (closer to 0) represent better quality elements. This example highlights that 81.8% of elements are well-formed. ```text ... histogram of skewness (0. good - 1. bad): 0.0000000E+00 - 5.0000001E-02 27648 81.81818 % 5.0000001E-02 - 0.1000000 0 0.0000000E+00 % ... ``` -------------------------------- ### Locate MPI Tools Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Verify the installation paths for MPI wrappers. ```python ! which mpif90 ! which mpirun ``` -------------------------------- ### Check Compiler Versions Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Display version information for the installed compilers. ```python ! gcc --version ! gfortran --version ! nvcc --version ``` -------------------------------- ### Configure with GPU Support (CUDA/HIP) Source: https://context7.com/specfem/specfem3d/llms.txt Enable GPU acceleration during configuration. Specify the CUDA or HIP version and target architecture. Compile with 'make all' after configuration. ```bash # Configure with CUDA support for specific GPU architectures # cuda5 = Kepler (K20), cuda6 = Kepler (K80), cuda8 = Pascal (P100) # cuda9 = Volta (V100), cuda10 = Turing (RTX 2080), cuda11 = Ampere (A100) ./configure --with-cuda=cuda11 FC=gfortran CC=gcc MPIFC=mpif90 --with-mpi # Configure with HIP support for AMD GPUs # MI8, MI25, MI50, MI100, MI250 specify target architectures ./configure --with-hip=MI250 FC=gfortran CC=gcc MPIFC=mpif90 --with-mpi \ HIP_FLAGS="-fPIC -ftemplate-depth-2048 -fno-gpu-rdc -std=c++17 -O2" # Compile with GPU support make all ``` -------------------------------- ### Module definition formatting Source: https://github.com/specfem/specfem3d/wiki/Best-Practices Module definitions should start at the beginning of the line. ```fortran module my_par integer :: count end module ``` ```fortran module my_par integer :: count end module ``` -------------------------------- ### Step 1: Generate Wavefields Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/09_noise_simulations Configure simulation for generating initial wavefields. Set SIMULATION_TYPE to 1 and NOISE_TOMOGRAPHY to 1. ```bash SIMULATION_TYPE = 1 NOISE_TOMOGRAPHY = 1 SAVE_FORWARD (not used, can be either .true. or .false.) ``` -------------------------------- ### Configure SPECFEM3D for Todi Source: https://github.com/specfem/specfem3d/blob/master/utils/infos/readme_cuda_cscs.txt Build configuration commands for different compiler environments on Todi. ```bash # Cray configure ./configure --with-cuda CC=cc FC=ftn MPIFC=ftn MPICC=cc FLAGS_CHECK="`echo $CRAY_CHECK`" FLAGS_NO_CHECK='`echo $CRAY_FCFLAGS`' CUDA_LIB=-L$CUDA_HOME/lib64 MPI_INC=-I$MPICH_DIR/include # GNU configure ./configure --with-cuda CC=cc FC=ftn MPIFC=ftn MPICC=cc FLAGS_CHECK="`echo $GNU_CHECK`" FLAGS_NO_CHECK='`echo $GNU_FCFLAGS`' CUDA_LIB=-L$CUDA_HOME/lib64 MPI_INC=-I$MPICH_DIR/include # Intel convifugre ./configure --with-cuda CC=cc FC=ftn MPIFC=ftn MPICC=cc FLAGS_CHECK="`echo $ICC_CHECK`" FLAGS_NO_CHECK='`echo $ICC_FCFLAGS`' CUDA_LIB=-L$CUDA_HOME/lib64 MPI_INC=-I$MPICH_DIR/include ./configure CC=cc FC=ftn MPIFC=ftn MPICC=cc FLAGS_CHECK="`echo $CRAY_CHECK`" FLAGS_NO_CHECK='`echo $CRAY_FCFLAGS`' MPI_INC=-I$MPICH_DIR/include ``` -------------------------------- ### Subroutine indentation Source: https://github.com/specfem/specfem3d/wiki/Best-Practices Start subroutines with an indent, except for module definitions. ```fortran subroutine scotch_partitioning() implicit none .. ``` ```fortran subroutine scotch_partitioning implicit none .. ``` -------------------------------- ### Check MPI Versions Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Display version information for the installed MPI tools. ```python ! mpif90 --version ! mpirun --version ``` -------------------------------- ### Configure Makefile.inc Source: https://github.com/specfem/specfem3d/blob/master/external_libs/scotch_5.1.12b/INSTALL.txt Create the required Makefile.inc file in the src directory using either a symbolic link or a direct copy. ```bash ln -s Make.inc/Makefile.inc.xxxx_xxx_xxx Makefile.inc ``` ```bash cp Make.inc/Makefile.inc.xxxx_xxx_xxx Makefile.inc ``` -------------------------------- ### Run xcreate_movie_shakemap_AVS_DX_GMT Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/11_graphics Execute the compiled utility to generate visualization files from SPECFEM3D's binary movie and shakemap output. The program will prompt for necessary input parameters. ```bash xcreate_movie_shakemap_AVS_DX_GMT ``` -------------------------------- ### Compile and Execute SPECFEM3D Demo Codes Source: https://github.com/specfem/specfem3d/blob/master/utils/small_SEM_solvers_in_Fortran_and_C_without_MPI_to_learn/README_HOWTO_use_these_demo_codes.txt Commands to navigate directories, configure build settings, and execute the mesher and solver binaries. ```shell 1/ cd mesher_for_serial 2/ edit the Makefile if needed to change the compiler or compiler options 3/ make clean ; make all 4/ ./xmeshfem3D 5/ cd .. 6/ edit make_all_Fortran.csh and make_all_C.csh if needed to change the compiler or compiler options 7/ ./make_all_Fortran.csh 8/ ./make_all_C.csh 9/ ./xspecfem3D_F90_normal 10/ ./xspecfem3D_F90_faster 11/ ./xspecfem3D_C ``` -------------------------------- ### Enable Screen Output for Solver Messages Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/05_running_the_solver Uncomment the IMAIN parameter in setup/constants.h to redirect solver messages from files to the standard output (screen). ```fortran ! uncomment this to write messages to the screen ! integer, parameter :: IMAIN = ISTANDARD_OUTPUT ``` -------------------------------- ### Run xdecompose_mesh Source: https://github.com/specfem/specfem3d/wiki/USER_MANUAL/03_mesh_generation Synopsis for executing the mesh partitioner, which requires the number of partitions and input/output directories. ```bash ./bin/xdecompose_mesh nparts input_directory output_directory ``` -------------------------------- ### Define ADIOS integer scalar subroutine Source: https://github.com/specfem/specfem3d/wiki/Best-Practices Example signature for defining an ADIOS integer scalar. ```fortran subroutine define_adios_integer_scalar(adios_group, group_size_inc, path, name, var) .. ``` -------------------------------- ### Clone and Configure Repository Source: https://github.com/specfem/specfem3d/wiki/Using-Git-for-SPECFEM Commands to clone a repository, switch to the development branch, and apply the configuration script. ```bash $ git clone SPECFEM/specfem3d ``` ```bash $ cd specfem3d $ git checkout -b devel origin/devel ``` ```bash $ config_repo your_github_name ``` -------------------------------- ### SPECFEM3D configuration output Source: https://github.com/specfem/specfem3d/blob/master/EXAMPLES/notebooks/specfem3d-colab-example.ipynb Sample output generated by the configure script during the environment setup process. ```text ## ---------------------------- ## ## setting up compilation flags ## ## ---------------------------- ## checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for gfortran... gfortran checking whether the Fortran compiler works... yes checking for Fortran compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU Fortran... yes checking whether gfortran accepts -g... yes configure: running /bin/bash ./flags.guess checking how to get verbose linking output from gfortran... -v checking for Fortran libraries of gfortran... -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/local/cuda/lib64/stubs -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. -lgfortran -lm -lquadmath checking for gcc... gcc checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking for dummy main to link with Fortran libraries... none checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore checking for Fortran flag to compile .f90 files... none checking for Fortran flag needed to accept free-form source... none checking for Fortran flag to compile preprocessed .F files... none checking how to define symbols for preprocessed Fortran... -D checking for Fortran flag to compile preprocessed .F90 files... none checking for gcc... (cached) gcc checking whether the compiler supports GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to enable C11 features... (cached) none needed ## ------ ## ## SCOTCH ## ## ------ ## ``` -------------------------------- ### Check Git Version Source: https://github.com/specfem/specfem3d/wiki/Using-Git-for-SPECFEM Verify the installed version of Git to ensure it meets the minimum requirement of 1.8. ```bash $ git --version ``` -------------------------------- ### Configure with ADIOS/HDF5 for Large-Scale I/O Source: https://context7.com/specfem/specfem3d/llms.txt Enable parallel I/O libraries like ADIOS or HDF5 for large simulations. Configure with the appropriate flags and paths. SCOTCH can be used for mesh partitioning. ```bash # Configure with ADIOS support ./configure --with-adios FC=ifort CC=icc MPIFC=mpif90 --with-mpi # Configure with HDF5 support ./configure --with-hdf5 HDF5_INC="/opt/homebrew/include" \ HDF5_LIBS="-L/opt/homebrew/lib" FC=gfortran CC=gcc MPIFC=mpif90 --with-mpi # With SCOTCH mesh partitioning library ./configure FC=ifort MPIFC=mpif90 CC=icc --with-scotch-dir=/opt/scotch ``` -------------------------------- ### Render Visualization with Blender Source: https://github.com/specfem/specfem3d/blob/master/utils/Visualization/Blender/python_blender/README.md Execute the rendering script with the specified VTK input file. ```bash ./plot_with_blender.py --vtk_file=OUTPUT_FILES/AVS_shaking_map.inp ``` -------------------------------- ### Linker Error Log Source: https://github.com/specfem/specfem3d/blob/master/utils/infos/Cray_compiler_information/here_are_more_details_on_how_to_successfully_configure_the_code_on_CRAY_machines.txt Example of a configuration log showing multiple definition errors during the linking phase on a Cray system. ```text /opt/cray/pe/cce/8.5.5/craylibs/x86-64/pkgconfig/..//libtcmalloc_minimal.a(tcmalloc.o):(.bss+0x13): multiple definition of `FLAG__namespace_do_not_use_directly_use_DECLARE_bool_instead::FLAGS_tcmalloc_abort_on_large_alloc' /opt/cray/pe/cce/8.5.5/craylibs/x86-64/pkgconfig/..//libtcmalloc_minimal.a(tcmalloc.o):(.bss+0x13): first defined here /opt/cray/pe/cce/8.5.5/craylibs/x86-64/pkgconfig/..//libtcmalloc_minimal.a(tcmalloc.o): In function `TCMallocImplementation::GetAllocatedSize(void*)': tcmalloc.cc:(.text+0x1f0): multiple definition of `TCMallocImplementation::GetAllocatedSize(void*)' /opt/cray/pe/cce/8.5.5/craylibs/x86-64/pkgconfig/..//libtcmalloc_minimal.a(tcmalloc.o):tcmalloc.cc:(.text+0x1f0): first defined here /opt/cray/pe/cce/8.5.5/craylibs/x86-64/pkgconfig/..//libtcmalloc_minimal.a(tcmalloc.o): In function `TCMallocImplementation::MarkThreadBusy()': tcmalloc.cc:(.text+0xb00): multiple definition of `TCMallocImplementation::MarkThreadBusy()' /opt/cray/pe/cce/8.5.5/craylibs/x86-64/pkgconfig/..//libtcmalloc_minimal.a(tcmalloc.o):tcmalloc.cc:(.text+0xb00): first defined here ``` ```text configure:4111: checking for dummy main to link with Fortran libraries configure:4145: cc -o conftest -g -O2 conftest.c -L/opt/cray/cce/8.4.1/CC/x8 6-64/lib/x86-64 -L/opt/gcc/4.8.1/snos/lib64 /opt/cray/cce/8.4.1/craylibs/x86-64/ libmodules.a /opt/cray/cce/8.4.1/craylibs/x86-64/libomp.a /opt/cray/cce/8.4.1/cr aylibs/x86-64/libopenacc.a -L/opt/cray/dmapp/default/lib64 -L/opt/cray/mpt/7.2.6 /gni/mpich-cray/8.3/lib -L/opt/cray/libsci/13.2.0/CRAY/8.3/x86_64/lib -L/opt/cra y/rca/1.0.0-2.0502.57212.2.56.ari/lib64 -L/opt/cray/alps/5.2.3-2.0502.9295.14.14 .ari/lib64 -L/opt/cray/xpmem/0.1-2.0502.57015.1.15.ari/lib64 -L/opt/cray/dmapp/7 .0.1-1.0502.10246.8.47.ari/lib64 -L/opt/cray/pmi/5.0.7-1.0000.10678.155.25.ari/l ib64 -L/opt/cray/ugni/6.0-1.0502.10245.9.9.ari/lib64 -L/opt/cray/udreg/2.3.2-1.0 502.9889.2.20.ari/lib64 -L/opt/cray/atp/1.8.3/libApp -L/opt/cray/cce/8.4.1/crayl ibs/x86-64 -L/opt/cray/wlm_detect/1.0-1.0502.57063.1.1.ari/lib64 -lAtpSigHandler -lAtpSigHCommData -lpthread -lmpichf90_cray -lrt -lugni -lpmi -lsci_cray_mpi_mp -lm -lf -lsci_cray_mp -lmpich_cray -lcraymp -lpgas-dmapp -lfi -lu -ldmapp -ludr eg -lcray-c++-rts -lcraystdc++ -lxpmem -lalpslli -lwlm_detect -lalpsutil -lrca - lquadmath -lomp -lmodules -lcraymath -lgfortran -lcsup -latomic -ltcmalloc_minim al -lstdc++ -L/opt/gcc/4.8.1/snos/lib/gcc/x86_64-suse-linux/4.8.1 -L/opt/cray/cc e/8.4.1/cray-binutils/x86_64-unknown-linux-gnu/lib -L//usr/lib64 >&5 /opt/cray/cce/8.4.1/craylibs/x86-64/libtcmalloc_minimal.a(tcmalloc.o):(.bss+0x13 ): multiple definition of `FLAG__namespace_do_not_use_directly_use_DECLARE_bool_ instead::FLAGS_tcmalloc_abort_on_large_alloc' /opt/cray/cce/8.4.1/craylibs/x86-64/libtcmalloc_minimal.a(tcmalloc.o):(.bss+0x13 ): first defined here /opt/cray/cce/8.4.1/craylibs/x86-64/libtcmalloc_minimal.a(tcmalloc.o): In functi on `TCMallocImplementation::GetAllocatedSize(void*)': tcmalloc.cc:(.text+0x1f0): multiple definition of `TCMallocImplementation::GetAl locatedSize(void*)' /opt/cray/cce/8.4.1/craylibs/x86-64/libtcmalloc_minimal.a(tcmalloc.o):tcmalloc.c c:(.text+0x1f0): first defined here /opt/cray/cce/8.4.1/craylibs/x86-64/libtcmalloc_minimal.a(tcmalloc.o): In functi on `TCMallocImplementation::MarkThreadBusy()': ``` -------------------------------- ### Visualize Documentation Source: https://github.com/specfem/specfem3d/blob/master/doc/call_trees_of_the_source_code/README.txt Command to open the generated documentation in a web browser. ```bash firefox html/index.html ```