Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc #32

Open
szcf-weiya opened this issue Jun 3, 2021 · 17 comments
Open

misc #32

szcf-weiya opened this issue Jun 3, 2021 · 17 comments

Comments

@szcf-weiya
Copy link
Owner

szcf-weiya commented Jun 3, 2021

evince from terminal

** (evince:24685): WARNING **: 22:56:29.944: AT-SPI: Could not obtain desktop path or name

the pdf file can be properly opened.

@szcf-weiya szcf-weiya changed the title evince from terminal misc Jun 6, 2021
@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Jun 6, 2021

strange icon on G40

Screenshot from 2021-06-06 11-49-35
install (refer to https://askubuntu.com/questions/136473/how-do-i-change-the-icon-theme-in-ubuntu)

sudo apt-get install gnome-tweak-tool

then run

gnome-tweaks

Screenshot from 2021-06-06 12-00-30
switch the theme from HighContrast to Ubuntu-mono-light.
now it becomes
Screenshot from 2021-06-06 12-01-38

@szcf-weiya
Copy link
Owner Author

cannot open jupyter notebook on chpc

image
since currently I cannot access the tmux session open on sandbox, I cannot get the detailed log info, so I try to open a new jupyter notebook, it throws that

$ jupyter notebook
...
[E 16:17:10.962 NotebookApp] Failed to write server-info to /storage01/users/s**********/.local/share/jupyter/runtime/nbserver-124579.json: [Errno 122] Disk quota exceeded: '/storage01/users/s**********/.local/share/jupyter/runtime/nbserver-124579.json'
Traceback (most recent call last):
  File "/users/s**********/miniconda3/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
  File "/users/s**********/miniconda3/lib/python3.7/site-packages/jupyter_core/application.py", line 268, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/users/s**********/miniconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 845, in launch_instance
    app.start()
  File "/users/s**********/miniconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1933, in start
    self.write_browser_open_file()
  File "/users/s**********/miniconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1842, in write_browser_open_file
    with open(self.browser_open_file, 'w', encoding='utf-8') as f:
OSError: [Errno 122] Disk quota exceeded: '/storage01/users/s**********/.local/share/jupyter/runtime/nbserver-124579-open.html'

@szcf-weiya
Copy link
Owner Author

tips on iPad

when uploading photos to onedrive, select no more than 30 images, then the icon of onedrive would appear, otherwise, the icon won't show. Although it can be saved via save to files for more than 30 images, it will directly save the .HEIC format instead of .jpg.

@szcf-weiya
Copy link
Owner Author

fail to download in chrome

failed on a HTTP website,
try wget instead, but remember to use HTTP
image

@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Jul 16, 2021

upgrade notes for fRLR

upgrade document to roxygen2

> devtools::document()
Warning: The existing 'NAMESPACE' file was not generated by roxygen2, and will not be overwritten.
Warning: The existing 'frlr1.Rd' file was not generated by roxygen2, and will not be overwritten.
Warning message:
roxygen2 requires Encoding: UTF-8 

and UTF-8 to avoid the warning, https://stackoverflow.com/questions/51694929/warning-about-utf-8-with-roxygen2

not available for .Call() for package "fRLR"

> frlr1(X, Y, COV)
Error in .Call("_fRLR_frlr1", PACKAGE = "fRLR", R_X, R_Y, R_COV) : 
  "_fRLR_frlr1" not available for .Call() for package "fRLR"

refer to https://stackoverflow.com/questions/58132832/error-function-is-not-available-for-call-for-package-x and https://r-pkgs.org/src.html#cpp, and also need to update the NAMESPACE since by default it did not update after rebuilding,

> devtools::document()
Updating fRLR documentation
Loading fRLR
Writing NAMESPACE
Writing NAMESPACE
  • load fRLR.Rproj in Rstudio, tried Test Package, but throws
Error: No testthat directories found in /media/weiya/PSSD/GitHub/fRLR
Execution halted

Exited with status 1.

following https://github.com/szcf-weiya/prin_curve/tree/master/tests, add such folder.

R 3.6.3 with as-cran after install libcurl4-openssl-dev

$ R CMD check --as-cran fRLR_1.2.tar.gz 
* using log directory ‘/media/weiya/PSSD/GitHub/fRLR.Rcheck’
* using R version 3.6.3 (2020-02-29)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
* checking for file ‘fRLR/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘fRLR’ version ‘1.2’
* package encoding: UTF-8
* checking CRAN incoming feasibility ...
 *** caught segfault ***
address 0x77346, cause 'memory not mapped'

Traceback:
 1: curlGetHeaders(u)
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
 5: tryCatch(curlGetHeaders(u), error = identity)
 6: .fetch(u)
 7: .check_http_A(u)
 8: FUN(X[[i]], ...)
 9: lapply(urls[pos], .check_http)
10: do.call(rbind, lapply(urls[pos], .check_http))
11: check_url_db(url_db_from_package_sources(dir), remote = remote)
12: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
14: tryCatchList(expr, classes, parentenv, handlers)
15: tryCatch(check_url_db(url_db_from_package_sources(dir), remote = remote),     error = identity)
16: .check_package_CRAN_incoming(pkgdir, localOnly)
17: check_CRAN_incoming(!check_incoming_remote)
18: tools:::.check_packages()
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault (core dumped)

and it throws

> library(curl)
Error: package or namespace load failed forcurlin dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/weiya/R/x86_64-pc-linux-gnu-library/3.6/curl/libs/curl.so':
  /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /home/weiya/R/x86_64-pc-linux-gnu-library/3.6/curl/libs/curl.so)

> library(Rcpp)
Error: package or namespace load failed for ‘Rcpp’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/Rcpp.so':
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/Rcpp.so)

tried

$ conda update r-essentials
$ conda install gcc_linux-64

use rstudio in env R4.1.0

open rstudio after activating R4.1.0, then it throws,

> library(fRLR)
Error: package or namespace load failed for ‘fRLR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/Rcpp.so':
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/Rcpp.so)

but pure R works well.

check the library

$ ldd /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/Rcpp.so
	linux-vdso.so.1 (0x00007ffd7673a000)
	libR.so => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/libR.so (0x00007f2dd788f000)
	libstdc++.so.6 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../../libstdc++.so.6 (0x00007f2dd7dae000)
	libgcc_s.so.1 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../../libgcc_s.so.1 (0x00007f2dd7d9a000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2dd7467000)
	libblas.so.3 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libblas.so.3 (0x00007f2dd5443000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2dd50a5000)
	libgomp.so.1 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libgomp.so.1 (0x00007f2dd5078000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2dd4e59000)
	libreadline.so.8 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libreadline.so.8 (0x00007f2dd4e03000)
	libpcre2-8.so.0 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libpcre2-8.so.0 (0x00007f2dd4d5e000)
	liblzma.so.5 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../liblzma.so.5 (0x00007f2dd4d35000)
	libbz2.so.1.0 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libbz2.so.1.0 (0x00007f2dd4d21000)
	libz.so.1 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libz.so.1 (0x00007f2dd4d07000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2dd4aff000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2dd48fb000)
	libiconv.so.2 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libiconv.so.2 (0x00007f2dd4815000)
	libicuuc.so.68 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libicuuc.so.68 (0x00007f2dd4629000)
	libicui18n.so.68 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../../libicui18n.so.68 (0x00007f2dd4325000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2dd7d6c000)
	libgfortran.so.5 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../.././libgfortran.so.5 (0x00007f2dd4185000)
	libtinfo.so.6 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../.././libtinfo.so.6 (0x00007f2dd4147000)
	libicudata.so.68 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../.././libicudata.so.68 (0x00007f2dd2606000)
	libquadmath.so.0 => /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/../../../lib/../.././libquadmath.so.0 (0x00007f2dd25ca000)

this can be solved by adding

export LD_LIBRARY_PATH=/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib:$LD_LIBRARY_PATH

before running rstudio, and it can be checked that the configure env in Rstudio by typing

$ echo $LD_LIBRARY_PATH 
/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/lib::/usr/local/lib::::/usr/local/lib

in its builtin terminal

in pure R,

> Sys.getenv()
LD_LIBRARY_PATH         :/usr/local/lib

while in rstudio,

LD_LIBRARY_PATH      /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/lib::/usr/local/lib::::/usr/local/lib

set inside the rstudio session is not enough,

> Sys.setenv(LD_LIBRARY_PATH="/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib")
> library(Rcpp)
Error: package or namespace load failed for ‘Rcpp’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/Rcpp.so':
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R/library/Rcpp/libs/Rcpp.so)
> system("echo $LD_LIBRARY_PATH")
/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib

temporary solution is to add

.First <- function(){
	Sys.setlocale("LC_TIME","en_US.utf8")
+    if (R.home() == "/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib/R")
+        Sys.setenv(LD_LIBRARY_PATH="/media/weiya/PSSD/Programs/anaconda3/envs/R4.1.0/lib:$LD_LIBRARY_PATH")
}

in ~/.Rprofile, more explanation on Rprofile refers to

Warning: stack imbalance in 'withVisible', 37 then 139

https://stackoverflow.com/questions/6779530/what-is-a-stack-imbalance/6779895

A stack imbalance occurs when the data structure used to keep track of called functions, arguments, and return values becomes corrupted or misaligned.

Most times, the stack is a memory pointer that stores the address where control will resume when the current function call exits back to the caller. There are different variants on this, sometimes the arguments to a function are also appended to the stack, as well as the return value. What is most important here is that the caller and callee should agree upon how to restore it back to the prior state when the callee exits. This agreement is frequently known as the Calling Convention.

and recall Brian's comment,

This started with Rcpp's update to 1.0.7, and seems to be (on most platforms) corrupting R's memory allocations which has made it impossible so far to get a handle on it.

@szcf-weiya
Copy link
Owner Author

upgrade memory

currently, it seems that there are two empty slots, but I remember that only two slots are available.

$ sudo lshw -class memory 
[sudo] password for weiya: 
  *-cache:0                 
       description: L1 cache
       physical id: 2
       slot: L1 Cache
       size: 128KiB
       capacity: 128KiB
       capabilities: synchronous internal write-back data
       configuration: level=1
  *-cache:1
       description: L1 cache
       physical id: 3
       slot: L1 Cache
       size: 128KiB
       capacity: 128KiB
       capabilities: synchronous internal write-back instruction
       configuration: level=1
  *-cache:2
       description: L2 cache
       physical id: 4
       slot: L2 Cache
       size: 1MiB
       capacity: 1MiB
       capabilities: synchronous internal write-back unified
       configuration: level=2
  *-cache:3
       description: L3 cache
       physical id: 5
       slot: L3 Cache
       size: 6MiB
       capacity: 6MiB
       capabilities: synchronous internal write-back unified
       configuration: level=3
  *-memory
       description: System Memory
       physical id: 7
       slot: System board or motherboard
       size: 8GiB
     *-bank:0
          description: SODIMM DDR4 Synchronous 2133 MHz (0.5 ns)
          product: HMA451S6AFR8N-TF
          vendor: SK Hynix
          physical id: 0
          serial: 37182334
          slot: ChannelA-DIMM0
          size: 4GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:1
          description: [empty]
          physical id: 1
          slot: ChannelA-DIMM1
     *-bank:2
          description: SODIMM DDR4 Synchronous 2133 MHz (0.5 ns)
          product: M471A5143EB0-CPB
          vendor: Samsung
          physical id: 2
          serial: 23040000
          slot: ChannelB-DIMM0
          size: 4GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:3
          description: [empty]
          physical id: 3
          slot: ChannelB-DIMM1
  *-firmware
       description: BIOS
       vendor: LENOVO
       physical id: d
       version: R07ET62W (2.02 )
       date: 03/04/2016
       size: 128KiB
       capacity: 15MiB
       capabilities: pci pnp upgrade shadowing cdboot bootselect edd int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb biosbootspecification uefi
  *-memory UNCLAIMED
       description: Memory controller
       product: 100 Series/C230 Series Chipset Family Power Management Controller
       vendor: Intel Corporation
       physical id: 1f.2
       bus info: pci@0000:00:1f.2
       version: 31
       width: 32 bits
       clock: 33MHz (30.3ns)
       configuration: latency=0
       resources: memory:f2244000-f2247fff

other notes also mentioned that there is only two memory slots,
http://www.ibmbjb.com/thread-347311-1-1.html
image
and https://gaopc.cn/6165.html

联想ThinkPad T460P在出厂的时候搭载了DDR4 2133MHZ 4GB内存,具有两个内存插槽,最大支持32GB内存扩展。

a candidate: https://www.amazon.com/Tech-PC4-17000-Notebook-Computer-AT16G1D4S2133ND8N12V/dp/B07KGLTT7V/

note that the maximum ram speed would depend on the CPU https://www.shareus.com/computer/how-to-check-maximum-ram-speed-supported-by-your-computer.html

and the supported RAM types of Intel® Core™ i5-6300HQ CPU is (refer to https://www.cpu-world.com/CPUs/Core_i5/Intel-Core%20i5-6300HQ%20Mobile%20processor.html)

Supported memory: DDR3L-1600, LPDDR3-1866, DDR4-2133

@szcf-weiya
Copy link
Owner Author

image

@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Aug 16, 2021

1m_ipv4_udp_receive_buffer_errors

image
no drops

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.13.59.193  netmask 255.255.128.0  broadcast 10.13.127.255
        inet6 fe80::def:d34:a2c:da88  prefixlen 64  scopeid 0x20<link>
        ether a4:34:d9:e8:9a:bd  txqueuelen 1000  (Ethernet)
        RX packets 17556713  bytes 20549547923 (20.5 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14008823  bytes 17151970123 (17.1 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

currently

~$ sysctl net.core | grep mem
sysctl: permission denied on key 'net.core.bpf_jit_harden'
sysctl: permission denied on key 'net.core.bpf_jit_kallsyms'
sysctl: permission denied on key 'net.core.bpf_jit_limit'
net.core.optmem_max = 20480
net.core.rmem_default = 212992
net.core.rmem_max = 212992
net.core.wmem_default = 212992
net.core.wmem_max = 212992

then change it to (refer to https://cizixs.com/2018/01/13/linux-udp-packet-drop-debug/ and https://serverfault.com/questions/899364/netdata-ipv4-udp-errors

~$ sudo sysctl -w net.core.rmem_default=1048576
net.core.rmem_default = 1048576
~$ sudo sysctl -w net.core.rmem_max=2097152
net.core.rmem_max = 2097152
~$ sysctl net.core | grep mem
sysctl: permission denied on key 'net.core.bpf_jit_harden'
sysctl: permission denied on key 'net.core.bpf_jit_kallsyms'
sysctl: permission denied on key 'net.core.bpf_jit_limit'
net.core.optmem_max = 20480
net.core.rmem_default = 1048576
net.core.rmem_max = 2097152
net.core.wmem_default = 212992
net.core.wmem_max = 212992

@szcf-weiya
Copy link
Owner Author

different correspondent/receipt. The second one should be z, but it inherits the first one

Selection_2285

@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Oct 27, 2021

no pop windows after upgrading Plots in julia1.6

with GR, the plot did not pop up,
while with pgfplotsx, the pdf plot would pop up.

@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Oct 27, 2021

reset audio without rebooting

just came across a situation that it warns that the audio is problematic and needs to reboot when clicking a Youtube video. Here is a way to avoid rebooting, https://askubuntu.com/questions/15223/how-can-i-restart-pulseaudio-without-having-to-logout

$ pulseaudio --check
$ pulseaudio -k
$ pulseaudio -D
E: [pulseaudio] main.c: Daemon startup failed.

although -D failed, but actually the audio would resume. So the actual step to take effect is -k.

@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Dec 3, 2021

history file left over from an older version of Julia

on itsc,

$ julia1.4.1 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.4.1 (2020-04-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

ERROR: Invalid history file (/users/s1155113972/.julia/logs/repl_history.jl) format:
If you have a history file left over from an older version of Julia,
try renaming or deleting it.
Invalid character: '\0' at line 9011

copy file and remove it

cp repl_history.jl repl_history.jl.backup

@szcf-weiya
Copy link
Owner Author

deactivate email account

image

@szcf-weiya
Copy link
Owner Author

pipeline in convert?

how to avoid tmp.png in the following command.

convert fit-exp-1.png loss-exp-1.png +append tmp.png; eog tmp.png

@szcf-weiya
Copy link
Owner Author

@szcf-weiya
Copy link
Owner Author

@szcf-weiya
Copy link
Owner Author

@szcf-weiya szcf-weiya mentioned this issue Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant