Installing rgdal_1.4-8.tar.gz with R-3.6.0 on CentOS 7

I tried installing rgdal_1.4.8.tar.gz with R-3.6.0  and there were a number of issues. Even though I have followed and installed according to “Compile gdal-2.4.3 on CentOS 7” I have the follow error.

Issue 1: Error: Proj.h not found in standard or given locations

.....
.....
checking C++11 support for GDAL >= 2.3.0... yes
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5.0... yes
checking gdal: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /usr/local/gdal-2.4.3/share/gdal/pcs.csv readable... yes
checking proj_api.h presence and usability... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘rgdal’
.....

Apparently R is not able to find inside pkconfig for proj.pc file. To resolve it, do the following to your ~.bashrc environment.

export PKG_CONFIG_PATH=/usr/local/proj-5.2.0/lib/pkgconfig

You can verify by using the command

# pkg-config proj --libs
-L/usr/local/proj-5.2.0/lib -lproj

You can get more information via the thread proj_api.h not found in standard or given locations #1092

Issue 2: Proj_LIB Path Issues

.....
checking proj_api.h presence and usability... yes
checking PROJ version >= 4.8.0... yes
checking projects.h presence and usability... yes
checking PROJ.4: epsg found and readable... no
Error: proj/epsg not found
Either install missing proj support files, for example
the proj-nad and proj-epsg RPMs on systems using RPMs,
or if installed but not autodetected, set PROJ_LIB to the
correct path, and if need be use the --with-proj-share=
configure argument.
ERROR: configuration failed for package ‘rgdal’
.....

To resolve the PROJ_LIB Issue

export PROJ_LIB=/usr/local/proj-5.2.0/share/proj

You can more information from https://github.com/r-spatial/lwgeom/issues/28

Finally, you should be able to compile rgdal_1.4-8.tar.gz with R-3.6.0

# R CMD INSTALL rgdal_1.4-8.tar.gz
.....
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rgdal)
.....

Final Step: Testing and Verification

Load both gdal and proj libaries. Make sure you have compile gdal and proj libraries using the tutorial Compile gdal-2.4.3 on CentOS 7

$ module load proj/5.2.0
$ module load R/3.6.0
$ module load gdal/2.4.3
$ R
library(rgdal)
Loading required package: sp
rgdal: version: 1.4-8, (SVN revision 845)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 2.4.3, released 2019/10/28
Path to GDAL shared files: /usr/local/gdal-2.4.3/share/gdal
GDAL binary built with GEOS: FALSE
Loaded PROJ.4 runtime: Rel. 5.2.0, September 15th, 2018, [PJ_VERSION: 520]
Path to PROJ.4 shared files: /usr/local/proj-5.2.0/share/proj
Linking to sp version: 1.3-2

 

Compile gdal-2.4.3 on CentOS 7

Step 1: Make sure you have the following packages on CentOS 7

yum install gcc-c++
yum install gcc
yum install libpng
yum install libtiff

Step 2: Compile and Install Proj-5.2.0
a. Download Source from http://download.osgeo.org/proj/

# wget https://download.osgeo.org/proj/proj-5.2.0.tar.gz
# tar -zvxf proj-5.2.0.tar.gz
# cd proj-5.2.0
# ./configure --prefix=/usr/local/proj-5.2.0
# make -j 16
# make install

Step 3: Compile and Install gdal-2.4.3

# wget http://download.osgeo.org/gdal/2.4.3/gdal-2.4.3.tar.gz
# tar -zxvf gdal-2.4.3.tar.gz
# cd gdal-2.4.3
# ./configure --prefix=/usr/local/gdal-2.4.3 --with-proj=/usr/local/proj-5.2.0 LDFLAGS="-L/usr/local/proj-5.2.0/lib" 
CPPFLAGS="-I/usr/local/proj-5.2.0/include" --with-threads --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-png=internal --with-libz=internal
# make -j 16
# make install

References:

Topology optimization using TOSCA for ABAQUS in HPC

Topology optimization using TOSCA for Abaqus is executed by running the Abaqus execution procedure and by providing the name of the parameter file, which, in turn, refers to an Abaqus input file. You can define your optimization model using Abaqus/CAE, and you can use the Optimization Process Manager to create the parameter file and the Abaqus/CAE input file.

https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-topooptimizeproc.htm

Online AI Training by Intel (December 2019)

Online AI Training

 

TensorFlow*

MXNet

Intel® Distribution of OpenVINO™ Toolkit