Skip to content

Commit 931b624

Browse files
committed
Remove unused Matlab component
1 parent 6bdf9a3 commit 931b624

18 files changed

+6
-3311
lines changed

CMakeLists.txt

-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ option(USE_OMP "Enable OpenMP" ON )
2525
option(OMP_SAFE_EXCEPTION "Enables safe exception handling from within OMP regions." ON)
2626
option(ENABLE_SAFE_CHECKS "Enable variable map checking. Runtime perf cost. Allows for ensuring a variable is indeed available to be lookedup." ON)
2727
option(BUILD_TESTS "Build all tests." OFF ) # Makes boolean 'test' available.
28-
option(MATLAB "Enable Matlab linkage" OFF )
2928
option(STATIC_ANLAYSIS "Enable PVS static anlaysis" OFF)
3029
option(USE_TCMALLOC "Use tcmalloc from gperftools " ON)
3130
option(USE_JEMALLOC "Use jemalloc" OFF)
@@ -255,13 +254,6 @@ if(USE_OMP)
255254
endif()
256255
endif()
257256

258-
259-
if(MATLAB)
260-
#for matlab to run you need csh installed
261-
find_package(Matlab REQUIRED)
262-
endif()
263-
264-
265257
#already makes a target
266258
find_package(${METEOIO} REQUIRED)
267259

src/CMakeLists.txt

-15
Original file line numberDiff line numberDiff line change
@@ -201,21 +201,6 @@ if(MPI_FOUND AND USE_MPI)
201201
endif()
202202
endif()
203203

204-
#are we linking against matlab?
205-
if(MATLAB)
206-
set(LIBMAW_SRCS
207-
libmaw/graphics.cpp
208-
libmaw/matlab_engine.cpp
209-
CACHE INTERNAL "" FORCE )
210-
211-
list( APPEND EXT_TARGETS
212-
${MATLAB_ENG_LIBRARY}
213-
${MATLAB_MX_LIBRARY})
214-
215-
list( APPEND HEADER_FILES
216-
${MATLAB_INCLUDE_DIR})
217-
218-
endif()
219204

220205
if(BUILD_WITH_CONAN)
221206
# when we run make install all the RPATHs will be stripped out and set to these

src/core.cpp

+1-48
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,8 @@ void core::config_parameters(pt::ptree &value)
613613
void core::config_meshes( pt::ptree &value)
614614
{
615615
LOG_DEBUG << "Found meshes sections.";
616-
#ifdef MATLAB
617-
_mesh = boost::make_shared<triangulation>(_engine);
618-
#else
616+
619617
_mesh = boost::make_shared<triangulation>();
620-
#endif
621618

622619
_mesh->_global = _global;
623620

@@ -794,35 +791,6 @@ void core::config_meshes( pt::ptree &value)
794791

795792
}
796793

797-
void core::config_matlab( pt::ptree &value)
798-
{
799-
LOG_DEBUG << "Found matlab section";
800-
#ifdef MATLAB
801-
//loop over the list of matlab options
802-
for (auto& jtr : value.get_obj())
803-
{
804-
const json_spirit::Pair& pair = jtr;
805-
const std::string& name = pair.name_;
806-
const json_spirit::Value& value = pair.value_;
807-
808-
if (name == "mfile_paths")
809-
{
810-
LOG_DEBUG << "Found " << name;
811-
for (auto& ktr : value.get_obj()) //loop over all the paths
812-
{
813-
const json_spirit::Pair& pair = ktr;
814-
// const std::string& name = pair.name_;
815-
const json_spirit::Value& value = pair.value_;
816-
817-
818-
_engine->add_dir_to_path(value.get_str());
819-
820-
}
821-
}
822-
}
823-
#endif
824-
}
825-
826794
void core::config_output(pt::ptree &value)
827795
{
828796
LOG_DEBUG << "Found output section";
@@ -1257,17 +1225,6 @@ void core::init(int argc, char **argv)
12571225
LOG_DEBUG << version;
12581226

12591227

1260-
1261-
#ifdef NOMATLAB
1262-
_engine = boost::make_shared<maw::matlab_engine>();
1263-
1264-
1265-
_engine->start();
1266-
_engine->set_working_dir();
1267-
1268-
LOG_DEBUG << "Matlab engine started";
1269-
#endif
1270-
12711228
_global = boost::make_shared<global>();
12721229

12731230
// This needs to be set so that underflows in gsl math
@@ -1474,10 +1431,6 @@ void core::init(int argc, char **argv)
14741431
LOG_DEBUG << "Optional section checkpoint not found";
14751432
}
14761433

1477-
//#ifdef NOMATLAB
1478-
// config_matlab(value);
1479-
//#endif
1480-
14811434
//if we are to run in point mode, we need to remove all the input and outputs that aren't associated with point mode
14821435
// we do this so the user doesn't have to modify a lot of the config file when going between point and dist mode.
14831436

src/core.hpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ class core
182182
void config_forcing(pt::ptree& value);
183183
void config_module_overrides( pt::ptree& value);
184184
void config_parameters(pt::ptree &value);
185-
void config_matlab( pt::ptree& value);
186185
void config_output(pt::ptree& value);
187186
void config_global( pt::ptree& value);
188187
void config_checkpoint( pt::ptree& value);
@@ -228,7 +227,7 @@ class core
228227
cmdl_opt config_cmdl_options(int argc, char **argv);
229228

230229
/**
231-
* Initializes the logger and Matlab engine
230+
* Initializes the logger
232231
*/
233232
core();
234233
~core();
@@ -276,12 +275,6 @@ class core
276275
double radius;
277276
double N; // meters, radius for station search
278277

279-
280-
#ifdef MATLAB
281-
//matlab engine
282-
boost::shared_ptr<maw::matlab_engine> _engine;
283-
#endif
284-
285278
//holds all the modules that are to be run on each mesh element
286279
//pair as we also need to store the make order
287280
std::vector< std::pair<module,size_t> > _modules;

src/exception.hpp

-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030

3131
struct exception_base: virtual std::exception, virtual boost::exception { };
3232

33-
//matlab
34-
struct matlab_error: virtual exception_base {};
35-
struct matlab_null_return : virtual matlab_error{};
36-
struct matlab_engine_failure : virtual matlab_error{};
37-
3833
// IO errors
3934
struct io_error: virtual exception_base { };
4035
struct file_read_error: virtual io_error { };

src/libmaw/graphics.cpp

-207
This file was deleted.

0 commit comments

Comments
 (0)