Commit Graph

131 Commits

Author SHA1 Message Date
Dan D. Jordan
fdd442ba68 Added duplicate name protection on add_variable and get_variable
mechanism for getting MonteVar * derived types so that those dispersion
settings can be changed once they go out of scope.
2016-08-30 09:48:10 -05:00
Alex Lin
e3759ac594 Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
When we moved the thread sync code, a loop to clear all job complete flags was left out
causing unit test errors.
2016-08-29 08:42:53 -05:00
Alex Lin
aeeaa7b3bc Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
Forgot to introduce the new function.
2016-08-26 09:10:44 -05:00
Alex Lin
7c57c1d02d Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
Created a new executive job that waits for the scheduled threads to finish.  We
run this right before advancing time.
2016-08-26 09:07:46 -05:00
Alex Lin
0072e7d6f0 Unintended performance issue with integ_loop at end of scheduled job classes #243
Created a new executive job that waits for threads to finish and readies them
for their next frame of execution.  Created a new job class system_thread_sync
after the top of frame jobs and before the input processor is run to sync the
threads.  Along the way cleaned up instrumentation jobs on the threads to fix #290.
2016-08-24 10:55:27 -05:00
Alex Lin
a32e1d7557 stack smash detected in add_recording_vars_for_frame #211
The character string used in the frame log needs to be stored as
a character string.  We were using a sprintf with a fixed size buffer.
The easiest change was to use asprintf which allocates a character
string big enough to hold the contents of the print.  We need to
save this char string as a char string so it works out.
2016-08-03 15:42:04 -05:00
Alex Lin
3a261929e8 Monte carlo AttributeError's caused by bad configuration still returns zero in master sim #269
If there were bad runs, the master will now exit with a non-zero status.
2016-08-03 15:01:03 -05:00
Alex Lin
ce1347de74 Remove sim_services/STL #275
Removed the sim object, directory and the entry in the Makefile to compile it.
2016-08-03 14:12:16 -05:00
Alex Lin
89fda63293 Remove doxygen documentation now housed on wiki #189
moved all of the design documentation to the wiki
2016-08-02 17:50:49 -05:00
Alex Lin
6848e31ddc Remove doxygen documentation now housed on wiki #189
moved the small amount of text we had in our "requirements" document
to the wiki.
2016-08-02 16:55:36 -05:00
Alex Lin
832679b7ee Remove doxygen documentation now housed on wiki #189
Verified all documentation deleted with this issue resides on
our wiki.  Nothing is lost.  Modified the doxygen makefile and
main page to point to the wiki where the user's guide used to be.

TODO: Need to move the requirements and design doxygen files.
2016-08-02 15:41:18 -05:00
Alex Lin
b2293a14ff CheckPointAgent.cpp has a noted memory leak (confirmed) and proposed optimization #232
Changed the vector to use instances of the VarNameElement instances.  Memory leak is gone.
2016-07-28 13:13:19 -05:00
Derek Bankieris
13b806c2f8 refs #272 allow the OS to choose an available port 2016-07-26 15:03:05 -05:00
Alex Lin
bc6cb589e3 Monte carlo AttributeError's caused by bad configuration still returns zero in master sim #269
The return code from parsing the monte carlo input was always set to zero and not checked.
Retured the return code from parsing the input. Added an exit if the input was not parsed
correctly.
2016-07-26 13:40:38 -05:00
Alex Lin
f90a76be6b We are redefining HOST_NAME_MAX in MonteCarlo.hh
Removed the redefinition.  Included climits and changed HOST_NAME_MAX to _POSIX_HOST_NAME_MAX
which should be defined on the systems we support.

refs #265
2016-07-06 14:56:05 -05:00
Alex Lin
3a7e756926 Unit test directories do not support gtest libs in lib64
Added library search dirs ${GTEST_HOME}/lib64 and ${GTEST_HOME}/lib
to the link line.

refs #264
2016-07-01 11:50:06 -05:00
Alex Lin
595feb280b Convert old units to udunits in test code
Found a couple more units to convert.

refs #261
2016-06-30 11:24:18 -05:00
Alex Lin
adfecdef11 Search for some optional packages in configure script.
Side effect of GSL included by default is that the monte carlo
test code needs to know that.  The test code did not include the HAVE_GSL
flag correctly, causing the tests to fail.  Fixed it.

refs #260
2016-06-30 09:59:09 -05:00
Alex Lin
4ab584ed55 Support using Python 3
Fixed the configure script to allow the user to specify using a python3
interpreter.  Had to change the the way to load the swig generated python modules.
Also had to change code dealing with python strings, oct, long, and
boolean operations.

refs #258
2016-06-28 13:44:21 -05:00
Alex Lin
268d3407df Set and use LD in our makefiles correctly.
Changed TRICK_LD to TRICK_CPPC in the unit test makefiles.  It
should be TRICK_CPPC on these lines.

refs #131
2016-06-28 08:58:33 -05:00
Alex Lin
bfdc491fe3 Output "--" if that was specified in the header file.
Unit tests failed sometimes.  Found that an attributes structure for time
in the data recording class was unintialized.  This led to the mods
field to have random data, and sometimes triggering sys.exec.out.time
to be assigned no units.  Fixed it by zeroing out the structure.

refs #254
2016-06-21 17:02:32 -05:00
Alex Lin
fcb63e0e06 Output "--" if that was specified in the header file.
Used the mods field in the attributes to indicate of "--" was specified in the header file.  We
still save the units as "1" to keep it compatible with udunits.  When outputting the variable
in data recording or variable server we check to see if the mods field for "--" is set.  We
output "--" if the mods field is set.  Also allowed "--" to persist in data products.

refs #254
2016-06-21 16:12:28 -05:00
Alex Lin
d9f1780939 exec_get_current_version returns string out of scope
Changed Trick::Executive::get_current_version to return a const reference
to the string that holds the version.  This avoids a copy of the string object
and avoids that object going out of scope.  As a string, the debug_command
had the same problem so I fixed that one as well.

refs #252
2016-06-21 16:03:15 -05:00
Alex Lin
8a9497a9bc Use udunits package for units conversions
removed udunits.h from makefile dependencies

refs #231
2016-05-17 09:55:12 -05:00
Alex Lin
a95e8e086b Use udunits package for units conversions
Copied the units_conv.c from 15 that includes the new units to master.

Swept through the code removing includes to Unit.hh and UCF.h where they
are no longer needed.  Remade makefile dependencies.

refs #231
2016-05-17 09:01:37 -05:00
Alex Lin
7e218a0472 Use udunits package for units conversions
Change the Variable Server to use udunits.

refs #231
2016-05-16 17:14:50 -05:00
Alex Lin
d7569bf9f2 Use udunits package for units conversions
Some individual tests in SIM_test_ip were still failing because the conversion
between lb and kg has a different number of digits now.

refs #231
2016-05-11 10:56:33 -05:00
Alex Lin
26cb44e946 Use udunits package for units conversions
So our unit tests did their job, they pointed to quite a few errors.
Fixed them all on my platform (CentOS 7).

refs #231
2016-05-11 09:01:54 -05:00
Alex Lin
684f0e6bdc Use udunits package for units conversions
Initial checkin of using udunits for measurement units conversions.  Replaced
our conversion code in ICG and swig code to use udunits.

Also added code to convert unit symbols that we used in Trick that are different
names in udunits.

Added a sim_object that will eventually allow users to specify a custom
set of files to read units information.

refs #231
2016-05-05 14:49:49 -05:00
Alex Lin
d144907b49 Use udunits package for units conversions
First thing is to move the misnamed Units directory to UnitsMap.

refs #231
2016-05-05 13:42:00 -05:00
Alex Lin
c307668fef All command line arguments that start with "-d" being matched by input processor.
Changed the string compare to match the whole argument to "-d".

refs #230
2016-04-26 15:57:33 -05:00
Alex Lin
83d96b4bcc HDF5 data recording broken
Need to enclose the HDF5 code in write_data with an ifdef.

refs #188
2016-04-25 10:04:58 -05:00
Alex Lin
8354546160 HDF5 data recording broken
Overrode the write_data routine for HDF5 recording.  The new routine writes
out all buffered values of an individual variable with one or two HDF5 calls.
This is much more efficient than before where we were making an HDF5 call
for a single value.

refs #188
2016-04-25 09:47:13 -05:00
Alex Lin
d503d52bd8 Debugger command on mac is now lldb not gdb
Added a test to set the debugger command to gdb or lldb depending
on availability.  Created a new script for lldb to run.  Modified
the script for gdb to backtrace all threads.

refs #227
2016-04-20 14:12:03 -05:00
Alex Lin
8c3e322ed1 Variable server restart issues
Added mutexes in the variable server listener thread and each variable server thread.
During checkpoint restart all of these mutexes are locked by the master thread to
stop accepting new connections and stop all read/writing to all variable server clients.
Communication is resumed after the checkpoint has been reloaded.

refs #168
2016-04-19 13:50:30 -05:00
Alex Lin
03d6105c6c Remove catches for non-Trick exceptions
Removed the catches for std:exceptions and unknown exceptions.  The best way
I found to provide a clue to where the exception comes from is to allow the
handler for unhandled exceptions execute.  This is std::terminate which calls
abort and trips a SIGABRT.  I added a signal handler for SIGABRT which like
SIGSEGV, we can print a stack trace or attach a debugger to the process before
exiting.  The stack trace print is on by default.  By default the signal
handler is on, stack trace is on, debugger is off.

refs #220
2016-04-15 15:01:14 -05:00
John M. Penn
f2dd53f0b5 Fix address arithmetic in MemoryManager_ref_assignment.cpp and add unit test. refs #224 2016-04-15 14:34:38 -05:00
Alex Lin
112cc780e0 checkpoint_safestore_set_enabled() has the worst name ever
renamed checkpoint_safestore to checkpoint_safestore_period
renamed checkpoint_safestore_set_enabled to checkpoint_safestore

refs #196
2016-04-15 09:41:28 -05:00
Alex Lin
c4df54e53e echo_jobs and debug_pause are not working
Changed the sim_object names in echo_jobs and debug_pase from "instrumentation"
to "trick_instrumentation"

refs #223
2016-04-14 13:22:25 -05:00
John M. Penn
fc98f6cf0a Fix address arithmetic in ClassicCheckPointerAgent::write_rvalue. Refs #221 2016-04-13 15:39:30 -05:00
Alex Lin
fb7432d096 Add direct STL checkpointing
Modified ICG to save the non-canonical name for STLs.  This is typically more readable
because it is shorter.  Added code to the variable server to filter out requests accessing
STLs, because those accesses will not currently work.

refs #206
2016-04-04 15:07:57 -05:00
Alex Lin
0b7e3e2dc9 STLs may be in std::__cxx11 namespace
When we parse header files and find std::basic_string we change that to std::string.
Added a check for std::__cxx11::basic_string to do the same.  We also carry a
list of STL names, added std::__cxx11::[template_name] to the list of possilbe STL
names we are searching for.

refs #214
2016-04-01 21:35:53 -04:00
Alex Lin
b1a69f2490 stack smash detected in add_recording_vars_for_frame
Changing size of char[256] to char[512] temporarily.  Will come back
to change all sprintf calls to use stringstreams.

refs #211
2016-04-01 09:02:46 -05:00
Alex Lin
617efa3a52 Merge pull request #210 from alexlin0/master
Merge STL checkpoint work
2016-04-01 08:18:37 -05:00
Alex Lin
ba6a00315e Add direct STL checkpointing
Fixing the unit tests that broke because of my changes.  Memory
Manager tests need to be compiled with c++11, and the STL unit test
was using a variable that did not exist anymore.

[Issue: x]
2016-03-31 17:30:00 -05:00
Alex Lin
c1eb4e6fc5 Add direct STL checkpointing
The typenames on the Mac need to be converted for strings.  The
templates are genererating the long form of the string type name.  I
wrote a function to catch test the template parameter types and
return std::string.

refs #206
2016-03-31 15:48:19 -05:00
Alex Lin
c8a39f4a44 Add direct STL checkpointing
Removed the previous attempts at STL checkpointing. Removed
the header files and sims.  Also simplified the names of some of
the templates.

refs #206
2016-03-31 14:50:27 -05:00
Derek Bankieris
52ff78ffa3 refs #209 Completely remove event in EventManager::remove_event 2016-03-31 12:36:05 -05:00
Alex Lin
06a405ef35 Add direct STL checkpointing
stl::stack code completed.

refs #206
2016-03-31 10:32:13 -05:00
Alex Lin
5368108723 Add direct STL checkpointing
Added queue and priority queue handling.

refs #206
2016-03-31 09:22:45 -05:00