Commit b79d33fa authored by Grégoire Uhlrich's avatar Grégoire Uhlrich
Browse files

Setup fixed ?

parent f9dfb319
......@@ -26,7 +26,12 @@ fi
exitInstaller()
{
echo -e "${RED}${BOLD}Error: Installation aborted.${NC}${NORMAL}"
exit 1
if [[ $0 != ${BASH_SOURCE} ]]
then
EXIT_CMD=return
else
EXIT_CMD=exit
fi
}
message()
......@@ -111,7 +116,7 @@ testDependencies_Linux()
fi
if [ "$dep_ok" == "0" ]
then
exitInstaller
exitInstaller $@
else
message "${GREEN}${BOLD}[1 / 5] All dependencies are ready for compilation${NC}${NORMAL}"
fi
......@@ -143,9 +148,9 @@ testDependencies()
case "${unameOut}" in
Linux*) testDependencies_Linux;;
Darwin*) testDependencies_MACOS;;
CYGWIN*) exitInstaller;;
MINGW*) exitInstaller;;
*) exitInstaller
CYGWIN*) exitInstaller $@;;
MINGW*) exitInstaller $@;;
*) exitInstaller $@
esac
}
......@@ -155,17 +160,19 @@ ensure_path()
then
echo "Directory $1 does not exist and will be created. Confirm ? [y/n, default: y]"
read c
if [ "$c" == "" ] || [ "$c" == "Y" ] || [ "$c" == "y" ] || [ "$c" == "yes" ] || [ "$c" == "Yes"]
if [ "$c" == "" ] || [ "$c" == "Y" ] || [ "$c" == "y" ] || [ "$c" == "yes" ] || [ "$c" == "Yes" ]
then
mkdir -p $1
if [ ! -e $1 ]
then
echo -e "${RED}${BOLD}Path $1 is invalid, please provide a valid path.${NORMAL}${NC}"
exitInstaller
exitInstaller $@
return
fi
else
echo -e "${RED}${BOLD}Path $1 is invalid, please provide a valid path.${NORMAL}${NC}"
exitInstaller
exitInstaller $@
return
fi
fi
}
......@@ -173,6 +180,7 @@ ensure_path()
message "${GREEN}${BOLD}MARTY installation script${NC}${NORMAL}"
testDependencies
[ ! -z $EXIT_CMD ] && $EXIT_CMD 1
default_path=/usr/local
if [ $# -ge 1 ]
......@@ -197,9 +205,13 @@ inc_path=$(realpath -m $path/include)
bin_path=$(realpath -m $path/bin)
ensure_path $path
[ ! -z $EXIT_CMD ] && $EXIT_CMD 1
ensure_path $inc_path
[ ! -z $EXIT_CMD ] && $EXIT_CMD 1
ensure_path $lib_path
[ ! -z $EXIT_CMD ] && $EXIT_CMD 1
ensure_path $bin_path
[ ! -z $EXIT_CMD ] && $EXIT_CMD 1
message "${GREEN}${BOLD}[2 / 5] Installation path checked${NORMAL}${NC}"
martyEnvFile=marty_env.sh
......@@ -244,14 +256,19 @@ case "${unameOut}" in
Darwin*)
mkdir -p $grafed_debug
mkdir -p $grafed_release
cd $grafed_debug && qmake -makefile -o Makefile "CONFIG+=debug" ../grafed-gui/grafed-gui.pro; cd $MARTY_LOC
cd $grafed_release && qmake -makefile -o Makefile ../grafed-gui/grafed-gui.pro; cd $MARTY_LOC
cd $grafed_debug && qmake -makefile -o Makefile "CONFIG+=debug" \
"QMAKE_CXX=$CXX" "QMAKE_LINK=$CXX" ../grafed-gui/grafed-gui.pro;\
cd $MARTY_LOC
cd $grafed_release && qmake -makefile -o Makefile \
"QMAKE_CXX=$CXX" "QMAKE_LINK=$CXX" ../grafed-gui/grafed-gui.pro;\
cd $MARTY_LOC
conf_release=`ls $grafed_release/.qmake*`
conf_debug=`ls $grafed_debug/.qmake*`
if [ "$conf_debug" == "" ] || [ "$conf_release" == "" ]
then
echo -e "${RED}${BOLD}GRAFED qmake configuration failed...${NORMAL}${NC}"
exitInstaller
exitInstaller $@
[ ! -z $EXIT_CMD ] && $EXIT_CMD 1
fi
;;
esac
......
......@@ -11,18 +11,18 @@ NOUNDERSCORE = 0
QUAD = 0
QUADSIZE = 16
FC = gfortran-7
FC = gfortran
FFLAGS = -fPIC -O3 -ffixed-line-length-none -fno-range-check \
$(DEF)QUAD=$(QUAD) $(DEF)QUADSIZE=$(QUADSIZE) \
$(DEF)U77EXT=0
CC = gcc-7
CC = gcc
CFLAGS = -fPIC -O3 -g -fomit-frame-pointer -ffast-math -fPIC -Wall -Wno-unused-result -m64 \
-DQUAD=$(QUAD) -DQUADSIZE=$(QUADSIZE) \
-DNOUNDERSCORE=$(NOUNDERSCORE) \
-DBIGENDIAN=0
CXX = g++-7
CXX = g++
CXXFLAGS = -fPIC -O3 -g -fomit-frame-pointer -ffast-math -Wall -m64
ML = 1
......@@ -30,7 +30,7 @@ MCC = mcc
MCFLAGS = -fPIC -st -b64
MCLIBS = -lpthread -lrt
LDFLAGS = -L/usr/lib/gcc/x86_64-linux-gnu/7/liblto_plugin.so -L/home/uhlrich/.local/lib/../lib -L/home/uhlrich/.local/lib/../lib -L/home/uhlrich/.local/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/home/uhlrich/.local/lib -L/home/uhlrich/.local/lib -L/home/uhlrich/.local/lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lgcc_s -lgcc
LDFLAGS = -L/usr/lib/gcc/x86_64-linux-gnu/7/liblto_plugin.so -L/home/uhlrich/.local/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/home/uhlrich/.local/lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lgcc_s -lgcc
PARALLEL = -j 12
......
......@@ -10,7 +10,7 @@ DYNAMICLIBRARY = libmarty.so
LTVERSION = 2.15
CXXDEBUG = $(CXX) -g # -D DEBUG
CXXFLAGS = $(MARTY_CXX_FLAGS) -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC -Wfatal-errors
CXXFLAGS = $(MARTY_CXX_FLAGS) -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC -Wfatal-errors
SRCDIR = src
HEADDIR = include
......
......@@ -96,6 +96,8 @@ Insertion OffShell(Insertion const& init);
Insertion Incoming(Insertion const& init);
Insertion Outgoing(Insertion const& init);
Insertion AntiPart(Insertion const& init);
Insertion Left(Insertion const& init);
Insertion Right(Insertion const& init);
std::vector<Insertion> AntiPart(std::vector<Insertion> const &init);
csl::Expr GetExpression(Insertion const& init);
std::vector<csl::Expr> GetExpression(std::vector<Insertion> const& insertions);
......
......@@ -4,7 +4,7 @@ CXX = g++-7
VERSION=1.0
CXXDEBUG = $(CXX) -g -D DEBUG
CFLAGS = -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC -DDEBUGLOG
CFLAGS = -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC #-DDEBUGLOG
SRCDIR = src
HEADDIR = include
......
......@@ -69,6 +69,8 @@ QuantumFieldParent *Insertion::getField() const {
}
void Insertion::setField(QuantumFieldParent *t_field) {
validExpression = false;
expression = CSL_UNDEF;
field = t_field;
}
......@@ -149,6 +151,30 @@ Insertion AntiPart(Insertion const& init)
return other;
}
Insertion Left(Insertion const &init)
{
const auto left = init.getField()->getWeylFermion(Chirality::Left);
HEPAssert(left,
mty::error::TypeError,
"Expecting a Dirac fermion for Left-handed insertion, "
+ toString(init.getExpression()) + " given instead.")
Insertion other(init);
other.setField(left.get());
return other;
}
Insertion Right(Insertion const &init)
{
const auto right = init.getField()->getWeylFermion(Chirality::Right);
HEPAssert(right,
mty::error::TypeError,
"Expecting a Dirac fermion for Right-handed insertion, "
+ toString(init.getExpression()) + " given instead.")
Insertion other(init);
other.setField(right.get());
return other;
}
std::vector<Insertion> AntiPart(std::vector<Insertion> const &init)
{
auto res {init};
......
......@@ -366,7 +366,7 @@ void InteractionTerm::setPoint(csl::Tensor const& point)
bool InteractionTerm::contains(const QuantumFieldParent* f) const
{
for (const auto& field : content)
if (f->contains(field.getQuantumParent()))
if (field.getQuantumParent()->contains(f))
return true;
return false;
......
......@@ -231,7 +231,6 @@ csl::Expr Model::computeSquaredAmplitude(
{
csl::ScopedProperty prop(&mty::option::decomposeInLocalOperator, false);
auto wilsons = getWilsonCoefficients(ampl, CSL_1, OperatorBasis::None, true);
Display(wilsons);
return computeSquaredAmplitude(
wilsons,
applyDegreesOfFreedomFactor
......
......@@ -1238,17 +1238,17 @@ void ModelBuilder::refresh()
else {
bool found = false;
for (const auto &k : L.kinetic)
if (k->containsExactly(particles[i].get())) {
if (k->contains(particles[i].get())) {
found = true;
break;
}
for (const auto &m : L.mass)
if (m->containsExactly(particles[i].get())) {
if (m->contains(particles[i].get())) {
found = true;
break;
}
for (const auto &in : L.interaction)
if (in->containsExactly(particles[i].get())) {
if (in->contains(particles[i].get())) {
found = true;
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment