openfoam ./makeParaview - paraview

i am currently building openfoam 1912 from source and have some trouble building paraview. I just build Qt and Cmake but as soon as i type ./makeParaview qt-5.9.9 5.6.3i get the following error:
./makeParaView: 64: local: -DWM_DP: bad variable name
./makeParaView: 64: ./makeParaView: -DOPENFOAM: bad variable name
A similar error occurs when i try to make VTK / Adios2. Any idea where i took the wrong turn?
Greetings
Gabbagandalf

The proper solution is related to shell quoting issues
- flag="$(stripCompilerFlags $flag)"
+ flag="$(stripCompilerFlags "$flag")"
but in the meantime you can simply change the shebang to #!/bin/bash - it is more forgiving.

As discussed and resolved in these GitLab ticket-1 and ticket-2:
The issue seems to be Ubuntu related.
Solution:
Prior to execute ./makeParaview, switch to bash:
Change the first line of makeParaView script to #!/bin/bash
sudo dpkg-reconfigure dash
./makeParaView

Related

Avahi fails in buildroot running intltool-update

I'm using an older buildroot 2016.11 and want to add DNS-SD by selecting the avahi package. Resulting in this error:
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^(.*)\${ <-- HERE ?([A-Z_]+)}?(.*)$/ at /home/user/nuvoton/nuc980/output/host/usr/bin/intltool-update line 1065.
checking for intltool >= 0.35.0... found
configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
When searching I learned intltool should be enabed on the host, but I could not find how in menuconfig.
More searching told me it is related to some Perl update
I tried adding this patch http://lists.busybox.net/pipermail/buildroot/2017-June/194509.html but that also didn't help.
Can somebody steer me in the right direction how to solve this?
Using https://github.com/maximeh/buildroot/blob/master/package/intltool/0001-perl-5.26-compatibility.patch makes avahi build without problems.
In my case the build is getting too big, so I have to trim it down somehow...

How to use plugin commands in bcftools?

My goal is to use bcftools to check that the reference alleles in my dataset (vcf file) match with a reference genome (fasta file) using the fixref plugin.
Working on command line, I first set the following environment:
export BCFTOOLS_PLUGINS=/path/to/bcftools/plugins
The following code is recommended for test datasets with mismatches:
bcftools +fixref test.bcf -Ob -o output.bcf -- -f ref.fa -m top
When I run this code using my own files (please note that my data is .vcf, not .bcf) I get the following error:
[main] Unrecognized command
If I simply enter:
bcftools
I get a list of the only 5 commands (view, index, cat, ld, ldpair) that I can use. So although I've set the environment, does it somehow need to be activated? Do I need to run my command through a bash script?
bcftools
was pointing to a deprecated version of bcftools (0.1.19) in ../bin/, while
BCFTOOLS_PLUGINS=/path/to/bcftools/plugins
was pointing to the plugins for bcftools version 1.10.2 outside /bin/
Replacing ../bin/bcftools (0.1.19 with 1.10.2) was the fix.

Google deepmind q learning setup

Hi I'm trying to run the deepmind q learning software on my mac. I believe I have all the necessary libraries to run the network. I don't understand however to actually run the "run_cpu" or "run_gpu" command. Ive tried running it in terminal with the file followed by the game name breakout. I.e. "./run_gpu breakout". The github page with the code says that all you need to do is copy the rom from the roms folder but I'm not quite sure what that means/how to do it. The repository can be found here: https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner
I'm sure I'm missing something really really simple here. Here's the terminal print out:
Els-MacBook-Air:DeepMind-Atari-Deep-Q-Learner-master elcapitan$ ./run_gpu breakout
-framework alewrap -game_path /Users/elcapitan/Desktop/DeepMind-Atari-
Deep-Q-Learner-master/roms/ -name DQN3_0_1_breakout_FULL_Y -env breakout -
env_params useRGB=true -agent NeuralQLearner -agent_params
lr=0.00025,ep=1,ep_end=0.1,ep_endt=replay_memory,discount=0.99,hist_len=4,learn_start=50000,replay_memory=1000000,update_freq=4,n_replay=1,network="co
nvnet_atari3",preproc="net_downsample_2x_full_y",state_dim=7056,minibatch_s
ize=32,rescale_r=1,ncols=1,bufferSize=512,valid_size=500,target_q=10000,cli
p_delta=1,min_reward=-1,max_reward=1 -steps 50000000 -eval_freq 250000 -
eval_steps 125000 -prog_freq 10000 -save_freq 125000 -actrep 4 -gpu 0 -
random_starts 30 -pool_frms type="max",size=2 -seed 1 -threads 4
./run_gpu: line 46: qlua: command not found
Sorry if this sounds uber dumb. Anyway I'd appreciate a solution if you have one. Thanks!
You need to install qlua, try
sudo luarocks install qtlua

capistrano upload! thinks ~ referenced local directory is on remote server

So every example I've looked up indicates this is how one is supposed to do it but I think I may have found a bug unless there's another way to do this.
I'm using upload! to upload assets to a remote list of servers. The task looks like this:
desc "Upload grunt compiled css/js."
task :upload_assets do
on roles(:all) do
%w{/htdocs/css /htdocs/js}.each do |asset|
upload! "#{fetch(:local_path) + asset}", "#{release_path.to_s + '/' + asset}", recursive: true
end
end
end
If local_path is defined as an absolute path such as:
set :local_path:, '/home/dcmbrown/projects/ABC'
This works fine. However if I do the following:
set :local_path:, '~/projects/ABC'
I end up getting the error:
The deploy has failed with an error: Exception while executing on ec2-54-23-88-125.us-west-2.compute.amazon.com: No such file or directory - ~/projects/ABC/htdocs/css
It's not a ' vs " issue as I've tried both (and I didn't think capistrano paid attention to that anyway).
Is this a bug? Is there a work around? Am I just doing it wrong?
I ended up discovering the best way to do this is to actually use path expansion! (headsmack)
irb> File.expand_path('~dcmbrown/projects/ABC')
=> "/home/dcmbrown/projects/ABC"
Of course what I'd like is to do automatic path expansion but you can't have everything. I think I was mostly dumbstruck that it didn't automatically; so much so I spent a couple of hours trying to figure out why it didn't work and ended up wasting time asking here. :(
I don't think the error is coming from the remote server, it just looks like it since it's running that upload command in the context of a deploy.
I just created a single cap task to just do an upload using the "~" character and it also fails with
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#XXX: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
It appears to be a Ruby issue not Capistrano as this also fails in a Ruby console
~/Projects/testapp $ irb
2.2.2 :003 > File.stat('~/Projects/testapp/public/404.html')
Errno::ENOENT: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
from (irb):3:in `stat'
from (irb):3
from /Users/supairish/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `<main>'

SQLGetPrivateProfileString failed with

Typing the command: odbcinst -q -s on RHEL 6, I get the following error message:
odbcinst: SQLGetPrivateProfileString failed with .
All my DSN's are also not showing up when I run:
odbcinst -q -d
Type the command: env |grep 'ODBC' to check if the ODBCSYSINI and the ODBCINI variables are set. If no results are returned - you need to add the variables to the environment variable pointing to the directory and the path to where the odbc.ini file is located as follows (in my case for RHEL 6 it is located at /etc - others may have it on /usr/local/etc):
Edit ~\.bash_profile and add the following lines:
export ODBCSYSINI=/etc
export ODBCINI=/etc/odbc.ini
You are good to go!
In my case (ubuntu 16.04) it was related to this bug, just not ~/.odbc.ini but /etc/odbc.ini. Adding a line to /etc/odbc.ini
[empty-sys]
fixed the problem.
Its too late to answer on this question probably, but it is for those who still couldn't get this resolved using #kapil Vyas answer-
Adding to his answer, you will need to logout and then login again from your user for export commands (saved in .bash_profile) to work.
When I had this problem, I edited /usr/local/etc/odbcinst.ini to add:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
Pooling = Yes
CPTimeout = 120
I hope this is helpful.