Comments (11)
Something worth mentioning RE Eigen and existing aligned data: there is a Map class template that can be used to interface with existing strided data buffers. This way you may get some performance gains by avoiding memory copies (thinking back to what you were describing on the call last Monday).
from grid.
pushed this into develop. The mobius with dense matrix inverse for the MooInv is tested and working.
from grid.
There are various issues with the new setup. I am trying to compile Grid since two hours without success. Here is what I found:
- the prerequisite build is not compatible with parallel build
- the prerequisite build is based on non-portable script (use of GNU make
filter-out
in Makefile.am) - the prerequisite build does not allow to configure for external FFTW without forcing the flags
- the prerequisite build cannot be cleaned without removing files by hand
- I have some missing header errors for includes with
""
(we should really use "<>" includes everywhere)
The Travis build pass so it is really portability issues. Anyway I always found our autotool setup quite messy (and I had quite some feedback that it is cryptic). I am going to review and clean the build system and at the same time fix the issues mentioned above.
I don't think including the prerequisite build in the build system is a good idea after all. These package have their own build system and the user might want to use system-wide libraries or compile them by using flags different from the one used in Grid. I think it would be best to just have a script (independent of the build system) to take care of the prerequisites.
from grid.
I agree with the last part. Having in the prerequisites some complex libraries like Eigen is breaking compilation in my pc too. I could workaround only deactivating the openmp flags once using my clang.
If we need them we should leave the user to install then look for them at configure time.
Could you explain better the "messiness" of the autotools and the feedbacks you got?
from grid.
First, about the problems.
Autotools gives me:
prerequisites/Makefile.am:1: warning: filter-out -std=c++11, $(CXXFLAGS: non-POSIX variable name
prerequisites/Makefile.am:1: (probably a GNU make extension)
tests/debug/Make.inc:33: warning: variable 'Test_zmm_SOURCES' is defined but no program or
tests/debug/Make.inc:33: library has 'Test_zmm' as canonical name (possible typo)
tests/debug/Makefile.am:19: 'tests/debug/Make.inc' included from here
tests/debug/Make.inc:34: warning: variable 'Test_zmm_LDADD' is defined but no program or
tests/debug/Make.inc:34: library has 'Test_zmm' as canonical name (possible typo)
tests/debug/Makefile.am:19: 'tests/debug/Make.inc' included from here
autoreconf: Leaving directory `.'
I also have the following error at compile time:
../../include/Grid/algorithms/approx/Remez.h:24:10: fatal error: 'algorithms/approx/bigfloat_double.h' file not found
#include "algorithms/approx/bigfloat_double.h"
all that on my MacBook with ../configure --enable-precision=single --enable-simd=AVX --enable-comms=mpi --prefix=/Users/antonin/local CXX=mpicxx CXXFLAGS='-mfma -mavx -O3 -std=c++11'
from grid.
About our configure
script. The difficult thing here is that the philosophy of autotools is to set the build up for you, but in the case of Grid the user actually has a fair amount of manual setup to do. Here are the points that I would like to improve:
- the configure script detects the architecture but the user still has to provide the
CXXFLAGS
for it - the configure script can detect C++11 but the user has to provide
-std=c++11
manually - the configure script expects the user to setup everything for MPI compilation
- the setup of MPFR and MPC libraries has to be done manually
- the "generic" architecture is still called "empty"
- it is still not clear to me that one can install Grid to use it as a library
from grid.
First one is just a warning. I am not getting it, this is my configure
CXX=clang++ ./configure --enable-precision=single --enable-simd=AVX2 CXXFLAGS="-mavx2 -mfma -O3 -std=c++11" LDFLAGS="" LIBS="-lgmp -lmpfr" --enable-comms=none
Agree that it should not happen.
Totally agree on the improvements on the automatic detections for configure.
the first has some portability issues that must be taken into account. Also we would still like to steer the compilation to a custom target independent on the machine.
from grid.
The Test_zmm
one is very annoying because I corrected it two times already...
from grid.
I am rewriting the configure.ac
. Is it really necessary to detect the present and test the selected SIMD against it? I guess lattice people know well which instruction set they are working with. Moreover it does not make sense for cross-compilation (e.g. will KN* systems have KN* frontends?)
from grid.
I thing I have finished redesigning the build system. Please give me some feedback so that I can consider merging it into develop
before it starts conflicting with other branches.
You can try it by checking out the feature/new-build
branch. The list of changes is quite long, but from the user point of view most of them are quite invisible. I have modified and extended the Readme.md accordingly (see https://github.com/paboyle/Grid/tree/feature/new-build). Please find below some of the main points:
- all the pre-configure operations are centralised in a
bootstrap.sh
script - the
Make.inc
files are not part of the git repository anymore, they are automatically generated bybootstrap.sh
- the Eigen source is extracted and listed in Grid sources by
bootstrap.sh
- the
Make.inc
files generation was modified such that all the headers can be properly installed withmake install
keeping Grid directory structure - the
Make.inc
files generation was modified such that tests programs are not installed bymake install
- the
Make.inc
files generation was modified such that only test programs at the root oftests
are compiled by default. Other tests can be compiled usingmake tests
. This reduces a lot the compile time and allow us to still fit in the Travis allowed build time - the Grid library is now compiled using libtool, this is a more portable way of doing things and gives better dependency management. Libtool is configured to only build a static library
- the
configure
script do not check anymore the CPUID - the
configure
determines and saves the compiler vendor and version - the
--with-simd
option now sets the proper compiler flags automatically. This is of course dependent on the compiler vendor, gcc/clang/icpc are supported, it is easy to add more - the
configure
script figure out by itself how to link to MPI if--enable-comms=mpi
was used, there is no need to specifyCXX
to be a wrapper likempicxx
- the
configure
script has two--with-<lib>=
options with<lib>=gmp,mpfr
to specify prefixes for GMP and MPFR libraries, this will set compilation flags accordingly - MPFR is needed only if GMP is used, if GMP is detected but MPFR cannot be found
configure
now issues an error (the compilation would inevitably fail) - the FFTW dependency was removed, it was confusing as by now Grid does not depend on it. I am happy to do something about it as soon as it becomes a real dependency
- the summary outputted at the end of
configure
is much more verbose, in particular you can make a fine check of compilation flags - because we have a lot of
Makefile.am
files, I reduced most of them to very short scripts and moved global settings toconfigure.ac
to avoid tricky code duplication
from grid.
Ok this is now on develop
, I am closing the issue.
from grid.
Related Issues (20)
- MPI2 romio321 library fails when reading >= 2GB per rank HOT 2
- Cannot compile the gparity and adjoint versions of the CompactWilsonCloverAction
- Compilation errors and warnings build targeting Nvidia GPUs HOT 2
- GPU Benchmark_ITT segfaults with MPI and ranks > 1 HOT 9
- Create a version of Benchmark_ITT including Clover instead of Wilson
- Grid fails to build for Nc != 3
- hipcc on Crusher: function bcopy undefined (compiler does not have openmp enabled?) HOT 1
- Certain operations involving SitePropagator::scalar_object won't compile with CUDA for Nc > 3
- make install doesn't install all headers due to duplicate Config.h and Version.h HOT 3
- Using ILDG checkpointer causes a crash during write HOT 2
- Develop is broken HOT 1
- ARM NEON is broken HOT 2
- Feature request: provenance tracking
- Add hint to shm error message
- Cuda error invalid device ordinal
- Recent commit causing Grid build to fail
- The configure options --enable-setdevice and --diable-setdevice have no effect
- Grid does not compile on Arm with CUDA HOT 9
- invalid configuration argument when running with 1 GPU
- FlightRecorder.cc breaks compilation for --enable-comms=none HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grid.