Skip to content

Commit

Permalink
Removing CGNS support for versions older than 3.3.0 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikurj authored Mar 1, 2021
1 parent d7b9741 commit 28a5493
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cgnsutilities/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.0"
__version__ = "2.4.0"
17 changes: 6 additions & 11 deletions config/defaults/config.LINUX_GFORTRAN.mk
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# Define the CNGS include directory and linking flags for CGNSlib. We
# can use 3.2.x OR CGNS 3.3+. You must define which version is being
# employed as shown below. We are assuming that HDF5 came from PETSc
# so it is included in ${PETSC_LIB}. Otherwise you will have to
# specify the HDF5 library.

# ----------- CGNS ------------------
# CGNS_VERSION_FLAG= # for CGNS 3.2.x
CGNS_VERSION_FLAG=-DUSECGNSMODULE # for CGNS 3.3.x
# ------- Define CGNS Inlcude and linker flags -------------------------
# Define the CGNS include directory and linking flags for the CGNS library.
# We are assuming that HDF5 came from PETSc so it is included in ${PETSC_LIB}.
# Otherwise you will have to specify the HDF5 library.
CGNS_INCLUDE_FLAGS=-I$(CGNS_HOME)/include
CGNS_LINKER_FLAGS=-L$(CGNS_HOME)/lib -lcgns

# Gfortran compiler
CC = gcc
CFLAGS = -O2 -fPIC
FC = gfortran
FFLAGS= -O2 -fdefault-real-8 -g -fPIC ${CGNS_VERSION_FLAG}
FFLAGS= -O2 -fdefault-real-8 -g -fPIC

# Define potentially different python, python-config and f2py executables:
PYTHON = python
PYTHON-CONFIG = python3-config # use python-config for python 2
F2PY = f2py
F2PY = f2py
17 changes: 6 additions & 11 deletions config/defaults/config.LINUX_INTEL.mk
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# Define the CNGS include directory and linking flags for CGNSlib. We
# can use 3.2.x OR CGNS 3.3+. You must define which version is being
# employed as shown below. We are assuming that HDF5 came from PETSc
# so it is included in ${PETSC_LIB}. Otherwise you will have to
# specify the HDF5 library.

# ----------- CGNS ------------------
# CGNS_VERSION_FLAG= # for CGNS 3.2.x
CGNS_VERSION_FLAG=-DUSECGNSMODULE # for CGNS 3.3.x
# ------- Define CGNS Inlcude and linker flags -------------------------
# Define the CGNS include directory and linking flags for the CGNS library.
# We are assuming that HDF5 came from PETSc so it is included in ${PETSC_LIB}.
# Otherwise you will have to specify the HDF5 library.
CGNS_INCLUDE_FLAGS=-I$(CGNS_HOME)/include
CGNS_LINKER_FLAGS=-L$(CGNS_HOME)/lib -lcgns

# Intel Fortran Compiler
CC = gcc
CFLAGS = -O2 -fPIC
FC = ifort
FFLAGS = -O2 -r8 -g -fPIC ${CGNS_VERSION_FLAG}
FFLAGS = -O2 -r8 -g -fPIC

# Define potentially different python, python-config and f2py executables:
PYTHON = python
PYTHON-CONFIG = python3-config # use python-config for python 2
F2PY = f2py
F2PY = f2py
7 changes: 1 addition & 6 deletions src/cgns_utilities.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,8 @@ end module dataTypes

module utils

#ifdef USECGNSMODULE
use cgns
#else
include 'cgnslib_f.h'
integer(kind=4), private :: dummyInt
integer, parameter :: cgsize_t=kind(dummyInt)
#endif

contains

subroutine openFile(fileName, mode, cellDim, cg)
Expand Down

0 comments on commit 28a5493

Please sign in to comment.