Welcome, Guest
Username: Password: Remember me

TOPIC: installation of TELEMAC v6.0 on MAC OS

installation of TELEMAC v6.0 on MAC OS 13 years 9 months ago #1134

  • cmitsis
  • cmitsis's Avatar
Hello,

are there any suggestions on installing TELEMAC on MAC OS with openmpi and gcc. Hostype as requested on systel.ini would be different based that mac os are built on darwin10-64
The topic has been locked.

Re:installation of TELEMAC v6.0 on MAC OS 13 years 9 months ago #1136

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi

As I know, there is no already build configuration file for Mac OS.
You should build your own bloc, in a similar way of the others.
read carefully the document dealing with compiling Telemac on Linux/Unix/Windows system, it could give you some ideas on own to create the configuration.

regards
Christophe
The topic has been locked.

Re:installation of TELEMAC v6.0 on MAC OS 13 years 9 months ago #1149

  • cmitsis
  • cmitsis's Avatar
Installation notes of TELEMAC 2D v6.0 on MAC OS 10.6.6 using openmpi and gfortran or/and gcc.

Issues resolved:
MPI on Mac OS is not configured with mpif90.
Download source files or binaries of openmpi, gfortran and gcc in order to compile openmpi. (ex hpc.sourceforge.net/)
Remember to have the paths added to your $PATH if not installed there by default
/usr/bin for example.
man gcc or man gfortran would suffice to confirm that

Use a different directory than the default MPI on mac os in order to avoid conflicts.
(I use /opt/openmpi)
After gunzip and tar on your desired directories you need to configure openMPI

./configure --prefix=<your openmpi dir> F77=gfortran FC=gfortran CF=gcc CXX=gcc FFLAGS=-m64 FCLAGS=-m64 CFLAGS=-m64 CXXLAGS=-m64

You need to alter the flags of f77 and f90 because by default are set to 32 bit wile the C and C++ at gcc compiler at set to 64 bit (at least at my version).

Next,

make
sudo make install

should do the trick.

Install TELEMAC 2D v6.0

Configure paths as described at the installation procedure for unix linux systems.

Better to create a .bashrc file at ~/ (home directory), edit it by adding the desired paths
export PATH=<TELEMAC_HOME>/bin:$PATH
export $SYSTELCFG=< TELEMAC_HOME>/config

(I changed the name from configlinux to config)

Add the following line to ~./bash_profile

-r ~/.bashrc && . ~/.bashrc

.bashrc is a purely interactive shell while .bash_profile a login one.

Editing the systel.ini file
I attach here my systel.ini file in order to avoid being over descriptive.

[GENERAL]
#
#
Parameterising version + language
#
# for every program in the system:
#
# - LNGXXX (language 1: French 2: English)
# - VERSXXX (version)
#
#---TELEMAC2D
LNGTEL=2
VERSTEL=v6p0
#---TELEMAC3D
LNGTEL3D=2
VERSTEL3D=v6p0
#---STBTEL
LNGSTB=2
VERSSTB=v6p0
#---POSTEL3D
LNGPOSTE=2
VERSPOSTE=v6p0
#---ARTEMIS
LNGARTE=2
VERSARTE=v6p0
#---SISYPHE
LNGSISY=2
VERSSISY=v6p0
#---TOMAWAC
LNGTOMA=2
VERSTOMA=v6p0
#---ESTEL2D
LNGESTEL2=2
VERSESTEL2=v6p0
#---ESTEL3D
LNGESTEL3=2
VERSESTEL3=v6p0
#---SPARTACUS2D
LNGSPA=2
VERSSPA=v6p0
#
#
Directory: where the Telemac system is installed
#
PROJECT=/Volumes/CFD/TELEMAC
#
#
Platform: namely a combination machine+compiler
#
HOSTTYPE=gfortran
#
#
Perl : paths to interpreter (bin) and modules (lib)
#
[PERL]
PERLPATH=/usr/bin
PERL5LIB=/usr/lib
#
#-VERSION-6.0
Configs
#
# The compiling command will be:
#
# Compil : $FC $FC_OPT_OTHERS [$FC_OPT_COMPIL,$FC_OPT_DEBUG,$FC_OPT_PROFILE]
#
# The link command will be:
#
# Link : $LK $LK_OPT_OTHERS [$LK_OPT_DEBUG] [$LK_OPT_PROFILE] $LK_OPT_OUTNAME
#
# Note: the standard for binary files is BIG_ENDIAN on all machines
# this is the standard of all examples provided.
#
#
# Now a series of configurations of different platforms. Change HOSTTYPE above
# to switch on an already existing one, or write a new section for a new
# platform. Sections start with [name_of_HOSTTYPE] and end with #_END
#
#
#
#
#
Mac OS with GFORTRAN + MPICH
[gfortran]
DIRLIB=gfortran
# Options du compilateur GNU
FC_NAM="gfortran"
FC_OPT_OBJEXT="o"
FC_OPT_COMPIL=" -c -O3 -fconvert=big-endian -frecord-marker=4"
FC_OPT_DEBUG=" -c "
FC_OPT_PROFILE=" -O3 -c "
FC_OPT_INCLUDE="-I "
FC_OPT_OTHERS=" "
#
LK_NAM="gfortran"
LK_OPT_NORMAL=" -fconvert=big-endian -frecord-marker=4 -v -lm -lz -lstdc++ "
LK_OPT_OUTNAME=" -o "
LK_OPT_DEBUG=" "
LK_OPT_PROFILE=" -pg "
LK_OPT_OTHERS=" "
#IF MED AND HDF5
#LK_LIB_SPECIAL=" <TELEMAC_HOME>/MED/<DIRLIB>/lib/libmed.a <TELEMAC_HOME>/HDF5/<DIRLIB>/lib/libhdf5.a "
#
LIB_NAM=ar
LIB_OPT_LIBEXT="a"
LIB_OPT_OUTNAME="cru"
LIB_OPT_OTHERS=
LIB_RANLIB="ranlib"
#
RUN_DEBUG="gdb "
RUN_PROFILE=
# in Telemac distribution
FC_MPI="/opt/openmpi/bin/mpif90 "
LK_MPI="/opt/openmpi/bin/mpif90 -o <EXE> <OBJS> -Xlinker --start-group <LIBS> --end-group"
LIBS_MPI="-L /opt/openmpi/lib -lmpich -lpthread -lstdc++ -lz "
RUN_MPI="/opt/openmpi/bin/mpirun -machinefile mpirun.txt -np <N> <EXE>"
#
#
#
# IF YOU WANT TO USE ARTEMIS// PLEASE UNCOMMENT INCDIRMUMPS AND LIBSMUMPSPAR
#
# 1 FILL BELOW THE LOCATION OF YOUR MUMPS INCLUDE DIRECTORY (INCDIRMUMPS =...)
#INCDIRMUMPS = <TELEMAC_HOME>/MUMPS_4.9.0/include
#LIBMUMPSPAR="to be filled, example under intel_64_10"
#LIBMUMPSSEQ="<TELEMAC_HOME>/mumpsvoid/mumpsvoid_<VERSARTE>/<HOSTTYPE>/mumpsvoid<VERSARTE>.a"
#
#
#
# IF YOU DO NOT WANT USE ARTEMIS// MUMPS LIBRARY IS NOT NECESSARILY
#
# SO UNCOMMENT THE FOLLOWING STATEMENT AND WRITE THE LOCATION OF MUMPSVOID_<VERSARTE>.A LIBRARY
#
# SHOULD BE <PROJECT>/mumpsvoid/mumpsvoid_<VERSARTE>/<HOSTTYPE>/mumpsvoid<VERSARTE>.a
#
LIBMUMPSPAR="<TELEMAC_HOME>/mumpsvoid/muqmpsvoid_v6p0/sources/mumpsvoidv6p0.a"
LIBMUMPSSEQ="<TELEMAC_HOME>/mumpsvoid/mumpsvoid_v6p0/sources/mumpsvoidv6p0.a"
#
#_END_________________________________________________________


Note that at the last lines describing the mumpsvoid libraries the DIRLIB folder is missing. That does not pose a problem when compiling TELEMAC.

Remember though to add the telemac2dv6p0.a and sisyphev6p0.a libraries at te respective gfortran directories afterwards. (Repeated afterwards)

Compiling the systel.ini file.
After editing te systel.ini file you need to run the perl command cfgmak (<TELEMAC_HOME>/bin) at the systel.ini directory.


(PERL is native on Mac OS so there shouldn't be any need of configuring it or reinstalling it unless you require an updated version.
Also the directories are those defined on systel.ini as /usr/bin for perlpath and /usr/lib for perl5lib).

Though BEFORE doing that you should run

dos2unix systel.ini

on a terminal in order to alter the format of systel.ini to unix format.

If you have mac ports or darwinports installed

sudo ports install dos2unix

should suffice. Otherwise you can download the source files (ex tofrodos) and compile them for mac os.

Typing then

cfgmak systel.ini (at systel.ini directory)

should then create a cfgmak.mak file on the same directory and print the following message

Mise a jour du fichier '<TELEMAC_HOME>/config/cfgmak.mak' terminee.


mumpsvoid compilation
At the mumpsvoid directory (<TELEMAC_HOME>/mumpsvoid/mumpsvoid_v6p0/sources)

make
make install

that creates the library mumpsvoidv6p0.a

COMPILE TELEMAC 2D

makeall90

and then if parallel is used

makepar90


REMEMBER:
Copy the telemac2dv6p0.a and sisyphev6p0.a libraries at the respective gfortran directories

<TELEMAC_HOME>/telemac2d/tel2d_v6p0/gfortran
<TELEMAC_HOME>/sisyphe/sisyphe_v6p0/gfortran

from
<TELEMAC_HOME>/telemac2d/tel2d_v6p0/sources
<TELEMAC_HOME>/sisyphe/sisyphe_v6p0/sources

You should now be able to run

telemac2d steering_file

at the steering_file directory.

(you can download test files from TELEMAC)
The topic has been locked.

Re:installation of TELEMAC v6.0 on MAC OS 13 years 8 months ago #1154

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Thanks a lot for this job
Christophe
The topic has been locked.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.