Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fluiddyn_papers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fluiddyn
fluiddyn_papers
Commits
cff3b62f
Commit
cff3b62f
authored
7 years ago
by
Pierre Augier
Browse files
Options
Downloads
Patches
Plain Diff
During exam inst. & turb.
parent
e58bf69c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fluiddyn/fluiddyn_paper.tex
+77
-40
77 additions, 40 deletions
fluiddyn/fluiddyn_paper.tex
with
77 additions
and
40 deletions
fluiddyn/fluiddyn_paper.tex
+
77
−
40
View file @
cff3b62f
...
...
@@ -108,13 +108,15 @@
\subsection*
{
Science, software, open-source and the computer revolution
}
Science is mainly a collective activity.
\href
{
https://en.wikipedia.org/wiki/
%
Standing
_
on
_
the
_
shoulders
_
of
_
giants
}{
``Standing on the shoulders of giants''
}
:
how to build new knowledge from the work of others. One important aspect is the
exchange ideas.
Science is mainly a collective activity. We can go further only by
\href
{
https://en.wikipedia.org/wiki/
%
Standing
_
on
_
the
_
shoulders
_
of
_
giants
}{
``standing on the shoulders of giants''
}
(and of a huge number of technicians and scientists). Science is a lot about
how to build new knowledge from the work of others so of course, one important
aspect is the exchange ideas.
These last decades, we have lived a revolution on how people exchange ideas.
Computers of all kinds (from smartphones to computer clusters) connected by a
world wide web are used for so many applications.
...
...
@@ -115,9 +117,10 @@
These last decades, we have lived a revolution on how people exchange ideas.
Computers of all kinds (from smartphones to computer clusters) connected by a
world wide web are used for so many applications.
A lot of money and work. Web represents approximately 5
\%
of GDP in USA! Many
companies, some very powerfull (Google, Facebook). Many companies base part of
A lot of money and therefore work. Only the web related activities represent
approximately 5
\%
of GDP in USA! Several companies, some very powerful (Google,
Facebook) and several other smaller and less known. Many companies base part of
their work on the open-source paradigm and use and contribute to open-source
...
...
@@ -123,3 +126,3 @@
their work on the open-source paradigm and use and contribute to open-source
languages, libraries, operating systems.
languages, libraries,
software,
operating systems.
%
...
...
@@ -125,7 +128,8 @@
%
Big changes in software engineering. Massive use of the open-source methods and
tools: distributed source management tools and web-based source development tools
(for example github and bitbucket).
This has lead to big changes in software engineering, with a massive use of the
open-source methods and tools: in particular distributed source management
tools and web-based source development tools (for example github and
bitbucket).
Increase computer power, in particular with GPU and increase knowledge
algorithms of artificial intelligence. Data science. Big boom. Even more money
...
...
@@ -135,12 +139,12 @@
Software and programming in science take a much bigger place than before.
Change the status of software. Before
programs were
sometimes badly
considered. A
mathematical demonstration has to be
included in a paper but not
a code. Now codes are at the
c
e
nt
er of research.
Change the status of software.
Before
coding was
sometimes badly
considered by
some scientists. It is thought that a
mathematical demonstration has to be
elegant and it is normal to included it in a paper. In
c
o
nt
rast it is normal
to write crapy code and to just use or show the result. Now codes tend to be
much more at the center of research.
Using the open-source methods and tools for science and sharing/collaborating
via the web: ``open-science''.
...
...
@@ -143,15 +147,8 @@
Using the open-source methods and tools for science and sharing/collaborating
via the web: ``open-science''.
One very important tool in recent open-source dynamics and in particular in
science: Python (see
\href
{
https://stackoverflow.blog/2017/09/06/
%
incredible-growth-python/
}{
this blog article
}
and
\href
{
https://spectrum.ieee.org/computing/software/
%
the-2017-top-programming-languages
}{
this analysis on the top programming
languages 2017
}
)
This paper presents Fluiddyn: a project to foster open-source in fluid
mechanics. Based on the language Python. The characteristics of Python make
possible the success of such project.
...
...
@@ -154,5 +151,12 @@
This paper presents Fluiddyn: a project to foster open-source in fluid
mechanics. Based on the language Python. The characteristics of Python make
possible the success of such project.
Python is a very important tool in recent open-source dynamics and in
particular in science: (see
\href
{
https://stackoverflow.blog/2017/09/06/
%
incredible-growth-python/
}{
this blog article
}
and
\href
{
https://spectrum.ieee.org/computing/software/
%
the-2017-top-programming-languages
}{
this analysis on the top programming
languages 2017
}
).
%
Python in fluid mechanics is growing fast but is still only weakly used. It is
...
...
@@ -158,5 +162,11 @@
Python in fluid mechanics is growing fast but is still only weakly used. It is
thus still necessary to present its characteristics.
thus still necessary to present its characteristics, what will be done in a
subsection of this introduction.
A scientific project based on the collaboration through open-source as FluidDyn
is possible only thanks to the recent developments in methods and tools for
Open-source software engineering. We start by presenting these developments and
discuss the implications for the scientists.
\subsection*
{
Methods and tools for Open-source software engineering
}
...
...
@@ -171,6 +181,6 @@
\textbf
{
Question and answer websites
}
(for example stackoverflow)
\subsection*
{
Python
}
\subsection*
{
Python
, a programming language adapted for open-science
}
The Python language has been design to boost the communication of technical
...
...
@@ -175,6 +185,6 @@
The Python language has been design to boost the communication of technical
ideas between humans. Thus,
i
t is a simple as possible
. Humans can focus on the
ideas. E
mphasizes code readability
ideas between humans. Thus, t
he code
is a
s
simple as possible
in particular to
e
mphasizes code readability
. Humans can focus on the ideas.
\begin{itemize}
...
...
@@ -179,8 +189,8 @@
\begin{itemize}
\item
The syntax is nice and elegant
\item
Blocks of code are defined with the
indentation.
\item
The syntax is nice and elegant
. Blocks of code are defined with the
indentation.
\item
Rules supporting the regularity of the code (pep8).
\item
Python is a dynamical language. Variables (names) not attached to an
object. Types of objects inferred from the code and in many situation not
written explicitly.
...
...
@@ -183,8 +193,11 @@
\item
Rules supporting the regularity of the code (pep8).
\item
Python is a dynamical language. Variables (names) not attached to an
object. Types of objects inferred from the code and in many situation not
written explicitly.
\item
Automatic memory management.
\item
Automatic memory management. The user do not have to handle by hand the
memory allocation and deallocation. There are of course ways to control the
memory usage of a program, though not as precise as for low-level languages.
\item
The standard way
\footnote
{
There are also tools to compile Python code
(usually via C or C++ code, for example Cython and Pythran).
}
to run a Python
code is to ``interpret'' it. A program called the interpreter executes
...
...
@@ -194,5 +207,7 @@
proper compilation: the code is not translated to optimized machine
instructions but only to Python bytecode.
%
We will discuss in the following the disadvantage of this characteristic.
We will discuss in the following the disadvantages of this characteristic. Two
evident advantages are the shorter development cycle and the possibility of
interactive workflow (usually with Ipython or Jupyter).
...
...
@@ -198,6 +213,9 @@
Note that there are many implementations of Python interpreter. The default and
most widely used implementation is written in C and is called CPython.
Note that there are many implementations of Python interpreters
\footnote
{
We can
site CPython (written in C), Jython (Java), IronPython (C#), PyPy (Rpython, a
subset of Python) and micropython, (C, targeted to micro-controllers).
}
. The
default and most widely used implementation is written in C and is called
CPython.
\end{itemize}
...
...
@@ -235,7 +253,7 @@
Therefore, Python is good for developers of all levels: very gentle for
beginners and very powerful for advanced users.
Old language (
very
first implementation in 1991!) but language in motion.
Old language (first implementation in 1991!) but language in motion.
\begin{itemize}
\item
A hard and controversial decision was taken to clean up Python from its
historical incoherence by having a new Python 3 backwards-incompatible versions
...
...
@@ -245,9 +263,9 @@
can now work only in Python 3. As a result,
\href
{
https://github.com/
%
numpy/numpy/blob/master/doc/neps/dropping-python2.7-proposal.rst
}{
next releases
of numpy will drop compatibility with Python 2
}
. Finally, the difficult
transition leads to very clean and coherent recent versions of
Python. One
should not used Python 2 for science anymore and instead
prefer the newer
versions (3.5 or 3.6 in 2018).
transition leads to very clean and coherent recent versions of
Python. Therefore, one
should not used Python 2 for science anymore and instead
prefer the newer
versions (3.5 or 3.6 in 2018).
\item
Adaptation to recent trend in computer science, with for example the
async.
...
...
@@ -321,7 +339,7 @@
vectorization as SIMD. Pythran understands both matlab-like vectorized code and
C-like code with explicit loops.
\textbf
{
JIT (
Just In Time) compilation.
}
Another way to obtain optimized
\textbf
{
Just In Time
(JIT
) compilation.
}
Another way to obtain optimized
machine instructions is by using JIT compilation, i.e. by compiling only the
critical code at run time.
%
...
...
@@ -347,8 +365,8 @@
\subparagraph
{
O
ther weakness of CPython is its multicore computational
\subparagraph
{
Ano
ther weakness of CPython is its multicore computational
parallelism.
}
See https://faster-cpython.readthedocs.io/cpython37.html
...
...
@@ -351,9 +369,12 @@
parallelism.
}
See https://faster-cpython.readthedocs.io/cpython37.html
Describe the GIL... Not only a problem... Also useful. But also a problem.
Describe the GIL... A lock preventing ... of threads which greatly simplify the
implementation of CPython. Also a problem: threads using the interpreter do not
use the CPU at the same time so it is not possible to use threads to do
multicore computational parallelism with pure python code.
Computational parallelism with the GIL: extensions (fine grain),
multiprocessing (coarse grain) and mpi.
...
...
@@ -356,7 +377,10 @@
Computational parallelism with the GIL: extensions (fine grain),
multiprocessing (coarse grain) and mpi.
Remark, Pypy also uses a GIL, while Jython and IronPython do not have this
limitation.
\subsubsection*
{
Conclusion: Python, a versatile Swiss Army Knife for the
scientists
}
...
...
@@ -385,7 +409,7 @@
Many other languages, in particular JavaScript, Java, Scala, Smalltalk, R,
Julia, Lua.
Recently, Go and Rust, ...
Recently, Go
(...)
and Rust
(...)
, ...
No ``one language to do everything''.
...
...
@@ -402,6 +426,16 @@
+ discussion on short-term and middle-term productivity... Quick and dirty
scripts can be efficient in the short term, but ...
We can other differentiate the productivity at different scales:
An individual can be very efficient with a particular tool but ...
A group can be efficient with a code but without exchange with other scientific
groups.
A community can be efficient to co-develop its tools.
\subsection*
{
Programming in the field of fluid mechanics
}
Fluid mechanics: experiments and in situ measurements, analytic computation,
...
...
@@ -423,6 +457,9 @@
Few people are aware of the vicious circle of the close-source model for the
community.
In such a model, a group pay for a license or a new development. It does not
learn how to do what have been paid.
It is just normal to rely on commercial companies and close-source software for
most of the new developments.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment