Hi Giovanni,

For the include issue, you can try setting the include path explicitly with the 
-I option when running arts:

$ arts -I 'f:\temp\' -v

arts-2.3.654 (compiled Wed Mar 22 14:09:51 2017)
Compiler: Clang 8.0.0.8000042
[snip]
Include search paths: 
   .
   f:\temp\
Data search paths: 
   .

The problem with cygwin is that it creates a very schizophrenic environment 
when it comes to paths. While you're inside the cygwin shell, programs see a 
'virtual' Unix-like filesystem with / as a directory separator and your home 
directory at /home, system programs in /usr etc. This is why the default 
include path looks like it does in your case. It is determined at compile time 
while being inside the Unix-world. When calling cygwin-compiled programs from 
outside the cygwin shell, e.g. from Matlab, suddenly everything changes and the 
program is exposed to the normal windows filesystem.

I don't see a good way of handling this. My guess is that cygwin programs are 
not even supposed to be called outside their natural habitat (i.e. the cygwin 
shell).

Let's see if the -I option helps you out here.

cheers,
/oliver


> On 6 Apr 2017, at 17:10, Giovanni Muscari <giovanni.musc...@ingv.it> wrote:
> 
> Dear all,
> 
> so far I've used arts 2.0 by compiling/making it using cygwin and then 
> running it in a windows environment, making use of scripts contained in 
> atmlab 2.0.0. It works smoothly.
> 
> I am now trying to do the same with arts 2.2 and atmlab 2.2.22 but run into 
> issues that seem to be related to search paths for the cfile.rep or include 
> files.
> 
> As an example, after making the arts.exe in cygwin I tried to run the 
> qarts_demo (providing all the correct paths for includes and such) and this 
> is what I get:  
> 
> ---------------------------------------------------------------------
> >> qarts_demo
> Cannot open output file: 
> f:\ARTS\tmp\atmlab-GM-tp1daee2b5_03ac_4fb8_94c0_fa0a67f557b6/f:\ARTS\tmp\atmlab-GM-tp1daee2b5_03ac_4fb8_94c0_fa0a67f557b6\cfile.rep
> Maybe you don't have write access to the directory or the file?
> I have to be able to write to my report file.
> ---------------------------------------------------------------------------
> 
> As you can see the cfile.rep file is searched in a funny path made of two 
> times the "F:\ARTS\tmp +temp_dir" separated by a "/" which is unacceptable 
> under windows. I can circumvent this problem by indicating a very simple path 
> for the temp directory (".." instead of "F:\ARTS\tmp") or by sticking my 
> hands into the main.cc source code and changing the following line:
> 
> open_output_file(report_file, out_basename + report_file_ext.str ());
> 
> However, arts goes just a little further before crashing for a search path 
> issue, when looking for include files. And I am not a C++ programmer...
> Of course the "f:\ARTS\arts-2.2\controlfiles\general\general.arts" indicated 
> below is there. 
> 
> -------------------------------------------------------------------------------------------------------
> >> qarts_demo
> Executing ARTS.
> Command line:
> /src/arts -r30 -o ..\atmlab-GM-tp2eb0677b_36b0_4a15_8728_20d87c282579 
> ..\atmlab-GM-tp2eb0677b_36b0_4a15_8728_20d87c282579\cfile.arts 
> Version: arts-2.2.55 (compiled Thu Apr  6 15:27:51 2017)
> Compiler: GNU 5.4.0 (/usr/bin/c++.exe)
> Compile flags:  -fvisibility=hidden -fvisibility-inlines-hidden 
> -ftemplate-depth-60 -fopenmp  -W  -Wall  -Wshadow  -Wconversion  
> -Wno-sign-conversion  -Wno-unknown-pragmas   -O2 -g 
> Features in this build: 
>    Numeric precision:    double
>    OpenMP support:       enabled
>    Documentation server: enabled
>    Zipped XML support:   enabled
>    NetCDF support:       disabled
>    Fortran support:      disabled
>    Disort support:       disabled
>    Refice support:       disabled
>    Tmatrix support:      disabled
> Include search paths: 
>    .
>    /home/GM/controlfiles
> Data search paths: 
>    ..\atmlab-GM-tp2eb0677b_36b0_4a15_8728_20d87c282579
>    .
> 
> Running with OpenMP, maximum number of threads = 4.
>    Thread 1: ready.
>    Thread 2: ready.
>    Thread 0: ready.
>    Thread 3: ready.
> 
> Run started: Thu Apr  6 15:46:43 2017
> 
> Verbosity settings: Agendas:     0
>                     Screen:      3
>                     Report file: 0
> 
> Reading control files:
> - ..\atmlab-GM-tp2eb0677b_36b0_4a15_8728_20d87c282579\cfile.arts
> 
> Parsing control text:
> - Arts2
> {
> This run took 0.02s (0.01s CPU time)
> Run-time error in controlfile: 
> ..\atmlab-GM-tp2eb0677b_36b0_4a15_8728_20d87c282579\cfile.arts
> Cannot find include file f:\ARTS\arts-2.2\controlfiles\general\general.arts.
> File: ..\atmlab-GM-tp2eb0677b_36b0_4a15_8728_20d87c282579\cfile.arts
> Search path was:   . /home/GM/controlfiles
> 
> Stopping ARTS execution.
> Goodbye.
> 
> Error using arts (line 67)
> An error occured while executing ARTS. See above.
> ------------------------------------------------------------------------
> 
> I understand that making arts using cygwin and running it under windows might 
> raise a few eyebrows, but arts 2.0 seems to do just fine so maybe just a few 
> light touches to the arts 2.2 source codes can leave this possibility 
> available for windows-users such as I am?
> Or maybe someone will explain to me that I am doing something wrong...
> Thanks!
> Giovanni
> 
> 
> _______________________________________________
> arts_users.mi mailing list
> arts_users.mi@lists.uni-hamburg.de
> https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi

_______________________________________________
arts_users.mi mailing list
arts_users.mi@lists.uni-hamburg.de
https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi

Reply via email to