How to solve to compile correctly? - cmake

Any idea of how I have to modify the CMake file?
CMakeFiles/auv_absolute_position.dir/src/auv_absolute_position.cpp.o: nella funzione "compute_auv_positionCallback(boost::shared_ptr<wmcs_lib::USBLPositioning_<std::allocator<void> > const> const&)":
auv_absolute_position.cpp:(.text+0x144): riferimento non definito a "ne2ll(Eigen::Matrix<double, 2, 1, 0, 2, 1>, Eigen::Matrix<double, 2, 1, 0, 2, 1>)"
collect2: error: ld returned 1 exit status
auv/auv_gnc/CMakeFiles/auv_absolute_position.dir/build.make:114: recipe for target '/home/valeria/catkin_ws/devel/lib/auv_gnc/auv_absolute_position' failed
make[2]: *** [/home/valeria/catkin_ws/devel/lib/auv_gnc/auv_absolute_position] Error 1
CMakeFiles/Makefile2:2416: recipe for target 'auv/auv_gnc/CMakeFiles/auv_absolute_position.dir/all' failed
make[1]: *** [auv/auv_gnc/CMakeFiles/auv_absolute_position.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Related

snakemake rule error. How can I select rule order?

I run the snakemake for RNA-seq analysis.
I made snakefile for running, and some error occurred in terminal.
I set rule salmon quant reads at last order but it is running at first.
So snakemake showed the error in rule salmon quant reads.
salmon quant reads must run after salmon index finished.
Error in rule salmon_quant_reads:
jobid: 173
output: salmon/WT_Veh_11/quant.sf, salmon/WT_Veh_11/lib_format_counts.json
log: logs/salmon/WT_Veh_11.log (check log file(s) for error message)
conda-env: /home/baelab2/LEEJUNEYOUNG/7.Colesevelam/RNA-seq/.snakemake/conda/ff908de630224c1a4118f5dc69c8a761
RuleException:
CalledProcessError in line 111 of /home/baelab2/LEEJUNEYOUNG/7.Colesevelam/RNA-seq/Snakefile_2:
Command 'source /home/baelab2/miniconda3/bin/activate '/home/baelab2/LEEJUNEYOUNG/7.Colesevelam/RNA-seq/.snakemake/conda/ff908de630224c1a4118f5dc69c8a761'; set -euo pipefail; /home/baelab2/miniconda3/envs/snakemake/bin/python3.10 /home/baelab2/LEEJUNEYOUNG/7.Colesevelam/RNA-seq/.snakemake/scripts/tmpr6r8ryk9.wrapper.py' returned non-zero exit status 1.
File "/home/baelab2/LEEJUNEYOUNG/7.Colesevelam/RNA-seq/Snakefile_2", line 111, in __rule_salmon_quant_reads
File "/home/baelab2/miniconda3/envs/snakemake/lib/python3.10/concurrent/futures/thread.py", line 58, in run
How can I fix it?
Here is the my snakefile info.
SAMPLES = ["KO_Col_5", "KO_Col_6", "KO_Col_7", "KO_Col_8", "KO_Col_9", "KO_Col_10", "KO_Col_11", "KO_Col_15", "KO_Veh_3", "KO_Veh_4", "KO_Veh_5", "KO_Veh_9", "KO_Veh_11", "KO_Veh_13", "KO_Veh_14", "WT_Col_1", "WT_Col_2", "WT_Col_3", "WT_Col_6", "WT_Col_8", "WT_Col_10", "WT_Col_12", "WT_Veh_1", "WT_Veh_2", "WT_Veh_4", "WT_Veh_7", "WT_Veh_8", "WT_Veh_11", "WT_Veh_14"]
rule all:
input:
expand("raw/{sample}_1.fastq.gz", sample=SAMPLES),
expand("raw/{sample}_2.fastq.gz", sample=SAMPLES),
expand("qc/fastqc/{sample}_1.before.trim_fastqc.zip", sample=SAMPLES),
expand("qc/fastqc/{sample}_2.before.trim_fastqc.zip", sample=SAMPLES),
expand("trimmed/{sample}_1.fastq.gz", sample=SAMPLES),
expand("trimmed/{sample}_2.fastq.gz", sample=SAMPLES),
expand("qc/fastqc/{sample}_1.after.trim_fastqc.zip", sample=SAMPLES),
expand("qc/fastqc/{sample}_2.after.trim_fastqc.zip", sample=SAMPLES),
expand("salmon/{sample}/quant.sf", sample=SAMPLES),
expand("salmon/{sample}/lib_format_counts.json", sample=SAMPLES)
rule fastqc_before_trim_1:
input:
"raw/{sample}.fastq.gz",
output:
html="qc/fastqc/{sample}.before.trim.html",
zip="qc/fastqc/{sample}.before.trim_fastqc.zip",
log:
"logs/fastqc/{sample}.before.log"
threads: 10
priority: 1
wrapper:
"v1.7.0/bio/fastqc"
rule cutadapt:
input:
r1 = "raw/{sample}_1.fastq.gz",
r2 = "raw/{sample}_2.fastq.gz"
output:
fastq1="trimmed/{sample}_1.fastq.gz",
fastq2="trimmed/{sample}_2.fastq.gz",
qc="trimmed/{sample}.qc.txt"
params:
adapters = "-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCA -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT",
extra = "--minimum-length 1 -q 20"
log:
"logs/cutadapt/{sample}.log"
threads: 10
priority: 2
wrapper:
"v1.7.0/bio/cutadapt/pe"
rule fastqc_after_trim_2:
input:
"trimmed/{sample}.fastq.gz"
output:
html="qc/fastqc/{sample}.after.trim.html",
zip="qc/fastqc/{sample}.after.trim_fastqc.zip"
log:
"logs/fastqc/{sample}.after.log"
threads: 10
priority: 3
wrapper:
"v1.7.0/bio/fastqc"
rule salmon_index:
input:
sequences="raw/Mus_musculus.GRCm39.cdna.all.fasta"
output:
multiext(
"salmon/transcriptome_index/",
"complete_ref_lens.bin",
"ctable.bin",
"ctg_offsets.bin",
"duplicate_clusters.tsv",
"info.json",
"mphf.bin",
"pos.bin",
"pre_indexing.log",
"rank.bin",
"refAccumLengths.bin",
"ref_indexing.log",
"reflengths.bin",
"refseq.bin",
"seq.bin",
"versionInfo.json",
),
log:
"logs/salmon/transcriptome_index.log",
threads: 10
priority: 10
params:
# optional parameters
extra="",
wrapper:
"v1.7.0/bio/salmon/index"
rule salmon_quant_reads:
input:
# If you have multiple fastq files for a single sample (e.g. technical replicates)
# use a list for r1 and r2.
r1 = "trimmed/{sample}_1.fastq.gz",
r2 = "trimmed/{sample}_2.fastq.gz",
index = "salmon/transcriptome_index"
output:
quant = "salmon/{sample}/quant.sf",
lib = "salmon/{sample}/lib_format_counts.json"
log:
"logs/salmon/{sample}.log"
params:
# optional parameters
libtype ="A",
extra="--validateMappings"
threads: 10
priority: 20
wrapper:
"v1.7.0/bio/salmon/quant"
The only link between salmon_quant_reads and salmon_index is directory salmon/transcriptome_index. However, the directory creation is not a sufficient signal that all work in salmon_index has been completed. So, a quick way to fix this is to include an explicit file:
rule salmon_quant_reads:
input:
# If you have multiple fastq files for a single sample (e.g. technical replicates)
# use a list for r1 and r2.
r1 = "trimmed/{sample}_1.fastq.gz",
r2 = "trimmed/{sample}_2.fastq.gz",
index = "salmon/transcriptome_index",
_temp_dependency = "salmon/transcriptome_index/info.json",

Data is lost in ParallelFlux when a rail fails

I am running a ParallelFlux and one of rails fails. I am not able to "recover" it or even process the events that were supposed to go to that rail
Flux.just(1, 2, 3, 4, 5, 6, 7, 8, 9)
.parallel(4)
.runOn(Schedulers.parallel())
.doOnNext(e -> {System.out.println("test "+e); if (e % 2 == 0) throw new RuntimeException(e+":"+2);})
.doOnNext(e -> {if (e % 3 == 0) throw new RuntimeException(e+":"+3);})
.subscribe(
goodNumber -> System.out.println("Good number "+goodNumber),
err -> System.out.println("Failed number "+err.getMessage()
);
I'd want to process all the data from the range but I am missing the 6,7,8 because their rails are canceled.
The result I am getting is
test 2
test 4
test 3
test 1
Good number 1
test 5
Good number 5
test 9
Failed number 4:2
Failed number 2:2
Failed number 3:3
Failed number 9:3
What is the correct way of paralleling the work and do sort of 'onErrorContinue' functionality for each rail?

Msg 4864, Level 16, State 1, Line 19 Bulk load data conversion error (type mismatch or invalid character for the specified codepage)

Trying to do a bulk insert and receiving the following errors. The last two errors do not give an explanation. Does anyone know what I am doing wrong.
Games (Numeric (38), not null
AB (numeric (18), not null
Bulk Insert NYM_Player_Stats
From 'C:\\Users\Robert\Documents\test_input.txt'
With
(Fieldterminator = ',',
Rowterminator = '0x0A')
Errors:
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 1, column 5 (AB).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 2, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 3, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 4, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 5, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 6, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 7, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 8, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 9, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 10, column 4 (Games).
Msg 4864, Level 16, State 1, Line 19
Bulk load data conversion error (type mismatch or invalid character
for the specified codepage) for row 11, column 4 (Games).
Msg 4865, Level 16, State 1, Line 19
Cannot bulk load because the maximum number of errors (10) was
exceeded.
Msg 7399, Level 16, State 1, Line 19
The OLE DB provider "BULK" for linked server "(null)" reported an
error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 19
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".

Controlling the parameters of python cvxopt solver while performing SDP

I have a python code to solve the following simple Semidefinite Program:
Input: Two Real 4 x 4 matrices, A and B
Output: 1 - q where q = maximum over all p, such that:
0 < p < 1
A - p B is positive semi-definite
When I view an instance of the above problem in verbose mode, the Python code produces the following message.
10:Channel_Flow pavithran$ python stackoverflow_sdp.py
*** Dualizing the problem... ***
[ #################################################################### ] 100%
[ #################################################################### ] 100%
--------------------------
cvxopt CONELP solver
--------------------------
pcost dcost gap pres dres k/t
0: 5.5546e-01 5.5546e-01 2e+01 3e+00 2e+00 1e+00
1: -4.3006e-01 -7.3065e-02 3e+00 6e-01 3e-01 6e-01
2: -4.9751e+01 2.1091e+00 9e+03 2e+01 8e+00 6e+01
3: -3.4525e+02 7.6511e-02 9e+03 2e+00 1e+00 3e+02
4: -3.4496e+04 7.6337e-02 9e+05 2e+00 1e+00 3e+04
5: -3.4496e+06 7.6337e-02 9e+07 2e+00 1e+00 3e+06
6: -3.4496e+08 7.6337e-02 9e+09 2e+00 1e+00 3e+08
Certificate of dual infeasibility found.
cvxopt status: dual infeasible
*** Dual Solution not found
Traceback (most recent call last):
File "stackoverflow_sdp.py", line 42, in <module>
simple_sdp(A,B)
File "stackoverflow_sdp.py", line 31, in simple_sdp
prob.solve(verbose = 2)
File "/Library/Python/2.7/site-packages/picos/problem.py", line 4246, in solve
raise Exception("\033[1;31m no Primals retrieved from the dual problem \033[0m")
Exception: no Primals retrieved from the dual problem
10:Channel_Flow pavithran$
There are several parameters. I would like to know if it is possible to specify a bound on any of the parameters, to terminate the SDP, except specifying the maximum number of iterations. For instance, can we specify a limit on "gap", "pres", "dres"?

Fortran runtime error while reading a file: "Bad repeat count"

I'm trying to read an input file with fortran but I get the following error at runtime:
At line 118 of file prog.f90 (unit = 53, file = 'data.dat')
Fortran runtime error: Bad repeat count in item 1 of list input
The data file is the following
3, 5, 3 %comment
%%%%%%%%%%%%%%
1d0, 0d0, 0d0 % comment
0d0, 0d0, 1d0
%%%%%%%%%%%%%%
1, 1, identity, 1, 1 %comment
1, 2, sigmax, 2, 2
2, 3, sigmax, 2, 2
1, 3, sigmaz, 1, 3
3, 3, identity, 1, 1
%%%%%%%%%%%%%%
0, 0 %comment
and the interesting part of prog.f90 is
COMPLEX(KIND(1D0)), DIMENSION(:), ALLOCATABLE:: H1, H2
INTEGER :: i,A,B,C
CHARACTER(50) :: GHOST
OPEN(UNIT=53,file='data.dat',status='old')
READ(53,*) A,B,C
READ(53,*) GHOST
ALLOCATE (H1(A),H2(A))
READ(53,*) (H1(i), i=1,A)
READ(53,*) (H2(i), i=1,A)
where the 118th line is READ(53,*) (H1(i), i=1,A). I tryed also with an explicit do loop but with the same result.
I haven't tested this, but I'd expect
READ(53,*) (H1(i), i=1,A)
to try to read 3 complex numbers. It gets fed the line
1d0, 0d0, 0d0 % comment
from which it gets 1½ complex numbers and then barfs on the % sign, misinterpreting it as a syntactically invalid repeat count.
I'd suggest providing 3 complex numbers in the file when that read statement is executed.
The numbers are dimensioned complex, while in fortran complex numbers should be in the file with parenthesis as:
( realpart , imaginarypart ) ( realpart , imaginarypart )
I really don't know what the standards say regarding the input form you have presented, but after some testing gfortran throws that Bad repeat count error regardless of the % comment. It throws that error even with four or more comma separated reals on the line.
Now ifort on the other hand reads the line just the way you have it -- but watch out -- it reads each of the comma separated values as the real part of your complex variable, setting the imaginary part to zero. ( that is it only uses the first two values on each line and discards the third )
You will really need to study the code to make sure you understand what was intended to sort out how to fix this. If the later (ifort) behavior is the intention one simple fix would be to declare a couple of reals. Read into the reals, then assign those to your complex variables.