Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xavier Garrido
CAMEL
Commits
36a94e63
Commit
36a94e63
authored
Jun 01, 2018
by
Matthieu Tristram
Browse files
Merge branch 'master' of
https://gitlab.in2p3.fr/cosmotools/CAMEL
Conflicts: cmt/requirements-icc
parents
c4e81efd
5c880e4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
149 additions
and
0 deletions
+149
-0
cmt/requirements-lsst
cmt/requirements-lsst
+3
-0
work/batch/cc/Minimize5.sh
work/batch/cc/Minimize5.sh
+146
-0
No files found.
cmt/requirements-lsst
View file @
36a94e63
...
...
@@ -5,6 +5,7 @@ use class *
#
compiler
options
macro
cpp
"icpc"
macro
cppflags
" -O2 -ip -ansi_alias -align -Wbrief -Wdeprecated -Wuninitialized -align -Wbrief -Wunused-function -Wpointer-arith -Wreturn-type"
macro_append
cppflags
" -g "
#
CAMEL
includes
include_dirs
" $(CAMELROOT)/src"
...
...
@@ -27,6 +28,8 @@ application test_jla -group=test -s=$(CAMELROOT)/src/camel test/test_jla.cc
#
include_dirs
"$(CLIKDIR)/include"
#
macro_append
CAMEL_linkopts
" -L$(CLIKDIR)/lib -lcfitsio "
#
include_dirs
"$(CFITSIODIR)/include"
#
macro_append
CAMEL_linkopts
" -L$(CFITSIODIR)/lib -lcfitsio "
include_dirs
"/usr/include/cfitsio"
macro_append
CAMEL_linkopts
" -lcfitsio "
#
PLANCK
...
...
work/batch/cc/Minimize5.sh
0 → 100755
View file @
36a94e63
#!/bin/bash
#script to embed Minimize executable in batch at cc-in2p3
#optionally you can pecify a range for runs with different starting points (as "1-5" for 5 points)
#arguments
nargs
=
$#
if
!
[
$nargs
-eq
1
-o
$nargs
-eq
2
]
;
then
echo
"usage: Minimize.sh parFile (range) "
echo
"the optional
\"
range
\"
parameter can be used to specify different starting points "
echo
"It must be given in the form: begin-end (eg. 1-5 for jobs 1 to 5)"
echo
"Job 1 corresponding to not changing the parFile starting values, while other values"
echo
"will send jobs shuffling the parameters randomly within the min-max bounds of the parFile"
exit
fi
parFile
=
$1
range
=
"1-1"
if
[
$#
-eq
2
]
;
then
range
=
$2
fi
#default is running on 8 cores.
#if you wish to change it, set the environment variable NCORES to another value.
if
[
-z
"
$NCORES
"
]
;
then
NCORES
=
8
fi
##some checks
if
[
-z
"
${
CAMELROOT
}
"
]
;
then
echo
"CAMELROOT undefined: did you sourced camel_setup.sh?"
exit
fi
if
[
-z
"
$CLIKDIR
"
]
;
then
echo
"miss CLIKDIR"
fi
if
!
[
-f
$CAMELROOT
/
$CMTCONFIG
/Minimize
]
;
then
echo
"missing Minimize executable: rum make exec in cmt/"
fi
file
=
$(
readlink
-e
$parFile
)
if
[
!
-f
"
$file
"
]
;
then
echo
"no parfile=
$file
"
exit
fi
parbase
=
$(
basename
$file
)
dirout
=
${
parbase
%
".par"
}
_
"min"
OUTDIR
=
$PWD
/
$dirout
if
[
-d
"
$dirout
"
]
;
then
echo
"Output directory
$dirout
already exists: still want to run? (y/n)"
read
answer
if
[
$answer
!=
'y'
]
;
then
echo
"exiting"
exit
1
fi
else
mkdir
$dirout
fi
#
cd
$OUTDIR
###################################################
cat
>
camelrun
<<
EOBATCH
#!/bin/bash
cd
\$
TMPDIR
uname -a
echo "NSLOTS=
\$
NSLOTS"
source /sps/lsst/Library/CMT/v1r26/mgr/setup.sh
#mes compilos
source /usr/local/shared/bin/gcc_env.sh 5.2.0
COMPILERVARS_ARCHITECTURE=intel64
COMPILERVARS_PLATFORM=linux
source /usr/local/intel/icc/bin/iccvars.sh
gcc --version | grep gcc
icc --version | grep icc
# copies localeS
cp
$CAMELROOT
/
\$
CMTCONFIG/Minimize .
cp
$CAMELROOT
/work/tools/awk/genrand.awk .
#
#input file
# enleve lo:w-l
cp
$file
parfile_in
echo "init par:"
cat parfile_in
#================================
#randomize si id ne 1
#================================
echo "***************************************************************"
if [
\$
{SGE_TASK_ID} -eq 1 ] ; then
cp parfile_in parfile
else
RANDOM=
\$
{SGE_TASK_ID}
awk -v seed=
\$
RANDOM -f genrand.awk parfile_in > parfile
fi
cp parfile
$OUTDIR
/camel
\$
{SGE_TASK_ID}.par
echo "***************************************************************"
#================================
# Camel run
#================================
export PYTHONPATH="
${
PICO_CODE
}
"
export OMP_NUM_THREADS=
$NCORES
./Minimize parfile bestfit covmat
cp -f bestfit
$OUTDIR
/best_fit
\$
{SGE_TASK_ID}
cp -f covmat
$OUTDIR
/covmat
\$
{SGE_TASK_ID}.dat
EOBATCH
##############################################################################################
if
[
-z
"
${
QSUB_CMD
}
"
]
;
then
QSUB_CMD
=
"qsub -P P_
$GROUP
-pe multicores
$NCORES
-q mc_long -R y -j y -l sps=1,os=
\"
sl6|cl7
\"
"
fi
jobsub
=
"
${
QSUB_CMD
}
-o
$PWD
-N
$(
basename
$dirout
)
-t
$range
camelrun"
echo
"about to run :
$jobsub
"
echo
"OK? [y/n]"
read
answer
if
[
$answer
!=
'y'
]
;
then
echo
"exiting"
exit
1
fi
eval
$jobsub
echo
">>>> Ouptuts in:
$OUTDIR
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment