Skip to content

Commit 6cb1858

Browse files
committed
now only c++ is used (hd5calls.c->hd5calls.C) updated autotools on that. Updated INSTALL and README.
1 parent 75030bb commit 6cb1858

File tree

6 files changed

+49
-19
lines changed

6 files changed

+49
-19
lines changed

INSTALL

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,15 @@ make install
7272
# ====================================================================
7373
# hdf5 installation
7474
# ====================================================================
75-
# serial version of hdf5 needed to be installed
75+
# serial version of hdf5 with C++ support needed to be installed
76+
cd $TITAN_WSP
7677
export TITAN_HDF5=$TITAN_WSP/hdf5
77-
78+
wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.16.tar
79+
tar xvzf hdf5-1.8.16.tar
80+
cd hdf5-1.8.16
81+
./configure --prefix=$TITAN_HDF5 --enable-cxx
82+
make -j 8
83+
make install
7884
# ====================================================================
7985
# GRASS installation
8086
# ====================================================================
@@ -107,19 +113,25 @@ aclocal;autoheader;autoconf;automake --add-missing --copy
107113
cd $TITAN_WSP
108114
mkdir titan2d_bld
109115
cd titan2d_bld
110-
mkdir iccopt
111-
cd iccopt
116+
mkdir iccoptompmpi
117+
cd iccoptompmpi
112118

113119
#
114120
#../../titan2d/configure --with-grass=<path_to_grass_installation> --without-gdal \
115-
#--with-hdf5=<path_to_top_dir_of_hdf5> --prefix=<where_to_install> \
116-
#CC=mpicc CXX=mpic++ F77=mpif90 PYTHON=<path to python2.7>
121+
# --with-hdf5=<path_to_top_dir_of_hdf5> --prefix=<where_to_install> \
122+
# PYTHON=<path to python2.7> SWIG=<path to swig>\
123+
# [--enable-mpi] [--enable-openmp] \
124+
# [CXX=<path to non-default c++ compiler, mpic++ for example> ] \
125+
# [CXXFLAGS=<non-default optimization flags, for example "-g -O0" for no optimization or "-O3" for heavy optimization ]\
126+
# [CPPGLAGS=<non-default preprocessor flags, for example "-DDEB2" for extra debuging information]
117127
#
118-
#for example:
128+
#for example hybrid MPI/OpenMP:
119129
../../titan2d/configure --with-grass=$TITAN_GRASS --without-gdal \
120130
--with-hdf5=$TITAN_HDF5 --prefix=`pwd` \
121-
CC=mpicc CXX=mpic++ F77=mpif90 PYTHON=$TITAN_PYTHON/bin/python2.7 \
122-
SWIG=$TITAN_SWIG/bin/swig CXXFLAGS=-O3 CFLAGS=-O3
131+
--enable-mpi --enable-openmp \
132+
CXX=mpic++ \
133+
PYTHON=$TITAN_PYTHON/bin/python2.7 \
134+
SWIG=$TITAN_SWIG/bin/swig CXXFLAGS=-O3
123135

124136
# Now compile it:
125137
make -j <number of proccesses to use>

README

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
Installation
2+
=====================================
3+
See INSTALL for compilation instruction
4+
5+
Execution
6+
=====================================
7+
In order to run Titan in openMP mode (prefered at this time):
8+
9+
source <path_to_titan>/bin/titanvars.sh
10+
<path_to_titan>/bin/titan -nt <number of threads> <input python script>
11+
12+
In order to run Titan in hybrid MPI/OpenMP mode:
13+
14+
source <path_to_titan>/bin/titanvars.sh
15+
mpirun -np <number of processes> <path_to_titan>/bin/titan -nt <number of threads> <input python script>
16+
17+
18+
19+
20+
21+
22+
Bellow is old read me
23+
=====================================
124
The code currently simulates granular flows. It runs in parallel with mesh refinement and unrefinement. The maximum refinement level is set by the user when specifying the Number of Computational Cells Across Smallest Pile/Flux-Source. Mesh repartitioning is also used to maintain a good load-balance. A python script is included to organize the preprocessing and launching of jobs on different computers, including all available computers at the Center for Computational Research (CCR) at UB. GRASS is now used as the GIS. The python script can also be run directly from GRASS. Instructions for this are in the README.GRASS file.
225

326
The python script is located in the bin directory and is run by

configure.ac

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Process this file with autoconf to produce a configure script.
22

33
AC_PREREQ([2.59])
4-
AC_INIT(titan, 3.0.0)
4+
AC_INIT(titan, 3.1.0)
55
AM_INIT_AUTOMAKE
66

77
## Host specific stuff
@@ -36,7 +36,6 @@ AC_LANG_CPLUSPLUS
3636

3737
# Checks for programs.
3838
AC_PROG_CXX
39-
AC_PROG_CC
4039
AC_PROG_CPP
4140
AC_PROG_INSTALL
4241
AC_PROG_LN_S

src/header/hd5calls.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ const int XDMF_CLOSE = 2;
3030

3131

3232

33-
#ifdef __cplusplus
33+
3434
#include <string>
35-
extern "C"
36-
{
37-
#endif
35+
3836

3937
/*! GH5_openfile opens hdf file for reading or writing.
4038
* mode can have "n" or "o" values
@@ -73,9 +71,7 @@ void GH5_write_mesh_data(hid_t fp, int conns, int points, int *conndata, double
7371
*/
7472
void GH5_write_state_vars(hid_t fp, int num_elms, double *state_var, const char *var_names);
7573

76-
#ifdef __cplusplus
77-
}
78-
#endif
74+
7975
/*************************************************************
8076
*
8177
* FOLLOWING CALLS ARE NOT EXPECTED TO BE MADE

src/tecplot/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
noinst_LIBRARIES = libtecplot.a
88

9-
libtecplot_a_SOURCES = outsum.C tecplot.C grassout.C xdfm_write.C hd5calls.c
9+
libtecplot_a_SOURCES = outsum.C tecplot.C grassout.C xdfm_write.C hd5calls.C
1010

1111
libtecplot_a_CPPFLAGS=-I$(srcdir)/../header/ -I$(srcdir)/../gisapi
1212

0 commit comments

Comments
 (0)