Skip to content

Commit

Permalink
fix compile options for GCC 4.9.2 on Linx
Browse files Browse the repository at this point in the history
  • Loading branch information
changgang committed Mar 29, 2020
1 parent 79149f3 commit aee4c2b
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 5 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Simulation Toolkit for Electrical Power Systems
- Maintainer: Changgang Li <[email protected]> from School of Electrical Engineering, Shandong University.
- Documentation: [N/A]
- Date of Readme: March. 8, 2020
- Date of Readme: March. 29, 2020

## Major functions
Simulation Toolkit for Electrical Power Systems (STEPS) is an open source power system simulator designed for balanced large-scale AC-DC hybrid power system analysis.
Expand All @@ -20,15 +20,15 @@ Though BLAS, CBLAS, and other SuiteSparse codes are included in the package, the

## Prerequisite
1. Install Code::Blocks.
2. Install C and C++ compiler supprting C++17. GCC is recommended.
2. Install C and C++ compiler supprting C++14. GCC>=4.9 is recommended.
- For Unix-like systems, follow guides to install gcc and g++ with the latest version.
- For Windows system, MinGW-64 is suggested.
- Go to http://mingw-w64.org/ and go to its sourceforge download site for the latest version.
- Install 32-bit version or 64-bit version as you like. 64-bit version is recommended.
3. Start Code::Blocks, and configure its toolchain exectuable.
4. Install Python if you want to try the stepspy module. 64-bit version is recommended. However, if you want to use 32-bit dynamic library of STEPS, you should install Python of the 32-bit version.

## How to build
## How to build with Code::Blocks
1. Compile CSparse
1. Open csparse.cbp in the code/ folder with Code::Blocks.
2. Go 'Project'-'Properties'-'Build targets'and set type as 'static library'.
Expand Down Expand Up @@ -56,6 +56,13 @@ Here is a complete procedure of how to build STEPS.
3. Compile CppTest as static library. You can find CppTest.cbp in the code/ folder.
4. Compile STEPS as dynamic library or exectuable file. Include libCSparse.a, libCXSparse.a, and libCpptest.a.

## How to build in shell mode (Linux)
To build in Linux shell mode, you can simply run the linux_make.sh.
There is the procedure:
1. Download and install the cbp2make from https://sourceforge.net/projects/cbp2make/. Remember to add x mode to the cbp2make file to make executable.
2. Add x mode to the linux_make.sh file to make it executable.
3. Run linux_make.sh.

## How to use stepspy
stepspy is a Python module of advanced APIs of STEPS. It enables most of STEPS applications. It is recommended to use stepspy in Python 3 of 64-bit version.

Expand Down
2 changes: 0 additions & 2 deletions code/steps/STEPS.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<Linker>
<Add option="-static-libstdc++" />
<Add option="-static-libgcc" />
<Add option="-static" />
<Add option="-fopenmp" />
<Add option="-march=native" />
<Add library="../../build/bin/release/libCSparse.a" />
Expand Down Expand Up @@ -405,7 +404,6 @@
<Option link="0" />
</Unit>
<Unit filename="main_tests.cpp">
<Option compile="0" />
<Option link="0" />
</Unit>
<Unit filename="main_ufls_simulation.cpp">
Expand Down
1 change: 1 addition & 0 deletions code/thirdparty/csparse.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<Add option="-O3" />
<Add option="-Wall" />
<Add option="-std=c++14" />
<Add option="-fPIC" />
<Add option="-march=native" />
<Add option="-funroll-loops" />
<Add option="-malign-double" />
Expand Down
1 change: 1 addition & 0 deletions code/thirdparty/cxsparse.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<Add option="-O3" />
<Add option="-Wall" />
<Add option="-std=c++14" />
<Add option="-fPIC" />
<Add option="-march=native" />
<Add option="-funroll-loops" />
<Add option="-malign-double" />
Expand Down
170 changes: 170 additions & 0 deletions code/thirdparty/cxsparse.depend
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# depslib dependency file v1.0
1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_add.c
"cxs.h"

1579501048 d:\steps\code\thirdparty\suitesparse\cxsparse\include\cxs.h
<stdlib.h>
<limits.h>
<math.h>
<stdio.h>
<complex>
<complex.h>
"SuiteSparse_config.h"

1574318720 d:\steps\code\thirdparty\suitesparse\suitesparse_config\suitesparse_config.h
<limits.h>
<stdlib.h>

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_amd.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_chol.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_cholsol.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_compress.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_convert.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_counts.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_cumsum.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_dfs.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_dmperm.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_droptol.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_dropzeros.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_dupl.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_entry.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_ereach.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_etree.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_fkeep.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_gaxpy.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_happly.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_house.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_ipvec.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_leaf.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_load.c
"cxs.h"

1581258256 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_lsolve.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_ltsolve.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_lu.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_lusol.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_malloc.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_maxtrans.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_multiply.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_norm.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_permute.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_pinv.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_post.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_print.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_pvec.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_qr.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_qrsol.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_randperm.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_reach.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_scatter.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_scc.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_schol.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_spsolve.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_sqr.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_symperm.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_tdfs.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_transpose.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_updown.c
"cxs.h"

1581255946 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_usolve.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_util.c
"cxs.h"

1579501048 source:d:\steps\code\thirdparty\suitesparse\cxsparse\source\cs_utsolve.c
"cxs.h"

0 comments on commit aee4c2b

Please sign in to comment.