lanl / vpic

Vector Particle-In-Cell (VPIC) Project
Other
152 stars 76 forks source link

fix vpic "make install" #66

Closed chuckcranor closed 5 years ago

chuckcranor commented 5 years ago
codecov[bot] commented 5 years ago

Codecov Report

Merging #66 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #66   +/-   ##
=======================================
  Coverage   78.06%   78.06%           
=======================================
  Files          64       64           
  Lines        4217     4217           
  Branches      628      628           
=======================================
  Hits         3292     3292           
  Misses        686      686           
  Partials      239      239

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1ebc21e...e1be7be. Read the comment docs.

rfbird commented 5 years ago

Hey Chuck,

Thanks for this contribution, it looks great. I'd be glad to merge it, but first have a few comments:

chuckcranor commented 5 years ago

Hi Robert-

No problem, I'll start retargeting these pullups to devel in a moment.

The fix for vpic.in ( needs ${VPIC_CXX_FLAGS} ) in master is needed, because otherwise you get compile errors building a deck from the installed version of vpic because all the command line flags don't make it out into ${CMAKE_INSTALL_PREFIX}/bin/vpic ... example:

% ../vpic reconnection.cc
/usr/bin/c++ -rdynamic -fno-strict-aliasing -I. -I/tmp/yoha/include/vpic -DINPUT_DECK=reconnection.cc /tmp/yoha/share/vpic/main.cc /tmp/yoha/share/vpic/wrapper.cc -o reconnection.Linux -Wl,-rpath,/tmp/yoha/lib -L/tmp/yoha/lib -lvpic /usr/lib/x86_64-linux-gnu/libmpichcxx.so /usr/lib/x86_64-linux-gnu/libmpich.so /usr/lib/x86_64-linux-gnu/libmpich.so -lpthread -ldl
In file included from /tmp/yoha/include/vpic/vpic/../boundary/../species_advance/../sf_interface/../field_advance/../grid/../util/util.h:13:0,
                 from /tmp/yoha/include/vpic/vpic/../boundary/../species_advance/../sf_interface/../field_advance/../grid/grid.h:14,
                 from /tmp/yoha/include/vpic/vpic/../boundary/../species_advance/../sf_interface/../field_advance/field_advance.h:9,
                 from /tmp/yoha/include/vpic/vpic/../boundary/../species_advance/../sf_interface/sf_interface.h:13,
                 from /tmp/yoha/include/vpic/vpic/../boundary/../species_advance/species_advance.h:15,
                 from /tmp/yoha/include/vpic/vpic/../boundary/boundary.h:4,
                 from /tmp/yoha/include/vpic/vpic/vpic.h:19,
                 from /tmp/yoha/share/vpic/main.cc:11:
/tmp/yoha/include/vpic/vpic/../boundary/../species_advance/../sf_interface/../field_advance/../grid/../util/pipelines/pipelines.h:46:2: error: #error "VPIC_USE_OPENMP or VPIC_USE_PTHREADS must be specified"
 #error "VPIC_USE_OPENMP or VPIC_USE_PTHREADS must be specified"
  ^~~~~

We've also had some issues with the structure of the arch files and how they work with cmake (at least in master) that I have some fixes for. The main issue for us is that we build and install vpic as one part of our build process using cmake's "ExternalProject" module. As part of that we want to be able to specify things like -DCMAKE_INSTALL_PREFIX=/foo on the cmake command line. But if the arch scripts run cmake for you, there is no way to put this in. Also, the arch scripts are not symmetric... the LANL ones run both cmake and make, while the others just run cmake. I need our build process to work on machines local to CMU and on GR and TT at LANL. I've done some scripting that changes the arch/* scripts to just generate an initial set of cmake cache variables (that you can load with "cmake -C") . This allows the build to work the same way on all systems (assuming that you preconfigure the desired set of modules on TT and GR prior to running cmake) and allows the build to run cmake (instead of the arch script). ...

chuck

chuckcranor commented 5 years ago

will retest/retarget to devel.