Problems with gascoigne 3d on WSL2 - windows-subsystem-for-linux

I am trying to install Gascoigne 3D on my local computer. I use WSL2 Ubuntu 20.04. For installing Gasgoicne 3D I followed this website https://www.math.uni-magdeburg.de/~richter/gascoigne/index.php?show=downloadinstallation
Everything worked. Now I want to install the tutorial (https://www.math.uni-magdeburg.de/~richter/gascoigne/index.php?show=documentationtutorial), which works as well. But once I want to run problem 1 I get a Segmentation fault.
My output looks like this:
(base) tasha#laptop:~/GAS/gascoigne-tutorial/Problems/problem1$ ../../../bin-tutorial/problem1
Warning: DirichletData without colors and comp_on_color
Warning: DirichletData without colors and comp_on_color
2D Mesh: 57 nodes, 34 lines, 40 quads
ProjectBoundary not written
================== 1 ================ [l,n,c] 2 708 640
==================================================
Solver: StdSolver
Discretization: CG Discretization
DirichletData: Bench
BoundaryManager: Std
ComponentInformation: ComponentInformationBase
==================================================
[Results/solve.00000.vtk]
0: 3.07e-02
Segmentation fault
I assume that there might be a problem with my WSL2 configuration.
Cheers,
Tasha

Related

required libraries works only from second time on Сolab when using TF2 for mask rsss

could you please help me with following problem: I used TF2 for MaskRCNN. The first cell gives such error. I did it looking here
first cell
!apt-get update
!pip3 install scikit-image==0.16.2
!pip3 install opencv-python
!pip3 install tensorflow==2.2.0
!pip3 install keras==2.3.1
ERROR
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xarray-einstats 0.4.0 requires scipy>=1.6, but you have scipy 1.4.1 which is incompatible.
plotnine 0.8.0 requires scipy>=1.5.0, but you have scipy 1.4.1 which is incompatible.
jaxlib 0.3.25+cuda11.cudnn805 requires scipy>=1.5, but you have scipy 1.4.1 which is incompatible.
jax 0.3.25 requires scipy>=1.5, but you have scipy 1.4.1 which is incompatible.
google-api-core 2.11.0 requires google-auth<3.0dev,>=2.14.1, but you have google-auth 1.35.0 which is incompatible.
screenshot of this error
Then I run the same cell again without changing anything and it works without error. I can’t understand why it does this and why it doesn’t work the first time, but the second.
By the way I tried to download the necessary packages indicating the version, anyway, the second cell worked without error on the second restart, I also tried not to download the packages at all and they were by default in Colab there, the same story, the second cell worked without error on the second restart.
and in the same project I have another problem and if they are related please tell me. I can't figure out why Google Collab doesn't use the GPU to train the model. The training for epoch 2 lasted 2 hours. Colab uses only RAM and no GPU, although I indicated Runtime type - GPU.
The configuration is like this and I have 300 images for training with size 640*480.
class CbcConfig(mrcnn.config.Config):
NAME = "cbc_cfg"
# Train on 1 GPU and 2 images per GPU. We can put multiple images on each
# GPU because the images are small. Batch size is 2 (GPUs * images/GPU).
GPU_COUNT = 1
IMAGES_PER_GPU = 2
# number of classes (background + 3 blood cells)
NUM_CLASSES = 1+3
LEARNING_RATE = 0.001
STEPS_PER_EPOCH = 100

Library not loaded: #rpath/libtbb.dylib in Prophet / Python

I'm on a Mac X1, Monterey.
I've installed prophet and run into this issue when trying to fit a model.
RuntimeError: Error during optimization: console log output:
dyld[90668]: Library not loaded: #rpath/libtbb.dylib
Referenced from: /Users/{username}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/prophet_model.bin
Reason: tried: '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file)
I know this has to do with the wrong paths being searched. I can find the dylib in
/Users/{user}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/
But, it seems prophet doesn't know to look there. I'm curious how I can update/fix either the rpath variable or find another solution?
I tried to create a symbolic link with sudo ln -s, but don't have permissions on the laptop.
TIA!
I got it to work on Apple Silicon (M1 Max in my case) by installing older versions of both pystan and prophet:
pip install pystan==2.19.1.1
pip install prophet==1.0
The other important piece of the puzzle is that you should use Python 3.8 to get it working.
Installing older versions of the libraries and using Python 3.8 are both talked about in issue #2002 on Github, but there's not really an explanation of the libtbb.dylib error message.

LaTeX Error: File `type1cm.sty' not found

I need to export a figure from matplotlib without type 3 fonts on MacOS.
I found that I have to set the following rc parameters:
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
However, the legend of my plot still remains a type 3 font
Therefore I tried
matplotlib.rcParams['ps.useafm'] = True
matplotlib.rcParams['pdf.use14corefonts'] = True
matplotlib.rcParams['text.usetex'] = True
Unfortunately, this produces the following error message
RuntimeError: latex was not able to process the following string: b'lp'
Here is the full report generated by latex:
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(/Users/FPJ21JY/.matplotlib/tex.cache/a35fe2eb053428dbc0f7479b65fdb72f.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
(/usr/local/texlive/2021basic/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2021basic/texmf-dist/tex/latex/base/size10.clo))
! LaTeX Error: File `type1cm.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.5 \usepackage
{type1ec}^^M
No pages of output.
Transcript written on a35fe2eb053428dbc0f7479b65fdb72f.log.
I installed latex via macports (as proposed in this thread) with
sudo port install texlive texlive-latex-extra
however, the problem still remains.
After the latex installation and rebooting my system I receive the following error
RuntimeError: latex was not able to process the following string:
b'\\n\\\\begin{figure}\\n \\\\centering\\\\leavevmode\\n \\\\psfrag{psmarker0}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 20 %}}\\n\\\\psfrag{psmarker1}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 40 %}}\\n\\\\psfrag{psmarker2}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 60 %}}\\n\\\\psfrag{psmarker3}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 80 %}}\\n\\\\psfrag{psmarker4}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 100 %}}\\n\\\\psfrag{psmarker5}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily Training Progress}}\\n\\\\psfrag{psmarker6}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 0 %}}\\n\\\\psfrag{psmarker7}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 20 %}}\\n\\\\psfrag{psmarker8}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 40 %}}\\n\\\\psfrag{psmarker9}[bl][bl][1][0.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily 60 %}}\\n\\\\psfrag{psmarker10}[bl][bl][1][90.000000]{\\\\fontsize{8.000000}{10.000000}\\\\color[rgb]{0.150,0.150,0.150} {\\\\sffamily Accuracy of the adversary network}}\\n \\\\includegraphics*[angle=0]{/private/var/folders/dh/pdrb38k971x8m88wytxg4klw0000gq/T/tmp_0z8vuur/tmp.ps}\\n\\\\end{figure}'
Can anybody please help me?
You seem to be missing a latex package (type1cm). This might not have been part of the texlive or texlive-latex-extra packages that you already installed. Try to install texlive-type1cm using sudo port install texlive-type1cm which should provide the missing package.
Try installing both
'texlive-latex-extra'
and
'cm-super'

How to fix Illegal instruction (core dumped)

Hi i am trying to fix this issue when i run python3 brain.py below i get this error
Illegal instruction (core dumped)
from imageai.Prediction import ImagePrediction
import os
execution_path=os.getcwd()
prediction = ImagePrediction()
prediction.setModelTypeAsSqueezeNet()
prediction.setModelPath(os.path.join(execution_path, "squeezenet_weights_tf_dim_ordering_tf_kernels.h5"))
prediction.loadModel()
predictions, probabilities = prediction.predictImage(os.path.join(execution_path, "giraffe.jpg"), result_count=5 )
for eachPrediction, eachProbability in zip(predictions, probabilities):
print(eachPrediction , " : " , eachProbability)
I have tried to downgrade Tensorflow to 1.5.0 but then after i run that i get these errors
[ons mar 25 23:11:45] Jonathan#Whats next?:~/ReallySmartBrain$ pip3 install tensorflow==1.5.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tensorflow==1.5.0 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 1.15.2, 2.0.0a0, 2.0.0b0, 2.0.0b1, 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2, 2.1.0, 2.2.0rc0, 2.2.0rc1)
ERROR: No matching distribution found for tensorflow==1.5.0
The other solution is to compile it from source code but i'don't have any idea to compile it from source code.
Can i fix this anyway?
I had the same problem. It seems that this problem is for older CPUs. As you said, one solution is with a downgrade to tensorflow 1.5.0.
The other solution (that one that worked for me) is to build tensorflow from source.
I compiled the version 2.1.0, it took me around 25 hours with a Intel(R) Pentium(R) Dual CPU T2370 # 1.73GHz and 2GB RAM.
You would need to install the proper version of Bazel. Find below the complete instructions from tensorflow:
https://www.tensorflow.org/install/source
I needed to add a swap file of 4GB. Otherwise you will go out of memory during the compilation.
Anyway, I have uploaded my .whl file in case you don't want to expend 25 hours (or more) to compile your own file:
https://drive.google.com/open?id=1ISgMcDiCw5W5MFvS5Zbme6pNBbA7xWMH
I've got a similar problem with an old CPU on a vintage Mac OS now running Linux because no recent Mac OS can run on it. I've tried to compile from sources and got a bunch of problems (Bazel, compiler, flags, dependencies, ...). Finally, I've lost few hours to learn that could be a real nightmare. Good advice, don't even try it!

Libfreenect2 USB connection failure

I have been trying to get the libfreenect2 library up and running on my Windows 10 machine and I have run into an issue that I can't get past. I have build the library and it's examples. The issues I have is when I go to run the "Protonect" example code. The output I get is listed below:
$ ./install/bin/Protonect.exe
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: U:\Repositories\libfreenect2\build\install\bin\Protonect.exe [-gpu=<id>] [gl | cl | clkde | cuda | cudakde | cpu] [<device serial>]
[-noviewer] [-norgb | -nodepth] [-help] [-version]
[-frames <number of frames to process>]
To pause and unpause: pkill -USR1 Protonect
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 8 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 #12:2 with serial 003370163847
[Info] [Freenect2Impl] found 1 devices
Pipeline Not-Used
libusb_open returned: -99
BLAH BLAH BLAH
[Error] [Freenect2Impl] failed to open Kinect v2: #12:2 LIBUSB_ERROR_OTHER Other error
failure opening device!
Please ignore the "BLAH BLAH BLAH" I was using that as print statement debugging. I think I have traced the issue all the way down to this section of the core.c file libusb_open() function in libusb library:
r = usbi_backend->open(_dev_handle);
if (r < 0) {
usbi_dbg("open %d.%d returns %d", dev->bus_number, dev->device_address, r);
libusb_unref_device(dev);
usbi_mutex_destroy(&_dev_handle->lock);
free(_dev_handle);
return r;
}
I couldn't find anything on the error code -99 so that is where my debugging ended. From what I understand it seems that the example code can't open the USB device to the Kinect for some reason.
I have tested the Kinect with Kinect Studio using the windows SDK and that has no problem picking up the Kinect feeds. Has anyone run into this issue before and how did you solve it? Any suggestions for what the error code means or how I might fix the USB opening issue?
The problem ended up solving itself. Through a series of debugging attempts which you can see here:
https://github.com/OpenKinect/libfreenect2/issues/812#issuecomment-288143166
I ended up reinstalling usbdk 1.0.17 and magically everything worked again. Apparently there are some issues with with usbdk 1.0.17 which require it to be reinstalled to fix some of the issues. Idk why, but if anyone comes across this issue in the future, this way my fix.