Commit Graph

685 Commits

Author SHA1 Message Date
Derek Bankieris
03f79dbbe0 Fix Pylint issues
I have discovered Pylint! May our Python forevermore be compliant.

Refs #365
2017-03-28 16:16:34 -05:00
Derek Bankieris
2db341cff8 Revert (almost all of) 2e4c3286
Sadly, we cannot yet require SWIG 2.0.

Refs #400
2017-03-28 15:59:08 -05:00
Derek Bankieris
b53c52ac33 Separate ICG & SWIG exclusion constructs
Refs #392
2017-03-27 15:19:43 -05:00
Derek Bankieris
2335f6bb69 Correct Monte Carlo compiler error on CentOS 7
Also change the Cannon sim monte_post jobs to use mc_read/write instead
of tc_read/write

Refs #396
2017-03-24 08:11:32 -05:00
Derek Bankieris
80ab0767e2 Combine command and data sockets in Monte Carlo
Refs #396
2017-03-23 12:22:40 -05:00
Derek Bankieris
17a5028e43 Infer TRICK_HOME automatically
Refs #358
2017-03-21 10:24:02 -05:00
Derek Bankieris
ef6f426d5c Generate Doxygen files for Trick headers
Since the headers moved to include/trick, the Doxyfile's INPUT needs to
be updated.
2017-03-20 10:57:34 -05:00
Derek Bankieris
47847a8aef Add ability to pass options to slave sims
Refs #395
2017-03-20 10:46:10 -05:00
Derek Bankieris
73cbbd96cd Refactor ICG to report skipped files consistently
Refs #394
2017-03-15 15:53:56 -05:00
Alex Lin
b88c75631a Missing includes when using clang/llvm 4.0 #393
Added some missing header file includes.
2017-03-15 10:05:06 -05:00
Derek Bankieris
2e4c3286a3 Automatically generate dependencies with SWIG
Like gcc, swig supports all those -M options. Use them to automatically
manage *_py.cpp dependencies.
Add dependency generation to trickify.mk as well.
2017-03-14 13:38:09 -05:00
Derek Bankieris
22d0fe9f23 Disable built-in implicit rules when building SIMs
Make spends a considerable amount of time checking targets against
built-in implicit rules. Let's turn them off, enjoy some speedup, and
see if anyone was relying on them!

Refs #360
2017-03-14 10:50:14 -05:00
Derek Bankieris
e39d57461c Remove unused variables in make_makefile_src
Refs #360
2017-03-14 08:45:41 -05:00
Alex Lin
7c78187abf Using ccache seems to work but prints warnings #390
Found a place in the makefile where TRICK_CC was not being set correctly.
Also found a case in gte.pm where we are not handling ccache properly.
2017-03-13 15:11:57 -05:00
Alex Lin
c5fbaeb7d6 Fix fonts in java GUIs #192
I fixed a hard coded size=12 font in the sim control panel.
2017-03-13 11:10:24 -05:00
Alex Lin
a1bc45548b tool for detecting mismatch between friend init_attr and containing class #371
Added a check and warning message in ICG that warns you if a friend function
starts with "init_attr" but does not match the current class name.
2017-03-10 09:38:33 -06:00
John M. Penn
aab6ce3c9e Ooops! Typo in macro. Ref #385 2017-03-03 18:33:53 -06:00
John M. Penn
1b1490a972 Add 2D Satellite Simulation. Ref #387 2017-02-28 15:49:35 -06:00
Alex Lin
85f2435af7 S_overrides.mk is included twice when building #360
All .i files for SWIG must be created before SWIG is run.  Added an
order only rule to make sure this happens.
2017-02-28 14:15:34 -06:00
John M. Penn
1783236184 Merge branch 'master' of https://github.com/nasa/trick 2017-02-27 12:51:48 -06:00
John M. Penn
eef5b14fbf Add tweaks that speed up matrix multiplication routines. ref #386 2017-02-27 12:51:35 -06:00
Derek Bankieris
9974e7698d Use -Wno-unused-parameter when compiling SWIG code
Refs #360
2017-02-27 08:56:09 -06:00
Derek Bankieris
dd2a17e034 Separate convert_swig rule in trickify.mk
Refs #309
2017-02-27 08:56:09 -06:00
John M. Penn
86add82e35 Fix MxSCALAR macro to allow scalar parameter to be an expression. Ref #385 2017-02-24 17:26:08 -06:00
Derek Bankieris
ca4dce3582 Fix newline spacing & restore MODEL_OBJECTS header
Refs #360
2017-02-24 09:09:31 -06:00
Alex Lin
b2f8c9894e S_overrides.mk is included twice when building #360
Moving targets to the more correct makefile like defining S_MAIN should
be in make_makefile_src.  Moved the makefile_overrides rules read from
directories into their own makefile.
2017-02-24 08:44:34 -06:00
John M. Penn
fa5d30f992 Merge branch 'master' of https://github.com/nasa/trick 2017-02-23 17:49:35 -06:00
John M. Penn
d19374020d Update matrix_macros.h with MxMxV macro. ref #385 2017-02-23 17:48:59 -06:00
Derek Bankieris
738959eba1 Add missing prerequisites on dependency files
Refs #360
2017-02-23 16:02:32 -06:00
Alex Lin
31f0ea95ad S_overrides.mk is included twice when building #360
Moved some rules from trick-CP to convert_swig.  Using alternative pattern
rules in Makefile_src I believe is faster.
2017-02-23 14:05:38 -06:00
Derek Bankieris
e6ad95f493 Grand Make Dependency Graph, part 1
Refs #360
2017-02-23 13:26:28 -06:00
Alex Lin
02617bf7da S_overrides.mk is included twice when building #360
Changed some order only dependencies to actual dependencies.  Added a
check in make_makefile_src for new files that should trigger recreating
Makefile_src.
2017-02-22 08:44:12 -06:00
Derek Bankieris
55d53c3f5e Include S_overrides.mk regardless of build target
We if exclude it for clean targets, users can't append any prerequisites
to clean targets.

Refs #360
2017-02-17 15:47:23 -06:00
Derek Bankieris
c909669f7d Use absolute paths in S_source.d (Trickification)
CURDIR is used to produce absolute paths in S_source.d, which allows it
to be included from external makefiles. It is specifically intended to
be included from a Trickified project's user-facing makefile. That is,
the one the user is intended to include in a sim's S_overrides.mk. This
allows the project to automatically build their Trickified object as
part of a simulation build, but only when necessary as specified by the
dependencies.

Refs #309
2017-02-16 12:58:07 -06:00
Derek Bankieris
76148fda7a Don't echo ld command in trickify.mk
Refs #309
2017-02-15 13:42:58 -06:00
Derek Bankieris
40242601b2 Use partial linking in trickify.mk
Trick uses dlsym to dynamically load symbols at run time. At link time,
it cannot be known which symbols will be needed. When presented with a
library, the linker will only link in symbols that are known to be
needed. Therefore, the use of -whole-archive (Linux) or -force_load
(Mac) is necessary when linking a Trickified library into a sim.

We can simplify this by partially linking into an object instead of
creating a library. The linker will link all symbols in an object
regardless of whether or not they are known to be needed.

Refs #309
2017-02-15 12:57:20 -06:00
Alex Lin
2450f51781 Add name of parameter to error message coming out of MemoryManager_restrore_stls #382
Printing the name now.
2017-02-15 09:00:34 -06:00
Derek Bankieris
90a26ab7c7 Autogenerate dependencies in trickify.mk
By using gcc's dependency generation feature, we can execute ICG only
when necessary, instead of all the time.

Refs #309
2017-02-14 15:41:58 -06:00
Alex Lin
9d587a45c2 S_overrides.mk is included twice when building #360
Moved makefile assignment of S_MAIN out of MAkefile.common to simulation
makefile.  The definition in Makefile.common was causing trouble for
autotesting because it changes TRICK_HOST_CPU.
2017-02-14 08:34:02 -06:00
Derek Bankieris
d965f4b0a8 Infer TRICK_HOME automatically
Refs #358
2017-02-10 10:29:56 -06:00
Alex Lin
337139cacb S_overrides.mk is included twice when building #360
A different approach.  Instead of trying to limit the number of times
S_overrides.mk is included, combine the makefiles so only one
call to make is made.
2017-02-09 09:46:58 -06:00
Derek Bankieris
3db5056db3 Fix timeout error in VariableServer.fromPID
After calculating the remaining timeout, make sure it's still
non-negative.

Refs #365
2017-02-08 08:32:23 -06:00
Derek Bankieris
29bdbee8fa Revert 150ea9f
We've agreed that the long-term solution is to refactor the makefiles so
we don't use recursive make. Until then, continue double including
S_overrides.mk so that the $(S_MAIN) target is available in
S_overrides.mk. Resolve #360 by having Trickified libraries use
target-specific variables (ironically, on $(S_MAIN)) to avoid
duplication of the -whole-archive option.
2017-02-06 15:25:18 -06:00
Derek Bankieris
39af68cc1d Improve asynchronous error handling
Add the ability to register callbacks for errors that occur on the
asynchronous variable sampling thread. Implement __del__ and call
close in case the user forgot. Join the asynchronous sampling thread
in close before returning.

Refs #365
2017-01-30 09:33:28 -06:00
Alex Lin
a909c6400a duplicate include guards #379
Changed the include guard in PythonPrint.hh
2017-01-24 10:00:40 -06:00
Alex Lin
38d2b10b9e Forward-declared classes aren't fully populated in S_sie.resource #378
I chose the wrong call when trying to support clang 3.9 and it's
removal of getRBraceLoc.  The best equivalent call in 3.9 is
getBraceRange().getEnd().
2017-01-23 17:48:16 -06:00
Derek Bankieris
4146b440b8 Make trick (Python package) a namespace package
Namespace packages are a mechanism for splitting a single Python
package across multiple directories on disk. With the addition of
$(TRICK_HOME)/pymods/trick, there now exists a package named 'trick' at
$(TRICK_HOME)/pymods and in each SIM_* directory. This change allows sims
to import modules from both locations.

Refs #365
2017-01-20 10:30:21 -06:00
Derek Bankieris
fc63f5c6b1 Add option to connect via PID (variable_server.py)
Refs #365
2017-01-20 09:47:08 -06:00
Derek Bankieris
a6b68bb101 Infer TRICK_HOME automatically
Refs #358
2017-01-20 09:39:04 -06:00
Alex Lin
008337e69b Monte Carlo dry runs produce monte_input files #318
The input file that is created while running monte carlo runs is done
in 3 different places.  There was no easy way to collect all of those
lines in one place, so I duplicated the lines in the dryrun function.
2017-01-12 16:52:05 -06:00