Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-c-interface
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hendriks, David D Dr (PG/R - Maths & Physics)
python-c-interface
Commits
6cc12760
Commit
6cc12760
authored
5 years ago
by
David Hendriks
Browse files
Options
Downloads
Patches
Plain Diff
last update. the rest is in the binary_c-python repo
parent
b617bec4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
binaryc/functions.py
+1
-20
1 addition, 20 deletions
binaryc/functions.py
binaryc/lib_custom_logging.so
+0
-0
0 additions, 0 deletions
binaryc/lib_custom_logging.so
with
1 addition
and
20 deletions
binaryc/functions.py
+
1
−
20
View file @
6cc12760
...
...
@@ -4,7 +4,6 @@ import subprocess
import
socket
# Functions for the automatic logging of stuff
def
autogen_C_logging_code
(
logging_dict
):
# See example_perl.pm autologging
"""
...
...
@@ -194,7 +193,6 @@ def return_compilation_dict():
'
inc
'
:
inc
}
# compilation_dict = return_compilation_dict('libcustomlogging')
def
compile_shared_lib
(
code
,
sourcefile_name
,
outfile_name
):
"""
Function to write the custom logging code to a file and then compile it.
...
...
@@ -224,21 +222,4 @@ def compile_shared_lib(code, sourcefile_name, outfile_name):
shell
=
True
)
if
res
:
print
(
'
Output of compilation command:
\n
{}
'
.
format
(
res
))
# generate logging lines
logging_line
=
autogen_C_logging_code
(
{
'
MY_STELLAR_DATA
'
:
[
'
model.time
'
,
'
star[0].mass
'
],
'
my_sss2
'
:
[
'
model.time
'
,
'
star[1].mass
'
]
}
)
# Generate code around logging lines
created_code
=
binary_c_log_code
(
logging_line
)
# print(created_code)
# quit()
compile_shared_lib
(
created_code
,
sourcefile_name
=
'
custom_logging.c
'
,
outfile_name
=
'
lib_custom_logging.so
'
)
\ No newline at end of file
print
(
'
Output of compilation command:
\n
{}
'
.
format
(
res
))
\ No newline at end of file
This diff is collapsed.
Click to expand it.
binaryc/lib_custom_logging.so
deleted
100755 → 0
+
0
−
0
View file @
b617bec4
File deleted
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment