Coder Social home page Coder Social logo

archer's People

Contributors

dongahn avatar simoatze avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

stonydon kento

archer's Issues

No valid dependences available error

This is just a place holder until I will get @simoatze a reproducer. It seems there is a corner case archer's dependency analysis trips on:

mpicc -cc=clang-archer -w -OPENMP_INCLUDE /nfs/tmp2/dahn/stage/include -g -O0  -c -O0  -DUSE_STDARG -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DUSE_STDARG=1 -DMALLOC_RET_VOID=1 -DGNU_C -DPETSC33 -DSNLDEC -DKLUGE_NFS -DTHREADING_ON -DCHARGE_DENSITY -DCOLLISIONAL_PLASMA -DCYL_R_Z -DDIRECT_IMPLICIT -DDOUBLE_PRECISION -DEXACT_IMPLICIT -DFLUID_PHYSICS -DFLUID_SPECIES=2 -DMAX_SPECIES=11 -DMHD_PHYSICS -DMULTI_PROCESS -DNUMBER_DENSITIES -DPARTICLE_COLLECTION -DPLASMA_REPOPULATION -DUSE_PERMITTIVITY -DKLUGE_INTERPOLATE_RAW_TDEL -DUSE_OHMIC_TERMS -DEXTENDED_PARTICLES -DCURRENT_CORRECTION -DKLUGE_VNORM -DCURRENT_DENSITIES -DKLUGE_BSTEP -DINITIAL_PARTICLE_POSITION -DKLUGE_DEDXFIX -DDBX_IS_OSF -DHAVE_STDLIB_H=1 -DMALLOC_RET_VOID=1  -I/opt/python-2.7/include/python2.7 -I/usr/gapps/lsp/petsc33mpiicc/include -I/usr/gapps/lsp/petsc33mpiicc/linux-gnu-c-debug/include grid.c -o grid.o
Building...
opt: /nfs/tmp2/dahn/ARCHER_FORK/LLVM/llvm_src/tools/polly/lib/Analysis/Dependences.cpp:552: isl_union_map* polly::Dependences::getDependences(int): Assertion `hasValidDependences() && "No valid dependences available"' failed.
0  opt             0x0000000001c8f40d llvm::sys::PrintStackTrace(_IO_FILE*) + 38
1  opt             0x0000000001c8f68a
2  opt             0x0000000001c8f039
3  libpthread.so.0 0x00002aaaabb1d710
4  libc.so.6       0x00002aaaac502625 gsignal + 53
5  libc.so.6       0x00002aaaac503e05 abort + 373
6  libc.so.6       0x00002aaaac4fb74e
7  libc.so.6       0x00002aaaac4fb810 __assert_perror_fail + 0
8  opt             0x0000000001d8821d polly::Dependences::getDependences(int) + 65
9  libArcher.so    0x00002aaaaca85359 polly::ArcherDDA::runOnScop(polly::Scop&) + 121
10 opt             0x0000000001dc0992 polly::ScopPass::runOnRegion(llvm::Region*, llvm::RGPassManager&) + 114
11 opt             0x00000000015004bc llvm::RGPassManager::runOnFunction(llvm::Function&) + 908
12 opt             0x00000000018f8f50 llvm::FPPassManager::runOnFunction(llvm::Function&) + 290
13 opt             0x00000000018f90c0 llvm::FPPassManager::runOnModule(llvm::Module&) + 84
14 opt             0x00000000018f9414
15 opt             0x00000000018f9abe llvm::legacy::PassManagerImpl::run(llvm::Module&) + 244
16 opt             0x00000000018f9cdd llvm::legacy::PassManager::run(llvm::Module&) + 39
17 opt             0x0000000000c84b0f main + 6022
18 libc.so.6       0x00002aaaac4eed5d __libc_start_main + 253
19 opt             0x0000000000c5dbb9
Stack dump:
0. Program arguments: opt -load libArcher.so -archer-dda .archer/grid.o.ll -o .archer/grid.o-optmized.ll 
1. Running pass 'Function Pass Manager' on module '.archer/grid.o.ll'.
2. Running pass 'Region Pass Manager' on function '@solveForWaveCoefficients'
3. Running pass 'Archer Data Dependency Analysis for ThreadSanitizer blacklist generation.' on basic block '%for.cond1101.preheader'

opt: /nfs/tmp2/dahn/ARCHER_FORK/LLVM/llvm_src/tools/polly/lib/Analysis/Dependences.cpp:552: isl_union_map* polly::Dependences::getDependences(int): Assertion `hasValidDependences() && "No valid dependences available"' failed.
0  opt             0x0000000001c8f40d llvm::sys::PrintStackTrace(_IO_FILE*) + 38
1  opt             0x0000000001c8f68a
2  opt             0x0000000001c8f039
3  libpthread.so.0 0x00002aaaabb1d710
4  libc.so.6       0x00002aaaac502625 gsignal + 53
5  libc.so.6       0x00002aaaac503e05 abort + 373
6  libc.so.6       0x00002aaaac4fb74e
7  libc.so.6       0x00002aaaac4fb810 __assert_perror_fail + 0
8  opt             0x0000000001d8821d polly::Dependences::getDependences(int) + 65
9  libArcher.so    0x00002aaaaca85359 polly::ArcherDDA::runOnScop(polly::Scop&) + 121
10 opt             0x0000000001dc0992 polly::ScopPass::runOnRegion(llvm::Region*, llvm::RGPassManager&) + 114
11 opt             0x00000000015004bc llvm::RGPassManager::runOnFunction(llvm::Function&) + 908
12 opt             0x00000000018f8f50 llvm::FPPassManager::runOnFunction(llvm::Function&) + 290
13 opt             0x00000000018f90c0 llvm::FPPassManager::runOnModule(llvm::Module&) + 84
14 opt             0x00000000018f9414
15 opt             0x00000000018f9abe llvm::legacy::PassManagerImpl::run(llvm::Module&) + 244
16 opt             0x00000000018f9cdd llvm::legacy::PassManager::run(llvm::Module&) + 39
17 opt             0x0000000000c84b0f main + 6022
18 libc.so.6       0x00002aaaac4eed5d __libc_start_main + 253
19 opt             0x0000000000c5dbb9
Stack dump:
0. Program arguments: opt -load libArcher.so -archer-dda .archer/grid.o.ll -o .archer/grid.o-optmized.ll 
1. Running pass 'Function Pass Manager' on module '.archer/grid.o.ll'.
2. Running pass 'Region Pass Manager' on function '@solveForWaveCoefficients'
3. Running pass 'Archer Data Dependency Analysis for ThreadSanitizer blacklist generation.' on basic block '%for.cond1101.preheader'

Archer encountered an error when invoking [opt -load libArcher.so -archer-dda .archer/grid.o.ll -o .archer/grid.o-optmized.ll].
Exiting...
make: *** [grid.o] Error 1

build dependency management needs an explanation

I tried clang-archer on hypre. I changed key compiler make variables as:

CC        = mpicc
CFLAGS    = -cc=clang-archer -d -O0 -g -DHAVE_CONFIG_H $(C_COMPILE_FLAGS)

CXX       = mpiCC -cc=clang-archer
CXXFLAGS  = -O0 -g -d -DHAVE_CONFIG_H $(CXX_COMPILE_FLAGS)

LINK_F77  = mpiifort
LINK_CC   = mpicc -cc=clang-archer
LINK_CXX  = mpiCC -cc=clang-archer

Initially, it compiles the code well. But when the build tries to create a static library, it fails with the following message:

DEBUG-INFO: Path[/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-hypre]
DEBUG-INFO: Command[opt -mem2reg .archer/a.out.nomp.bc -o .archer/a.out.nomp.bc.opt]
DEBUG-INFO: Path[/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-hypre]
DEBUG-INFO: Command[opt -S -polly-canonicalize .archer/a.out.nomp.bc.opt -o .archer/a.out.ll]
DEBUG-INFO: Path[/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-hypre]
DEBUG-INFO: Command[opt -load libArcher.so -archer-dda .archer/a.out.ll -o .archer/a.out-optmized.ll]
DEBUG-INFO: Path[/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-hypre]
DEBUG-INFO: Command[clang -Qunused-arguments -O0 -g -fopenmp -c HYPRE_fei_vector.cxx -I/nfs/tmp2/dahn/stage/local/archer/include -DHAVE_CONFIG_H -DHAVE_SUPERLU -DBOOL_NOT_SUPPORTED -DMPICH_SKIP_MPICXX -DHAVE_MLI -I../.. -I/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base -I./../.. -I./../../IJ_mv -I./../../utilities -I./../../multivector -I./../../krylov -I./../../parcsr_mv -I./../../parcsr_ls -I./../../seq_mv -I./../../distributed_matrix -I./../../distributed_ls -I./../femli -I./../fei-base -I./../SuperLU/SRC -I../ml/src/Include -DUSE_STDARG -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DUSE_STDARG=1 -DMALLOC_RET_VOID=1 -I/usr/local/tools/mvapich-gnu/include -fsyntax-only -Xclang -load -Xclang ArcherPlugin.so -Xclang -plugin -Xclang archer]
Building libHYPRE_FEI.a ... 
ar -rcu libHYPRE_FEI.a HYPRE_LSI_Dsuperlu.o HYPRE_LSI_ddict.o HYPRE_LSI_ddilut.o HYPRE_LSI_ml.o HYPRE_LSI_mlmaxwell.o HYPRE_LSI_poly.o HYPRE_LSI_schwarz.o HYPRE_parcsr_TFQmr.o HYPRE_parcsr_bicgs.o HYPRE_parcsr_bicgstabl.o HYPRE_parcsr_fgmres.o HYPRE_parcsr_lsicg.o HYPRE_parcsr_symqmr.o HYPRE_parcsr_maxwell.o SymQMR.o TFQmr.o bicgs.o bicgstabl.o fgmres.o hypre_lsi_amge.o hypre_lsi_ddamg.o hypre_lsi_misc.o lsicg.o FEI_HYPRE_Impl.o LLNL_FEI_Impl.o LLNL_FEI_Fei.o LLNL_FEI_LSCore.o LLNL_FEI_Solver.o LLNL_FEI_Matrix.o HYPRE_LSC_aux.o HYPRE_LSI_UZAWA.o HYPRE_LSI_blkprec.o HYPRE_LSI_mli.o HYPRE_LinSysCore.o HYPRE_SlideReduction.o cfei_hypre.o hypre_cfei.o hypre_schur_reduce.o hypre_slide_reduce.o HYPRE_fei_mesh.o HYPRE_fei_matrix.o HYPRE_fei_vector.o
ranlib libHYPRE_FEI.a
cp -fR ./cfei-hypre.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR ./cfei_hypre.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR ./hypre_cfei.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR ./HYPRE_LinSysCore.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR ./HYPRE_FEI*.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR ./LLNL_FEI*.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base/fei_Data.hpp /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base/fei_Lookup.hpp /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base/fei_LinearSystemCore.hpp /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base/cfei.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base/fei_bool.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base/fei_defs.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
cp -fR /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-base/fei_mpi.h /nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/hypre/include
make[2]: Leaving directory `/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-hypre'
make[1]: Leaving directory `/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv'

Making lib ...
make[1]: Entering directory `/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/lib'
make[1]: *** No rule to make target `/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/FEI_mv/fei-hypre/*.o', needed by `libHYPRE.a'.  Stop.
make[1]: Leaving directory `/nfs/tmp2/dahn/Archer_Testcases/Ulrike_benign_races_archer_static/hypre-2.10.0b/src/lib'

It seems clang-archer at the first pass produces LLVM bit code files instead of native object files that the ar looks for above.

Please make the options conform to convention

clang-archer's option sets are not consistent currently. For long options like OPENMP_INCLUDE, please use --openmp-include=<include_path>. For this particular case, it seems reasonable to set the default path to the clang-archer's path to omp.h. man get opt and man getopt_long should explain conventions we can follow.

long term: one pass archer compilation

This is a place holder for one-pass archer compilation. If we can pull this off, it seems users will have much easier time to integrate archer into their build systems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.