Skip to content

Regarding the issue of failure in running due to errors during the conversion of amg.c into intermediate code #4

@Tiamomo

Description

@Tiamomo

Perhaps this is a strange question, and I am not sure if the project author is still actively involved in it, but I thought I would give it a try and inquire. Here's the situation: Firstly, I have successfully built the project using the make command. However, when I attempted to compile and run amg.c separately using different approaches (I am using the Clang compiler), I encountered the following issues:

  1. amg.c can be successfully compiled into an executable file directly using Clang, and it can run smoothly. The command is as follows:
    clang -fopenmp -o test4 amg.c -I.. -I../utilities -I../IJ_mv -I../seq_mv -I../parcsr_mv -I../parcsr_ls -I../krylov -DTIMER_USE_MPI -DHYPRE_USING_OPENMP -DHYPRE_HOPSCOTCH -DHYPRE_USING_PERSISTENT_COMM -DHYPRE_BIGINT -DHYPRE_TIMING -lmpi -L. -L../parcsr_ls -L../parcsr_mv -L../IJ_mv -L../seq_mv -L../krylov -L../utilities -lparcsr_ls -lparcsr_mv -lseq_mv -lIJ_mv -lkrylov -lHYPRE_utilities -lm
  2. However, when I followed the steps below to convert amg.c into an executable file, I encountered different errors during the execution:

    clang -S -emit-llvm -o amgtest.ll amgtest.c
    clang amgtest.ll -fopenmp -DTIMER_USE_MPI -DHYPRE_USING_OPENMP -DHYPRE_HOPSCOTCH -DHYPRE_USING_PERSISTENT_COMM -DHYPRE_BIGINT -DHYPRE_TIMING -lmpi -L. -L../parcsr_ls -L../parcsr_mv -L../IJ_mv -L../seq_mv -L../krylov -L../utilities -lparcsr_ls -lparcsr_mv -lseq_mv -lIJ_mv -lkrylov -lHYPRE_utilities -lm -o test4 -g
    mpirun -np 4 test4
    Output:
    p1

    clang -S -emit-llvm -o amgtest.ll amgtest.c
    llvm-as amgtest.ll -o amgtest.bc
    llc amgtest.bc -o amgtest.s
    clang amgtest.s -no-pie -fopenmp -DTIMER_USE_MPI -DHYPRE_USING_OPENMP -DHYPRE_HOPSCOTCH -DHYPRE_USING_PERSISTENT_COMM -DHYPRE_BIGINT -DHYPRE_TIMING -lmpi -L. -L../parcsr_ls -L../parcsr_mv -L../IJ_mv -L../seq_mv -L../krylov -L../utilities -lparcsr_ls -lparcsr_mv -lseq_mv -lIJ_mv -lkrylov -lHYPRE_utilities -lm -o test4 -g
    mpirun -np 4 test4
    Output:
    p2
    I identified the function where the error occurred through GDB debugging. After adding some debugging information, I found that the issue was related to the IJ_A structure.
    p3
    I suspect that the error occurred during the conversion of the amg.c code into intermediate code due to the complexity of the IJ_A structure. This may have resulted in some unexpected errors, leading to the final error. I have ruled out the issue of compiler versions (as I have tried Clang 3.8, Clang 4.0, and Clang 3.0). Could it be a problem with the code itself? Have the authors encountered similar errors before? (Since my current research is in code optimization/profiling, I need to manipulate the intermediate code of amg.c). Do you have any suggestions? Thank you very much!

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