ubuntu / Mint Linux distributions

51 views
Skip to first unread message

E&N_MPEI E&N_MPEI

unread,
Jan 7, 2021, 8:56:53 AM1/7/21
to DEVSIM TCAD

Hello

Looking at source file I found script named “build_ubuntu_18.04.sh”.

The question is how to compile DevSim under Ubuntu (or Mint) distribution?

If I use this script directly, I will see error at 36%:


~/DevSim/src/AutoEquation/ModelExprEval.cc:41:10: fatal error: EngineAPI.hh: there is no such file or directory

41 | #include "EngineAPI.hh"

| ^~~~~~~~~~~~~~

compilation terminated.


All dependencies are installed. The use of “install_miniconda_linux.sh” and “install_ubuntu_depend.sh” do not find any new packages to load.

There is an instruction to use “.travis.yml” script in “Install” file. I am not familiar with yml scripts, how should I launchg it?

Juan Sanchez

unread,
Jan 7, 2021, 9:02:25 AM1/7/21
to E&N_MPEI E&N_MPEI, DEVSIM TCAD
Hello,

"EngineAPI.hh" is from symdiff, which can be loaded using:
git submodule init
git submodule update

The submodule initialization step was assumed to have been done before
running the script.

Regards,

Juan
> --
> You received this message because you are subscribed to the Google Groups "DEVSIM TCAD" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to devsim+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/e66e7d81-89c6-44f5-9ce8-f660e858385fn%40googlegroups.com.

E&N_MPEI E&N_MPEI

unread,
Jan 8, 2021, 3:03:10 AM1/8/21
to DEVSIM TCAD

Thanks that worked, but now compilation terminated at 98%:


~/DevSim/external/symdiff/src/pycomp/PythonSymdiffCommands.cc:23:10: fatal error: Python.h: No such file or directory

23 | #include "Python.h"

| ^~~~~~~~~~

compilation terminated.

make[2]: *** [src/pycomp/CMakeFiles/symdiff_py3.dir/build.make:63: src/pycomp/CMakeFiles/symdiff_py3.dir/PythonSymdiffCommands.o] Error 1

make[1]: *** [CMakeFiles/Makefile2:289: src/pycomp/CMakeFiles/symdiff_py3.dir/all] Error 2


четверг, 7 января 2021 г. в 17:02:25 UTC+3, jsanchez:

Juan Sanchez

unread,
Jan 8, 2021, 10:00:13 AM1/8/21
to E&N_MPEI E&N_MPEI, DEVSIM TCAD
Hi,

Please see:
scripts/install_ubuntu_depend.sh

and that should get you further.

Regards,

Juan
> To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/8a848c32-2c3b-46c9-854b-0b32dc92f4ecn%40googlegroups.com.

E&N_MPEI E&N_MPEI

unread,
Jan 9, 2021, 4:56:38 AM1/9/21
to DEVSIM TCAD
Done this even befor first try

пятница, 8 января 2021 г. в 18:00:13 UTC+3, juan.e....@gmail.com:

Juan Sanchez

unread,
Jan 9, 2021, 10:10:37 AM1/9/21
to E&N_MPEI E&N_MPEI, DEVSIM TCAD
Hi,

Please see which python 3 version you have installed on your system.
devsim will work with python 3.6 or higher.

Please check the file:
cmake/ubuntu_18.04.cmake

and check these entries
SET (PYTHON3_INCLUDE /usr/include/python3.6m)
SET (PYTHON3_ARCHIVE -L /usr/lib/x86_64-linux-gnu -lpython3.6m)

and make sure they are consistent with the entries in the file:
external/symdiff_ubuntu_18.04.sh

PYTHON3_ARCHIVE="/usr/lib/x86_64-linux-gnu/libpython3.6m.so"
PYTHON3_INCLUDE="/usr/include/python3.6m"

Being a configuration time variable, please EITHER remove these directories:
external/symdiff/linux_x86_64_debug
external/symdiff/linux_x86_64_release

OR edit the PYTHON3_ARCHIVE and PYTHON3_INCLUDE variables in
external/symdiff/linux_x86_64_release/CMakeCache.txt

and rerun this line from:
scripts/build_ubuntu_18.04.sh

(cd external/symdiff && bash ../symdiff_ubuntu_18.04.sh && cd
linux_x86_64_release && make -j2)

Regards,

Juan
> To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/aba95cbd-6fed-4125-9fe0-e961e23dfe41n%40googlegroups.com.

E&N_MPEI E&N_MPEI

unread,
Jan 10, 2021, 6:17:07 AM1/10/21
to DEVSIM TCAD
Hi,
1) I use python 3.8
2) Entries are not consistent:
in cmake/ubuntu_18.04.cmake
SET (PYTHON37_INCLUDE   /usr/include/python3.6m)
SET (PYTHON37_ARCHIVE -L /usr/lib/x86_64-linux-gnu -lpython3.6m)

in external/symdiff_ubuntu_18.04.sh
PYTHON3_INCLUDE="/usr/include/python3.6m"
PYTHON3_ARCHIVE="/usr/lib/x86_64-linux-gnu/libpython3.6m.so"

3) I checked this derictories and found that there is no such files. As far as I use Python 3.8, I found entries named libpython3.8.so and python3.8. So I changed files like this:

in cmake/ubuntu_18.04.cmake

SET (PYTHON3_ARCHIVE -L /usr/lib/x86_64-linux-gnu/libpython3.8.so)

SET (PYTHON3_INCLUDE /usr/include/python3.8)


in external/symdiff_ubuntu_18.04.sh

PYTHON3_ARCHIVE="/usr/lib/x86_64-linux-gnu/libpython3.8.so"

PYTHON3_INCLUDE="/usr/include/python3.8"


Now entries are exactly the same. But this variant will also give the same error at 98%.

So I decided to change to make this strings look like this:

in cmake/ubuntu_18.04.cmake

SET (PYTHON37_INCLUDE /usr/include/python3.8)

SET (PYTHON37_ARCHIVE -L /usr/lib/x86_64-linux-gnu/libpython3.8.so)


in external/symdiff_ubuntu_18.04.sh

PYTHON3_INCLUDE="/usr/include/python3.8"

PYTHON3_ARCHIVE="/usr/lib/x86_64-linux-gnu/libpython3.8.so"


Now all compilation process completed at 100% without any errors. But at the end of compilation process I see this message in terminal:

Scanning dependencies of target pythonapi_interpreter_py37

[ 97%] Building CXX object src/pythonapi/CMakeFiles/pythonapi_interpreter_py37.dir/GetArgs.o

[ 97%] Building CXX object src/pythonapi/CMakeFiles/pythonapi_interpreter_py37.dir/PythonCommands.o

[ 97%] Building CXX object src/pythonapi/CMakeFiles/pythonapi_interpreter_py37.dir/CommandHandler.o

[ 98%] Building CXX object src/pythonapi/CMakeFiles/pythonapi_interpreter_py37.dir/ObjectHolder.o

[ 98%] Building CXX object src/pythonapi/CMakeFiles/pythonapi_interpreter_py37.dir/OutputStream.o

[ 99%] Building CXX object src/pythonapi/CMakeFiles/pythonapi_interpreter_py37.dir/Interpreter.o

[ 99%] Built target pythonapi_interpreter_py37

[ 99%] Linking CXX shared library devsim_py3.so

[100%] Built target devsim_py37

must specify dir name


Now I can see “linux_x86_64_release” directory, but there is no “lib” directory in it or in any sub folder.

~/DevSim/linux_x86_64_release$ ls

CMakeCache.txt cmake_install.cmake Makefile testing CMakeFiles CTestTestfile.cmake src


суббота, 9 января 2021 г. в 18:10:37 UTC+3, juan.e....@gmail.com:

Juan Sanchez

unread,
Jan 10, 2021, 4:05:48 PM1/10/21
to E&N_MPEI E&N_MPEI, DEVSIM TCAD
Hello,

It has successfully built, and now needs to be packaged. Please
provide an argument to the build script:
build_ubuntu_18.04.sh devsim_test

or go into the "dist" directory and try:
bash package_linux.sh devsim_test

You should now see this package:
dist/devsim_test.tgz

To run the application, you would set PYTHONPATH to your installation
directory. For example:
export PYTHONPATH=/path/to/devsim_test/lib

From the python shell you should be able to type:
import devsim

and that should work correctly. There are example scripts in the
"testing" and "examples" directories.

Regards,

Juan
> To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/45a22e1a-877a-40cf-81ff-bc209c42a262n%40googlegroups.com.

Juan Sanchez

unread,
Jan 10, 2021, 4:14:53 PM1/10/21
to E&N_MPEI E&N_MPEI, DEVSIM TCAD
Hello,

Where are you cloning the repository from? The PYTHON3_INCLUDE
variables were renamed several commits ago. I recommend using the
"main" branch from https://github.com/devsim/devsim.

Regards,

Juan
> To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/45a22e1a-877a-40cf-81ff-bc209c42a262n%40googlegroups.com.

E&N_MPEI E&N_MPEI

unread,
Jan 12, 2021, 4:59:28 AM1/12/21
to DEVSIM TCAD
Thx a lot for your help! Now everything works.
I used https://github.com/devsim/devsim/tree/r1.4.14 as it was marked as latest release
Now i cloned "main" branch, changed cmake/ubuntu_18.04.cmake and external/symdiff_ubuntu_18.04.sh to Python 3.8 files, and all was compiled without any errors. After that I packaged files with your instruction without problems and after creating PYTHONPATH variable everything works well. 

понедельник, 11 января 2021 г. в 00:14:53 UTC+3, jsanchez:

Juan Sanchez

unread,
Jan 23, 2021, 2:55:12 PM1/23/21
to E&N_MPEI E&N_MPEI, DEVSIM TCAD
Hi,

I am glad you were able to get the software to compile and run. The
ubuntu script builds against the system blas/lapack routines and the
direct solver uses an old version of SuperLU. The build used for the
release binaries on Github uses the Intel MKL with Intel Pardiso LU
Solver. It's build script can be built in a Centos 7 docker image.
Please see devsim /.travis.yml for how the docker image is invoked.

Regards,

Juan
> To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/8ad4558a-1870-4baf-a290-be24a5924013n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages