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
IPSL
LMD
InTro
RoutingPP
Commits
25ee3399
Commit
25ee3399
authored
May 10, 2020
by
POLCHER Jan
🚴🏾
Browse files
Commented debug and boundary-check options for F90 compilation.
Prepared Environment for IDRIS.
parent
32b2f261
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
31 deletions
+68
-31
Environment
Environment
+66
-29
F90subroutines/Makefile
F90subroutines/Makefile
+2
-2
No files found.
Environment
View file @
25ee3399
...
...
@@ -14,15 +14,19 @@
# Functions
#
function
hasanaconda
(){
condahost
=
"camelot climserv ciclad"
h
=
$(
hostname
)
res
=
1
for
ch
in
${
condahost
}
;
do
if
[
$(
echo
$h
|
grep
${
ch
}
|
wc
-c
)
!=
"0"
]
;
then
res
=
0
fi
done
return
$res
ipsl
=
"ipsl camelot climserv ciclad"
idris
=
"idris jean-zay"
h
=
$(
hostname
-d
)
if
[[
"
$h
"
==
*
"ipsl"
*
]]
;
then
echo
"IPSL"
eval
"
$1
='ipsl'"
elif
[[
"
$h
"
==
*
"idris"
*
]]
;
then
echo
"IDRIS"
eval
"
$1
='idris'"
else
echo
"unknown :
$h
"
eval
"
$1
='unknown'"
fi
}
function
checkenv
(){
rm
-f
checkenv.py
...
...
@@ -48,30 +52,63 @@ EOF
#
# Main
#
if
(
hasanaconda
)
;
then
loc
=
''
hasanaconda loc
if
[
loc
!=
"unknown"
]
;
then
#
# Make sure the right version of Python
#
module unload python
module load python/3.6-anaconda50
#
# Test if the MPI environment is installed.
#
if
[
!
-e
${
HOME
}
/.conda/envs/MPI
]
;
then
#
# Create the MPI environment as it does not exist.
#
conda create
-y
-n
MPI mpi4py numba astropy netcdf4 matplotlib basemap ConfigParser
source
activate MPI
conda
install
-y
cartopy
conda
install
-y
--channel
astropy spherical-geometry
fi
#
# Activate the MPI environment
#
source
activate MPI
case
$loc
in
"ipsl"
)
module unload python
module load python/3.6-anaconda50
#
# Test if the MPI environment is installed.
#
if
[
!
-e
${
HOME
}
/.conda/envs/MPI
]
;
then
#
# Create the MPI environment as it does not exist.
#
conda create
-y
-n
MPI mpi4py numba astropy netcdf4 matplotlib basemap ConfigParser
source
activate MPI
conda
install
-y
cartopy
conda
install
-y
--channel
astropy spherical-geometry
else
source
activate MPI
fi
;;
"idris"
)
module load python/3.7.3
if
[[
-L
${
HOME
}
/.conda
&&
-d
${
HOME
}
/.conda
]]
;
then
if
[
!
-e
${
WORK
}
/.conda/envs/MPI
]
;
then
conda create
-y
-n
MPI mpi4py numba astropy netcdf4 matplotlib basemap ConfigParser cartopy
conda activate MPI
if
[[
-L
${
HOME
}
/.local
&&
-d
${
HOME
}
/.local
]]
;
then
export
PYTHONUSERBASE
=
$WORK
/.local
if
[
$(
find
$PYTHONUSERBASE
-name
spherical_geometry
-ls
|
wc
-l
)
-le
0
]
;
then
git clone https://github.com/spacetelescope/spherical_geometry.git
cd
spherical_geometry
python setup.py
install
--user
fi
else
echo
"Make sure
\$
HOME/.link is a link to your
\$
WORK/.local"
fi
else
conda activate MPI
fi
else
echo
"Make sure
\$
HOME/.conda is a link to your
\$
WORK/.conda"
fi
;;
*
)
echo
"Environment for
$loc
is not foreseen yet"
exit
;;
esac
fi
#
# Verify we can load all the needed modules.
#
#
checkenv
F90subroutines/Makefile
View file @
25ee3399
...
...
@@ -4,10 +4,10 @@ obj = defprec.o ioipsl.o constantes_var.o haversine.o grid.o routing_reg.o routi
#
FC
=
gfortran
FFLAG
=
-fPIC
FDBG
=
-g
-fbounds-check
#
FDBG = -g -fbounds-check
#
FPY
=
f2py
PDBG
=
--debug
#
PDBG = --debug
#
all
:
routing_interface.so
...
...
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