Codebase list freefem++ / upstream/3.19.1
upstream/3.19.1

Tree @upstream/3.19.1 (Download .tar.gz)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
Compilation of FreeFem++ under unix, MacOs X or mingw  (Windows)
and bamg (mesh generator)
----------------------------------------------------------------

New:  Test version 3.9  F. Hecht & J. Morice July  2010.

Try to downlaod and compile (add --enable-download flags to configure)
 lot of related  sofware, (Please read the licence of all with software,
if you use freefee++ for commercial purpose) 

tetgen superlu fftw metis yams mshmet MUMPS
blacs parmetis œôøè�Òscalapack scotch superludist MUMPS pastix hypre hips 

For the link with mmg3d software put the tar.gz archive in .../dowload/pgk directory.

Remark, you can alsy copy all the donwload file in ../dowload/pgk if you have not internet connection.

Brochet-2:download hecht$ ls -1 pkg/*
MBA-de-FH:download hecht$ ls -1 pkg/*
pkg/Ipopt-3.10.2.tgz
pkg/MUMPS_4.10.0.tar.gz
pkg/ParMetis-3.1.1.tar.gz
pkg/SuiteSparse-2.4.0.tar.gz
pkg/arpack96.tar.gz
pkg/blacstester.tgz
pkg/fftw-3.2.1.tar.gz
pkg/freeyams.2012.02.05.tgz
pkg/gmm-4.1.tar.gz
pkg/hips-1.2b-rc4.tar.gz
pkg/metis-4.0.tar.gz
pkg/mmg3d4.0.tgz
pkg/mpiblacs-patch03.tgz
pkg/mpiblacs.tgz
pkg/mshmet.2011.03.06.tgz
pkg/nlopt-2.2.4.tar.gz
pkg/pARMS_2.2.tar.gz
pkg/pastix_release_2200.tar.bz2
pkg/patch.tar.gz
pkg/scalapack-1.8.0.tgz
pkg/scotch_5.1.6_esmumps.tar.gz
pkg/superlu_4.0.tar.gz
pkg/superlu_dist_2.3.tar.gz
pkg/tetgen1.4.3.tar.gz
MBA-de-FH:download hecht$ 
 
TO simplify the link and compilation part, 

I have add 3 files
examples++-load/WHERE_LIBRARY		
examples++-load/WHERE_LIBRARY-download
examples++-load/WHERE_LIBRARY-config

On my mac I have install gsl with MacPorts 
MBA-de-FH:~ hecht$ more work/ff++/examples++-load/WHERE_LIBRARY
gsl LD -L/opt/local/lib/ -lgsl
gsl INCLUDE  -I/opt/local/include/
MBA-de-FH:~ hecht$ 


the files 
examples++-load/WHERE_LIBRARY-config
examples++-load/WHERE_LIBRARY-download
are restectively created with ./configure commande ,
the compilation of all downlaod software.
and the  examples++-load/Makefile.


The use of commande compile with search of include and lib. 
../exemples++-load/ff-cc++ -auto MUMPS_FreeFem.cpp
compile a do all the link edition for MUMPS freefem++ interface.

Brochet-2:examples++-mpi hecht$ make MUMPS_FreeFem.dylib
../examples++-load//ff-c++ -auto  MUMPS_FreeFem.cpp 
.. 

we just add  the 2 lines  in MUMPS_FreeFem.cpp
//ff-c++-LIBRARY-dep:  mumps parmetis ptscotch  scalapack blacs blas  mpifc  fc  pthread 
//ff-c++-cpp-dep: 




*  to today the ide  version is  currently available
	you can get  from http://www.ann.jussieu.fr/~lehyaric/ffcs/index.htm


Old Remark (May be obsolete)
     *  the graphique is now base of Open/Glut lib.
     *  IN CASE  of problem under UBUNTU/GLUT  (no graphics window tilte: (march 2009) 
        they are a know bug with compiz package so  try
	To disable/enable it graphically, install the compiz-swith package with synatic. Or try this in command line:
	killall compiz.real && killall compiz && metacity --replace --display :0 & 

F. Hecht.
-


For debian, ubuntu, MacOS, Windows  see the the prerequisite

installed packages before configuration and compilatation.

This file details specific configuration details for FreeFem++. For
a standard installation, please refer to the file named "INSTALL".

annd see the end of this file to have some 
configure example:

Full version 3d need automatic download option
----------------------------------
For a Full 3d  version , some external piece of software
can by usefull, the simplest wait is to add "--enable-download"
to the "./configure" (need of  "wget" or "curl" unix  command). 
The download archive are store in : 
download/pkg/SuiteSparse-2.4.0.tar.gz  # umpack 
download/pkg/arpack96.tar.gz           # arpack
download/pkg/f2c.tar                   # f2c if no fortran 77
download/pkg/fftw-3.2.1.tar.gz         # fft
download/pkg/patch.tar.gz              # arpack
download/pkg/superlu_3.1.tar.gz        # superlu
download/pkg/tetgen1.4.2.tar.gz        # tetgen
download/blas/cblas.tgz                # blas 
if you have not internet access juste copie this files at the same  place.


Debugging and optimization
--------------------------

Without any option, "./configure" selects the best optimization
options for the local machine. To produce optimized binaries that can
be ported to other machines, add the option "--enable-generic".


To produce FreeFem++ programs containing debugging symbols and no
optimization, use "--enable-debug".

If you need to add specific flags to the ones that ./configure
chooses, just define the corresponding automake variable before
running configure. For instance, to add flag "-x" to C++ compilations,
say:

> CXXFLAGS=-x ./configure

Other useful configuration variables include:
- CFLAGS for C compilation
- FFLAGS for Fortran compilation
- LIBS libraries for the linking stage
- LDFLAGS linking flags
- LDADD extra options for the linking stage
- F77  the fortran compile (if not fortran is installed  see section NOFORTRAN)
- FC   the fortran 90 compiler 
- CC  the cc compiler
- CXX the c++ compiler


Linear algebra libraries and eigen value problem
-----------------------------------------------
By default, "./configure" looks for the X11, BLAS, ARPACK and UMFPACK, OpenGL, GLUT
libraries on the local system.
ARPACK is use to compute eigenvalue.
and UMFPACK is a new fast sparse linear solver.

 If configure cannot find the libraries
by itself, you can specify the full path to a library file (ending
with ".a") or the options use by the linker (ex: "-L/usr/local/lib -lblas")
with the following options:

--with-blas="blas linker options"  
--with-arpack="arpack linker options"
--with-amd="amd linker options"
--with-umfpack="umfpack linker options"

Or, if the configuration flag "--enable-download" is specified, the
compilation step ("make") will try to download the missing libraries
(from their official websites) and compile them.

Remark, under linux or window the simplest way to get
a not to bad version is
./configure --enable-download 

Here are the different versions of FreeFem++ produced by one
compilation (some versions may be missing if your system does not
support them):

* FreeFem++: standard version (using X11 graphics on Linux and MacOS
  10, Win32 on Windows and  MacOS X) (located in src/std)

* FreeFem++-nw: without graphics (located in src/nw)

* FreeFem++: graphics based on OpenGL (located in src/nw)
* ffglut: the graphic tools

* FreeFem++-mpi: parallel version, without graphics (located in src/mpi)

The compilation procedure (produced with automake) builds all the
libraries and executables sequentially. Running "make" in a
subdirectory does not rebuild dependencies in other directories.

The compilation has been tested under linux and MacOs/Darwin with g++
version  3.3. 4.0 4.4 It take 30 mn to compile all on
my PowerBook G4 1Mhz 1024MB.

Rebuilding "configure"
------------------------

Developers of FreeFem++ can rebuild the configuration system using
Automake and Autoconf with the command:

> autoreconf
# to reconfigure with the same parameter 
> ./reconfigure 

Extra utilities
---------------

To run an interactive test of FreeFem++:
> make visualcheck

To run a speed test:
> make speedtest

To create the documentation in .ps and .pdf format (in the "DOC" directory):
> make documentation

Examples
--------

All the Examples are in the two directories examples++ and
examples++-tutorial. The suffix is .edp ("equations aux derivees
partielles" in French)

To test all the examples under unix: 

> cd examples++; ../src/std/FreeFem++ all.edp
> cd examples++-tutorial; ../src/std/FreeFem++ all.edp

To try the  dynamic linking loader example: 
remark: some adaptation must be done with the suffix probleme (.dll, .so, .dylib )
and directory  to seach dynamic lib  (shell variable LD_LIBRARY_PATH)
 

warning under  Window XP,  first install the cygwin environnent (see http://www.cygwin.com)
> cd example++-load build a dll file with the following shell script:
> ./ff-c++  myfunction.cpp  

to execute the examples try  
  under window xp
 FreeFem++-nw  load.edp 
  or otherwise 
 ../src/nw/FreeFem++-nw load.edp



-- FreeFem++ v1.38 (date Tue Feb 10 12:04:30 CET 2004)
 file : load.edp
 Load: lg_fem  --  no UMFPACK => replace UMFPACK  by LU  
lg_mesh eigenvalue 
 load "myfunction" lood: myfunction 
load: dlopen(./myfunction.so) = 0x84be700

    1 :  mesh Th=square(5,5);
    2 :  fespace Vh(Th,P1);
    3 :  Vh uh=myfunction(); // warning  do not forget () 
    4 :  cout << uh[].min << " " << uh[].max << endl;
    5 : 
    6 : 
    7 :  sizestack + 1024 =1224  ( 200 )
----------CheckPtr:-----init execution ------ NbUndelPtr  996  Alloc: 79131  NbPtr 1011 

   Nb of edges on Mortars  = 0
   Nb of edges on Boundary = 20, neb = 20
 Nb Of Nodes = 36
 Nb of DF = 36
0 0.841471
times: compile 0.01s, execution -2.0837e-19s
----------CheckPtr:-----end execution -- ------ NbUndelPtr  996  Alloc: 79131  NbPtr 1048 
Bien: On a fini Normalement
                CheckPtr:Nb of undelete pointer is 995 last 101
                CheckPtr:Max Memory used     93.672 kbytes  Memory undelete 78619 

Note 1: if this does not work, please check the manual page of dlopen
for your system.


Note 2. Fast fourier exemple ( FFT )  is in dfft.edp  file
need of fftw3 


Some configure flags use to build the current version
-----------------------------------------------------

*  Under Debian: ( 2008)
----------------
  the installed packages + dependance are:   

  gcc g++ g77
  libsuitesparse-dev
  libarpack2-dev
  libx11-dev libxt-dev libxext-dev
  patch
  wget
  freeglut3-dev
 - bluid the parallel version
   openmpi-dev openmpi

 - to rebuild de documentation:  
  imagemagick 
  tetex-base   tetex-bin  tetex-extra 

 ./configure 
  make 
  make check    (to test de version)
  make install  (under root)
   
*  Under Ubuntu (2008)
---------------
  the installed packages + dependance are:   
   gcc g++  g77
   wget 
   m4 bison flex patch
   libzip-dev
   libx11-dev libxt-dev libxext-dev 
    libxpm4 libxpm4-dbg 
    libsuitesparse-dev libarpack2-devlibarpack2 libarpack2-dev
    libfltk1.1 libfltk1.1-dbg libfltk1.1-dev
    libopenmpi1 libopenmpi-dev
    libopenmpi-dbg libxpm-dev 
    freeglut3 freeglut3-dev
    libx11-dev  libxt-dev  libxext-dev 
    libglut3-dev	
 - bluid the parallel version
    openmpi-dev openmpi
 - to rebuild de documentation:  
    imagemagick 
    tetex-base   tetex-bin  tetex-extra 
 

 ./configure --enable-download  --with-mpi=mpic++
#  utility of parameter:
#  --enable-download :  for fft and tetgen ... 
#  --with-mpi=mpic++ : for mpi version 
  make 
  make check    (to test de version)
  make install  (under root)
  


* Under Red Hat Enterprise Linux AS release 3:
----------------------------------------------
the following rpm:
blas-3.0-20 gcc-3.2.3-53 tetex-1.0.7-67.9 lapack-3.0-20 ImageMagick-5.5.6-15 wget-1.10.2-0.30E curl-7.10.6-7.rhel3
are install
./configure  '--enable-download' '--with-blas=-lblas -llapack'


* Under MacOs: (2010)  snow leopard
-------------
 
 1) intall Apple's Developer Tools from de Apple DVD
    Warning the default compile is now 64 bits, 
 2) install g95  fortron (to have a fortran  64 bits by default)
        install macport  from http://www.macports.org/
        sudo port install g95

     or add flags   -m64  to the fortran command (not tested).
	cd download/f2c
	make install-10.6
 3)  recompile openmpi with the use of g95  

   './configure'  'FC=/opt/local/bin/g95' 'F77=/opt/local/bin/g95' 
     make 
    sudo make install

 4) TeXLive-teTeX Current Release in http://www.ctan.org/tex-archive/systems/mac/mactex/


./configure '-with-suffix=snow-leopard'  '--enable-download' 'build_alias=snow-leopard' 'host_alias=snow-leopard' 'target_alias=snow-leopard' 'F77=/opt/local/bin/g95' '-with-mpi=/usr/local/bin/mpic++' '--enable-m64' 'FLIBS=/opt/local/lib/g95/x86_64-apple-darwin10/4.2.4/libf95.a' 'MPIF77=/usr/local/bin/mpif77' 'MPICC=/usr/local/bin/mpicc' 'MPIFC=/usr/local/bin/mpif90'

* Under MacOC macIntel 
----------------------
  1) install Apple's Developer Tools
  2) install do the NOFORTRAN section. 
  3) install the TexMac for the documentation:
 http://ctan.org/get/systems/mac/mactex/MacTeX-20071201.dmg

# to build a full  freefem++  for your Mac:
first install g95, and recompile openmpi (little tricky)

./configure '-with-suffix=snow-leopard' '-without-fltk' '--enable-download' 'F77=/opt/local/bin/g95' '-with-mpi=/usr/local/bin/mpic++' '--enable-m64' 'FLIBS=/opt/local/lib/g95/x86_64-apple-darwin10/4.2.4/libf95.a' 'MPIF77=/usr/local/bin/mpif77' 'MPICC=/usr/local/bin/mpicc' 'MPIFC=/usr/local/bin/mpif90'


./configure -without-fltk' '--enable-download' '-with-mpi=mpic++' 'F77=fort77' '--with-flib=-L/usr/local/lib -lf2c'

or if you have compile the download/f2c   with : (cd download/f2c;make install)

./configure '-with-suffix' 'MacIntel'  '--enable-download' '-with-mpi=mpic++' '-enable-download' 

# to build universal FreeFem++ of 10.4 macOS (ppc , i386):
( cd  download/f2c; make  -n compile-10.4 install)
./configure '-with-suffix=Universal' '-without-fltk' '--enable-download' 'F77=/Users/hecht/ff/ff-univ/download/bin/fort77' '--with-flib=/Users/hecht/ff/ff-univ/download/lib/libf2c.a' 'CXX=g++-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4' 'CC=gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4' 'FFLAGS=-Wc,-isysroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,ppc,-arch,i386,-mmacosx-version-min=10.4' 'CXXCPP=g++ -E' '--disable-dependency-tracking' '--x-libraries=/usr/X11R6/lib/'



* Under Windows: 
----------------
see the end of README_WINDOW  files 

* NOFORTRAN:
------------
You have not fortran compiler use f2c and the use the  script fort77
by the way just do:
cd  download/f2c
# to build and install fort77,  linf2c.a in download/bin  download/lib
make install
# to install in /usr/local/
make install-sudo

# to build and universal f2c library on MacOS 10.4 and install in /usr/local/bin  /usr/local/lib
# and in download/bin  download/lib download/bin  download/include
#    32/ 64   bits architecture on    intel and ppc
make -n install-10.4 

for the 64 on intel   version 10.6 (SDK)
make -n install-10.6