Compilation with gfortran: differenze tra le versioni
(20 revisioni intermedie di un utente non mostrate) | |||
Riga 3: | Riga 3: | ||
http://wiki.opentelemac.org/doku.php?id=installation_on_linux | http://wiki.opentelemac.org/doku.php?id=installation_on_linux | ||
− | create folder in opt | + | PREREQUISITES |
+ | |||
+ | This is the list of software that are mandatory to compile and run opentelemac: | ||
+ | |||
+ | 1) Python 2.7.0 | ||
+ | |||
+ | 2) Numpy 1.8.3 | ||
+ | |||
+ | 3) Gfortran 4.6.3 (minimun version) | ||
+ | |||
+ | 4) MPI libraries | ||
+ | |||
+ | 5) scipy | ||
+ | |||
+ | 6) matplotlib | ||
+ | |||
+ | PROCESS | ||
+ | |||
+ | create a folder in opt | ||
''mkdir opentelemac'' | ''mkdir opentelemac'' | ||
+ | |||
+ | download opentelemac file for the v7p3r1 version | ||
+ | |||
+ | '' svn checkout http://svn.opentelemac.org/svn/opentelemac/tags/v7p3r1/ '' | ||
+ | |||
+ | Use username = ot-svn-public , password = telemac1* | ||
+ | |||
+ | '' cd v7p3r1/optionals/metis-5.1.0 '' | ||
+ | |||
+ | '' cmake -D CMAKE_INSTALL_PREFIX=/opt/opentelemac/metis_installed . '' | ||
+ | '' make '' | ||
+ | '' make install '' | ||
+ | |||
+ | download hdf5-1.8.14 and enter in the source folder | ||
+ | |||
+ | '' ./configure --prefix=/opt/opentelemac/hdf5_installed '' | ||
+ | '' make '' | ||
+ | '' make install '' | ||
+ | enter the folder hdf5_installed | ||
+ | create a symbolic link to lib64 | ||
+ | |||
+ | '' ln -s lib64/ lib '' | ||
+ | |||
+ | download MED 3.2.0 and install MED | ||
+ | |||
+ | '' ./configure --with-hdf5=/opt/opentelemac/hdf5_installed --prefix=/opt/opentelemac/med_installed '' | ||
+ | '' make '' | ||
+ | '' make install '' | ||
+ | |||
+ | create the file ''pysource.sh'' in /opt/opentelemac/v7p3r1/configs | ||
+ | |||
+ | # This file is a template for a Linux environment file | ||
+ | # running "source pysource.template.sh" will position all | ||
+ | # the necessary environment variables for telemac | ||
+ | # To adapt to your installation replace word <word> by their local value | ||
+ | ### | ||
+ | ### TELEMAC settings ----------------------------------------------------------- | ||
+ | ### | ||
+ | # Path to telemac root dir | ||
+ | export HOMETEL=/opt/opentelemac/v7p3r1 | ||
+ | # Adding python scripts to PATH | ||
+ | export PATH=$HOMETEL/scripts/python27:.:$PATH | ||
+ | # Configuration file | ||
+ | export SYSTELCFG=$HOMETEL/configs/systel.cfg | ||
+ | # Name of the configuration to use | ||
+ | export USETELCFG=gfortranHPC | ||
+ | # Path to this file | ||
+ | export SOURCEFILE=$HOMETEL/configs/pysource.gfortranHPC.sh | ||
+ | ### Python | ||
+ | # To force python to flush its output | ||
+ | export PYTHONUNBUFFERED='true' | ||
+ | ### API | ||
+ | export PYTHONPATH=$HOMETEL/scripts/python27:$PYTHONPATH | ||
+ | export LD_LIBRARY_PATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$LD_LIBRARY_PATH | ||
+ | export PYTHONPATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$PYTHONPATH | ||
+ | ### | ||
+ | ### EXTERNAL LIBRARIES ----------------------------------------------------------- | ||
+ | ### | ||
+ | ### METIS ------------------------------------------------------------- | ||
+ | export METISHOME=/opt/opentelemac/metis_installed | ||
+ | ### HDF5 ------------------------------------------------------------- | ||
+ | export MEDHOME=/opt/opentelemac/hdf5_installed | ||
+ | export LD_LIBRARY_PATH=$HDF5HOME/lib:$LD_LIBRARY_PATH | ||
+ | ### MED ------------------------------------------------------------- | ||
+ | export MEDHOME=/opt/opentelemac/med_installed | ||
+ | export LD_LIBRARY_PATH=$MEDHOME/lib:$LD_LIBRARY_PATH | ||
+ | export PATH=$MEDHOME/bin:$PATH | ||
+ | |||
+ | create the file ''systel.cfg'' in /opt/opentelemac/v7p3r1/configs | ||
+ | |||
+ | # _____ _______________________________ | ||
+ | # ____/ TELEMAC Project Definitions /______________________________/ | ||
+ | # | ||
+ | [Configurations] | ||
+ | configs: gfortran gfortranHPC | ||
+ | # _____ ____________________________________ | ||
+ | # ____/ General /___________________________________/ | ||
+ | # Global declarations that are set by default for all the configurations | ||
+ | [general] | ||
+ | language: 2 | ||
+ | modules: system | ||
+ | version: v7p2r0 | ||
+ | # | ||
+ | sfx_zip: .zip | ||
+ | sfx_lib: .a | ||
+ | sfx_obj: .o | ||
+ | sfx_mod: .mod | ||
+ | sfx_exe: | ||
+ | # | ||
+ | # | ||
+ | val_root: /opt/opentelemac/v7p3r1/examples | ||
+ | # | ||
+ | val_rank: all | ||
+ | # | ||
+ | mods_all: -I <config> | ||
+ | # | ||
+ | incs_all: -I$MEDHOME/include | ||
+ | # | ||
+ | cmd_obj_c: gcc -c <srcName> -o <objName> | ||
+ | # | ||
+ | # _____ __________________________________ | ||
+ | # ____/ Calibre9 _________________________________/ | ||
+ | # | ||
+ | # Gfortran | ||
+ | # | ||
+ | [gfortran] | ||
+ | brief: Gfortran compiler 4.9.2 | ||
+ | # | ||
+ | cmd_obj: gfortran -c -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_VTK <mods> <incs> <f95name> -DHAVE_MED | ||
+ | cmd_lib: ar cru <libname> <objs> | ||
+ | cmd_exe: gfortran -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <exename> <objs> <libs> | ||
+ | # | ||
+ | # Gfortran HPC | ||
+ | # | ||
+ | [gfortranHPC] | ||
+ | brief: Gfortran compiler 4.9.2 with open_mpi for a debian 8 | ||
+ | # | ||
+ | mpi_cmdexec: mpirun -machinefile MPI_HOSTFILE -np <ncsize> <exename> | ||
+ | # | ||
+ | cmd_obj: mpif90 -c -cpp -fPIC -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_MPI -DHAVE_VTK <mods> <incs> <f95name> | ||
+ | cmd_lib: ar cru <libname> <objs> | ||
+ | cmd_exe: mpif90 -fPIC -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <exename> <objs> <libs> | ||
+ | # | ||
+ | libs_all: -L$METISHOME/lib -lmetis -L$HDF5HOME/lib -lhdf5 -L$MEDHOME/lib -lstdc++ -lz | ||
+ | |||
+ | COMPILE TELEMAC | ||
+ | |||
+ | '' source pysource.sh '' | ||
+ | '' config.py'' | ||
+ | '' compileTELEMAC.py '' | ||
+ | |||
+ | if at the end appears wrote ' My Work is done ' the command it worked properly. |
Versione attuale delle 14:54, 5 set 2018
This guide is written following this webpage:
http://wiki.opentelemac.org/doku.php?id=installation_on_linux
PREREQUISITES
This is the list of software that are mandatory to compile and run opentelemac:
1) Python 2.7.0
2) Numpy 1.8.3
3) Gfortran 4.6.3 (minimun version)
4) MPI libraries
5) scipy
6) matplotlib
PROCESS
create a folder in opt
mkdir opentelemac
download opentelemac file for the v7p3r1 version
svn checkout http://svn.opentelemac.org/svn/opentelemac/tags/v7p3r1/
Use username = ot-svn-public , password = telemac1*
cd v7p3r1/optionals/metis-5.1.0
cmake -D CMAKE_INSTALL_PREFIX=/opt/opentelemac/metis_installed . make make install
download hdf5-1.8.14 and enter in the source folder
./configure --prefix=/opt/opentelemac/hdf5_installed make make install
enter the folder hdf5_installed create a symbolic link to lib64
ln -s lib64/ lib
download MED 3.2.0 and install MED
./configure --with-hdf5=/opt/opentelemac/hdf5_installed --prefix=/opt/opentelemac/med_installed make make install
create the file pysource.sh in /opt/opentelemac/v7p3r1/configs
# This file is a template for a Linux environment file # running "source pysource.template.sh" will position all # the necessary environment variables for telemac # To adapt to your installation replace word <word> by their local value ### ### TELEMAC settings ----------------------------------------------------------- ### # Path to telemac root dir export HOMETEL=/opt/opentelemac/v7p3r1 # Adding python scripts to PATH export PATH=$HOMETEL/scripts/python27:.:$PATH # Configuration file export SYSTELCFG=$HOMETEL/configs/systel.cfg # Name of the configuration to use export USETELCFG=gfortranHPC # Path to this file export SOURCEFILE=$HOMETEL/configs/pysource.gfortranHPC.sh ### Python # To force python to flush its output export PYTHONUNBUFFERED='true' ### API export PYTHONPATH=$HOMETEL/scripts/python27:$PYTHONPATH export LD_LIBRARY_PATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$LD_LIBRARY_PATH export PYTHONPATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$PYTHONPATH ### ### EXTERNAL LIBRARIES ----------------------------------------------------------- ### ### METIS ------------------------------------------------------------- export METISHOME=/opt/opentelemac/metis_installed ### HDF5 ------------------------------------------------------------- export MEDHOME=/opt/opentelemac/hdf5_installed export LD_LIBRARY_PATH=$HDF5HOME/lib:$LD_LIBRARY_PATH ### MED ------------------------------------------------------------- export MEDHOME=/opt/opentelemac/med_installed export LD_LIBRARY_PATH=$MEDHOME/lib:$LD_LIBRARY_PATH export PATH=$MEDHOME/bin:$PATH
create the file systel.cfg in /opt/opentelemac/v7p3r1/configs
# _____ _______________________________ # ____/ TELEMAC Project Definitions /______________________________/ # [Configurations] configs: gfortran gfortranHPC # _____ ____________________________________ # ____/ General /___________________________________/ # Global declarations that are set by default for all the configurations [general] language: 2 modules: system version: v7p2r0 # sfx_zip: .zip sfx_lib: .a sfx_obj: .o sfx_mod: .mod sfx_exe: # # val_root: /opt/opentelemac/v7p3r1/examples # val_rank: all # mods_all: -I <config> # incs_all: -I$MEDHOME/include # cmd_obj_c: gcc -c <srcName> -o <objName> # # _____ __________________________________ # ____/ Calibre9 _________________________________/ # # Gfortran # [gfortran] brief: Gfortran compiler 4.9.2 # cmd_obj: gfortran -c -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_VTK <mods> <incs> <f95name> -DHAVE_MED cmd_lib: ar cru <libname> <objs> cmd_exe: gfortran -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <exename> <objs> <libs> # # Gfortran HPC # [gfortranHPC] brief: Gfortran compiler 4.9.2 with open_mpi for a debian 8 # mpi_cmdexec: mpirun -machinefile MPI_HOSTFILE -np <ncsize> <exename> # cmd_obj: mpif90 -c -cpp -fPIC -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_MPI -DHAVE_VTK <mods> <incs> <f95name> cmd_lib: ar cru <libname> <objs> cmd_exe: mpif90 -fPIC -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <exename> <objs> <libs> # libs_all: -L$METISHOME/lib -lmetis -L$HDF5HOME/lib -lhdf5 -L$MEDHOME/lib -lstdc++ -lz
COMPILE TELEMAC
source pysource.sh config.py compileTELEMAC.py
if at the end appears wrote ' My Work is done ' the command it worked properly.