Skip to content

Commit

Permalink
MRG: Merge branch 'main' into features/melinatorcosiupdates
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglauer committed Dec 1, 2023
2 parents 6ab384d + 27f07bd commit 9190634
Show file tree
Hide file tree
Showing 30 changed files with 431 additions and 379 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@

MAKE += -s

SHELL=/bin/bash
SHELL :=/bin/bash

# Basic directories
TOP = $(shell pwd)
SR = $(TOP)/src
IN = $(TOP)/include
LB = $(TOP)/lib
BN = $(TOP)/bin
HT = $(TOP)/doc/html
CT = $(TOP)/cint
CF = $(TOP)/config
TOP := $(shell pwd)
SR := $(TOP)/src
IN := $(TOP)/include
LB := $(TOP)/lib
BN := $(TOP)/bin
HT := $(TOP)/doc/html
CT := $(TOP)/cint
CF := $(TOP)/config

#------------------------------------------------------------------------------
# Included options (result of ./configure)
Expand Down Expand Up @@ -54,7 +54,7 @@ LDFLAGS += -L$(LB)
#------------------------------------------------------------------------------
# Commands:

CMD=
CMD :=

#.NOPARALLEL:
.EXPORT_ALL_VARIABLES: all copy miw geo geolib
Expand All @@ -71,8 +71,8 @@ only: info glo geo spe rev siv res mim evi rea fre add cos
#------------------------------------------------------------------------------
# Version check:

ROOTVERSIONOK = $(shell bash $(CF)/configure_rootversiontest )
GEANT4VERSIONOK = $(shell bash $(CF)/configure_geant4versiontest )
ROOTVERSIONOK := $(shell bash $(CF)/configure_rootversiontest )
GEANT4VERSIONOK := $(shell bash $(CF)/configure_geant4versiontest )


#------------------------------------------------------------------------------
Expand Down
18 changes: 15 additions & 3 deletions bin/dcosima
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ commandhelp() {
echo " --source=[filename]: The source file"
echo " --continue=[name]: Continue a simulation run with the given name (ignores --source & --prefix)"
echo " --delay=[number] Time between searches for free slots -- the longer the delay time the lower the priority of this instance (default: 10 seconds)"
echo " --zip: Compress the output files."
echo " --unzip: Do not compress the output files (gzip'ing them is the default)."
echo " --log: Create a log file of what is started where"
echo " --help: Show this help."
echo ""
Expand Down Expand Up @@ -80,7 +80,7 @@ SOURCE=""
SOURCEFILENAME=""
INSTANCES="1"
PREFIX=""
ZIP="FALSE"
ZIP="TRUE"
CONTINUE=""
LOG="FALSE"
LOGFILE=""
Expand Down Expand Up @@ -109,6 +109,8 @@ for C in "${CMD[@]}"; do
CONTINUE=`echo ${C} | awk -F"=" '{ print $2 }'`
elif [[ ${C} == *-z* ]]; then
ZIP="TRUE"
elif [[ ${C} == *-u* ]]; then
ZIP="FALSE"
elif [[ ${C} == *-d* ]]; then
DELAY=`echo ${C} | awk -F"=" '{ print $2 }'`
elif [[ ${C} == *-l* ]]; then
Expand Down Expand Up @@ -234,6 +236,12 @@ if [[ ${LOG} == "TRUE" ]]; then
echo " * Logging output to file: ${LOGFILE}"
fi

if [[ ${ZIP} == "TRUE" ]]; then
echo " * Gzip'ing output"
else
echo " * Not gzip'ing output"
fi

if [[ ${INSTANCES} -gt 0 ]]; then
echo " * Simulations instances: ${INSTANCES}"
else
Expand Down Expand Up @@ -674,7 +682,11 @@ if [[ ${LAUNCHED} -gt 0 ]]; then
echo " " >> ${ConcatFileName}

for (( i=1; i <= ${INSTANCES}; i+=1 )); do
echo "IN ${Base}.p1.inc${i}.id1.sim" >> ${ConcatFileName}
if [[ "${ZIP}" == "TRUE" ]]; then
echo "IN ${Base}.p1.inc${i}.id1.sim.gz" >> ${ConcatFileName}
else
echo "IN ${Base}.p1.inc${i}.id1.sim" >> ${ConcatFileName}
fi
done

echo "EN" >> ${ConcatFileName}
Expand Down
2 changes: 1 addition & 1 deletion bin/dcosima-runinstance
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ OUT="/dev/null"
if [[ ${LOGFILE} != "" ]]; then
OUT="Sim.inc${INSTANCEID}.log"
fi
ssh -i ${HOME}/.ssh/dmegalib_rsa -p ${REMOTEPORT} ${REMOTEUSER}@${REMOTEHOST} ". ~/.dmegalib.bashrc; cd ${MASTERDIR}/${RUNDIR}; nohup nice -n ${NICELEVEL} cosima -p 1 -f ${INSTANCEID} -t ${RUNDIR} -v 0 -s ${SEED} `if [[ ${ZIP} == TRUE ]]; then echo "-z"; fi` ${SOURCEFILE} > ${OUT} 2>&1 &"
ssh -i ${HOME}/.ssh/dmegalib_rsa -p ${REMOTEPORT} ${REMOTEUSER}@${REMOTEHOST} ". ~/.dmegalib.bashrc; cd ${MASTERDIR}/${RUNDIR}; nohup nice -n ${NICELEVEL} cosima -p 1 -f ${INSTANCEID} -t ${RUNDIR} -v 0 -s ${SEED} `if [[ ${ZIP} == FALSE ]]; then echo "-u"; fi` ${SOURCEFILE} > ${OUT} 2>&1 &"
if [ "$?" != "0" ]; then
echo "ERROR: Failed to start the simulations" | ${LOGGING}
exit 1
Expand Down
2 changes: 1 addition & 1 deletion bin/dmegalib-setup
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ commandhelp() {
echo ""
echo "";
echo "Example: "
echo " dmegalib-setup --machines=thebe,despina,carpo,sinope,carme,royal,leda,elara,cosi-ccu";
echo " dmegalib-setup --machines=thebe,despina,carpo,dione,sinope,carme,leda,royal";
echo "";
}

Expand Down
30 changes: 15 additions & 15 deletions config/Makefile.linuxclang
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
#----------------------------------------------------------------


CMODE = "Linux with clang compiler"
DLL = so
CMODE := "Linux with clang compiler"
DLL := so

# Basic flags generated by ROOT
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs)
ROOTGLIBS = $(shell root-config --glibs)
ROOTCFLAGS := $(shell root-config --cflags)
ROOTLIBS := $(shell root-config --libs)
ROOTGLIBS := $(shell root-config --glibs)

# Compiler & linker options:
CXX = clang++
CXXFLAGS = $(OPT) -std=c++0x -Wall -Wno-deprecated -fPIC -Wno-overloaded-virtual -D_REENTRANT -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___LINUX___ -D___CLING___
DEFINES = -UHARDWARE
LD = clang++
LDFLAGS = $(OPT) -D___LINUX___
SOFLAGS = -shared
LIBS = $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS = $(ROOTGLIBS)
DEPFLAGS = -MD -MF
CXX := clang++
CXXFLAGS := $(OPT) -std=c++0x -Wall -Wno-deprecated -fPIC -Wno-overloaded-virtual -D_REENTRANT -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___LINUX___ -D___CLING___
DEFINES := -UHARDWARE
LD := clang++
LDFLAGS := $(OPT) -D___LINUX___
SOFLAGS := -shared
LIBS := $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS := $(ROOTGLIBS)
DEPFLAGS := -MD -MF

LINK = ln -s -f
LINK := ln -s -f
34 changes: 17 additions & 17 deletions config/Makefile.linuxgcc
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
#----------------------------------------------------------------


CMODE = "Linux with gcc utilizing C++14"
DLL = so
CMODE := "Linux with gcc utilizing C++14"
DLL := so

# Basic flags generated by ROOT
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs)
ROOTGLIBS = $(shell root-config --glibs)
ROOTCFLAGS := $(shell root-config --cflags)
ROOTLIBS := $(shell root-config --libs)
ROOTGLIBS := $(shell root-config --glibs)

# Compiler & linker options:
CXX = g++
CXXFLAGS = $(OPT) -std=c++14 -Wall -Wno-deprecated -fPIC -D_REENTRANT -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___LINUX___ -D___CLING___
DEFINES = -UHARDWARE
LD = g++
LDFLAGS = $(OPT) -D___LINUX___
SOFLAGS = -shared
LIBS = $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS = $(ROOTGLIBS)
DEPFLAGS = -MM
CXX := g++
CXXFLAGS := $(OPT) -std=c++14 -Wall -Wno-deprecated -fPIC -D_REENTRANT -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___LINUX___ -D___CLING___
DEFINES := -UHARDWARE
LD := g++
LDFLAGS := $(OPT) -D___LINUX___
SOFLAGS := -shared
LIBS := $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS := $(ROOTGLIBS)
DEPFLAGS := -MM

LINK = ln -s -f
LINK := ln -s -f

# HEASoft
HEACFLAGS =
HEALIBS =
HEACFLAGS :=
HEALIBS :=
ifneq ("$(wildcard $(LHEASOFT)/include/fitsio.h)", "")
HEACFLAGS += -I$(LHEASOFT)/include
HEALIBS += -L$(LHEASOFT)/lib
Expand Down
30 changes: 15 additions & 15 deletions config/Makefile.linuxicc
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
#----------------------------------------------------------------


CMODE = "Linux with icc compiler"
DLL = so
CMODE := "Linux with icc compiler"
DLL := so

# Basic flags generated by ROOT
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs)
ROOTGLIBS = $(shell root-config --glibs)
ROOTCFLAGS := $(shell root-config --cflags)
ROOTLIBS := $(shell root-config --libs)
ROOTGLIBS := $(shell root-config --glibs)

# Compiler & linker options:
CXX = icc
CXXFLAGS = $(OPT) -fPIC -wd1572 -wd1125 -wd654 -wd191 -wd1224 -wd1476 -wd913 -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___LINUX___ -D___CLING___
DEFINES = -UHARDWARE
LD = icc
LDFLAGS = $(OPT) -D___LINUX___
SOFLAGS = -shared
LIBS = $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS = $(ROOTGLIBS)
DEPFLAGS = -M
CXX := icc
CXXFLAGS := $(OPT) -fPIC -wd1572 -wd1125 -wd654 -wd191 -wd1224 -wd1476 -wd913 -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___LINUX___ -D___CLING___
DEFINES := -UHARDWARE
LD := icc
LDFLAGS := $(OPT) -D___LINUX___
SOFLAGS := -shared
LIBS := $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS := $(ROOTGLIBS)
DEPFLAGS := -M

LINK = ln -s -f
LINK := ln -s -f
38 changes: 19 additions & 19 deletions config/Makefile.macosx
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@
#----------------------------------------------------------------


CMODE = "MacOSX with clang compiler"
ARCH = macosx
DLL = so
CMODE := "MacOSX with clang compiler"
ARCH := macosx
DLL := so

# Basic flags generated by ROOT
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs)
ROOTGLIBS = $(shell root-config --glibs)
ROOTCFLAGS := $(shell root-config --cflags)
ROOTLIBS := $(shell root-config --libs)
ROOTGLIBS := $(shell root-config --glibs)

# Compiler & linker options:
CXX = c++
CXXFLAGS = $(OPT) -std=c++14 -pipe -Wall -fPIC -D_REENTRANT -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___MACOSX___ -D___CLING___ -Wno-unused-but-set-variable -Wno-overloaded-virtual -Wno-tautological-undefined-compare -Wno-deprecated-declarations
DEFINES = -UHARDWARE
LD = c++
LDFLAGS = $(OPT) -Xlinker -bind_at_load -flat_namespace -D___MACOSX___
SOFLAGS = -dynamiclib -flat_namespace -undefined suppress
LIBS = $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS = $(ROOTGLIBS)
DEPFLAGS = -M

LINK = ln -s -f
CXX := c++
CXXFLAGS := $(OPT) -std=c++14 -pipe -Wall -fPIC -D_REENTRANT -I$(IN) -I$(CT) -I. $(ROOTCFLAGS) -D___MACOSX___ -D___CLING___ -Wno-unused-but-set-variable -Wno-overloaded-virtual -Wno-tautological-undefined-compare -Wno-deprecated-declarations
DEFINES := -UHARDWARE
LD := c++
LDFLAGS := $(OPT) -Xlinker -bind_at_load -flat_namespace -D___MACOSX___
SOFLAGS := -dynamiclib -flat_namespace -undefined suppress
LIBS := $(ROOTLIBS) -lpthread -lThread -lMinuit -lGeom -lSpectrum -lTMVA
GLIBS := $(ROOTGLIBS)
DEPFLAGS := -M

LINK := ln -s -f

# HEASoft
HEACFLAGS =
HEALIBS =
HEACFLAGS :=
HEALIBS :=
ifneq ("$(wildcard $(LHEASOFT)/include/fitsio.h)", "")
HEACFLAGS += -I$(LHEASOFT)/include
HEALIBS += -L$(LHEASOFT)/lib
Expand Down
12 changes: 6 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ echo "# Section A: Additional libraries" >> config/Makefile.options
echo "# " >> config/Makefile.options
echo "# Important: Don't modify this sections by yourself " >> config/Makefile.options
echo " " >> config/Makefile.options
echo "GEANT4INSTALLED = ${Geant4Found}" >> config/Makefile.options
echo "HEASOFTINSTALLED = ${FitsIOFound}" >> config/Makefile.options
echo "MPIINSTALLED = ${MPIFound}" >> config/Makefile.options
echo "GEANT4INSTALLED := ${Geant4Found}" >> config/Makefile.options
echo "HEASOFTINSTALLED := ${FitsIOFound}" >> config/Makefile.options
echo "MPIINSTALLED := ${MPIFound}" >> config/Makefile.options
echo " " >> config/Makefile.options

echo "# " >> config/Makefile.options
Expand All @@ -538,7 +538,7 @@ if [[ ${ARCH} == linux ]]; then
fi
echo "Please see the file config/Makefile.options for more optimization options for the Intel and GNU compiler"
echo "" >> config/Makefile.options
echo "OPT = ${OPTIONS}" >> config/Makefile.options
echo "OPT := ${OPTIONS}" >> config/Makefile.options
if ( [ $Geant4Found -eq 0 ] ); then
echo "$G4DEBUG" >> config/Makefile.options
fi
Expand All @@ -551,10 +551,10 @@ echo "# If you have anything else, set it in Makefile.user " >> confi
echo "# " >> config/Makefile.options
echo "" >> config/Makefile.options
if ( [ $Geant4OpenGLFound -eq 0 ] ); then
echo "G4VIS_USE_OPENGLX=1" >> config/Makefile.options
echo "G4VIS_USE_OPENGLX := 1" >> config/Makefile.options
fi
if ( [ $Geant4DawnFileFound -eq 0 ] ); then
echo "G4VIS_USE_DAWNFILE=1" >> config/Makefile.options
echo "G4VIS_USE_DAWNFILE := 1" >> config/Makefile.options
fi
echo "" >> config/Makefile.options

Expand Down
2 changes: 1 addition & 1 deletion resource/examples/advanced/Atmosphere/make_all.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


for P in `ls *.cxx`; do
make -f ${MEGALIB}/resource/standalone/Makefile.standalone PRG=${P}
make -f ${MEGALIB}/resource/standalone/Makefile.StandAlone PRG=${P}
done

2 changes: 1 addition & 1 deletion resource/examples/advanced/Pipeline/SimulateSources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PointSourceContinuumPolarizedTemplate=${MEGALIB}/resource/examples/advanced/Pipe


THREADS=1
NCPUS=`cat /proc/cpuinfo | grep "processor" | wc -l`
NCPUS=`grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}'`

# Create the directory where to store the simulation file
if [ ! -d "${PointSourceDir}" ]; then
Expand Down
10 changes: 5 additions & 5 deletions src/addon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Definitions:
#

PRGSX = \
PRGSX := \
$(BN)/SensitivityOptimizer \
$(BN)/Mask \
$(BN)/ConvertMGeant \
Expand All @@ -37,18 +37,18 @@ PRGSX = \
$(BN)/IsotopeFileSplitter \
$(BN)/VariableSourceDetector \

FITS = \
FITS := \
$(BN)/TraFitsConverter \
$(BN)/ConvertMGGPOD \
$(BN)/ResponseToXSPEC \

MPI = $(BN)/bundler
MPI := $(BN)/bundler



MLIBS = -L$(LB) -lMimrecGui -lMimrec -lRevanGui -lRevan -lSivanGui -lSivan -lSpectralyzeGui -lSpectralyze -lGeomegaGui -lGeomega -lCommonMisc -lCommonGui
MLIBS := -L$(LB) -lMimrecGui -lMimrec -lRevanGui -lRevan -lSivanGui -lSivan -lSpectralyzeGui -lSpectralyze -lGeomegaGui -lGeomega -lCommonMisc -lCommonGui

EVERYTHING = $(PRGSX) $(FITS)
EVERYTHING := $(PRGSX) $(FITS)

#----------------------------------------------------------------
# Commands:
Expand Down
Loading

0 comments on commit 9190634

Please sign in to comment.