+- +-
Say hello if visiting :) by Gecko
11 Jan 2023, 07:43:05 pm

Seti is down again by Mike
09 Aug 2017, 10:02:44 am

Some considerations regarding OpenCL MultiBeam app tuning from algorithm view by Raistmer
11 Dec 2016, 06:30:56 am

Loading APU to the limit: performance considerations by Mike
05 Nov 2016, 06:49:26 am

Better sleep on Windows - new round by Raistmer
26 Aug 2016, 02:02:31 pm

Author Topic: optimized sources  (Read 615412 times)

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #150 on: 18 Jun 2007, 09:06:17 pm »
have now FFTWF Optimizer sucessful compiled.
compiled FFTWF client , but the linker shows still some not resolved external references.
--------------------------------------------------------------------------------------------------------------------------

analyzeFuncs.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_import_wisdom_from_string" in Funktion ""void __cdecl load_wisdom(void)" (?load_wisdom@@YAXXZ)".
analyzeFuncs.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_set_timelimit" in Funktion ""void __cdecl load_wisdom(void)" (?load_wisdom@@YAXXZ)".
analyzeFuncs.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_export_wisdom_to_string" in Funktion ""void __cdecl save_wisdom(void)" (?save_wisdom@@YAXXZ)".
analyzeFuncs.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_plan_dft_1d" in Funktion ""void __cdecl do_generate_fft_coeff(void)" (?do_generate_fft_coeff@@YAXXZ)".
Optimizer.lib(benchmark.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "_fftwf_plan_dft_1d".
analyzeFuncs.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_execute_dft" in Funktion ""void __cdecl do_transpose(void)" (?do_transpose@@YAXXZ)".
Optimizer.lib(benchmark.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "_fftwf_execute_dft".
analyzeFuncs.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_destroy_plan" in Funktion ""void __cdecl do_return_best_of_signals(void)" (?do_return_best_of_signals@@YAXXZ)".
analyzeFuncs.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_execute" in Funktion ""int __cdecl v_BaseLineSmooth(float (*)[2],int,int,int)" (?v_BaseLineSmooth@@YAHPAY01MHHH@Z)".
malloc_a.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_malloc" in Funktion ""void * __cdecl malloc_a(unsigned int,unsigned int)" (?malloc_a@@YAPAXII@Z)".
malloc_a.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fftwf_free" in Funktion ""void __cdecl free_a(void *)" (?free_a@@YAXPAX@Z)".
.\Release32-NOGFX\seti_boinc.exe : fatal error LNK1120: 9 nicht aufgelöste externe Verweise.
--------------------------------------------------------------------------------------------------------------------------------------------
??
now I´m searching    :o
----------------------------------------------------------------------------------------
IPP SSE2 is compiled and linked sucessful   ;D
IPP MMX is compiled and linked sucessful    ;D



Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #151 on: 21 Jun 2007, 06:19:36 pm »
Who know anything about this :
in the configuration of Release32-NOGFX I can compile opt_FPU.cpp from Optimizer with 0 error.
When I now change the configuration to Debug (as Simon described it)  it shows the following:

------ Erstellen gestartet: Projekt: Optimizer, Konfiguration: Debug Win32 ------
Kompilieren...
opt_FPU.cpp
c:\i\sc\seti\boinc\api\boinc_api.h(123) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'worker_thread_handle'
c:\i\sc\seti\boinc\api\boinc_api.h(123) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.
c:\i\sc\seti\boinc\api\boinc_api.h(123) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.
c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\client\sincos.h(31) : error C2006: '#include': Dateinamen erwartet, aber 'Bezeichner' gefunden
c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\client\sincos.h(31) : fatal error C1083: Datei (Include) kann nicht geöffnet werden: "": No such file or directory
Das Buildprotokoll wurde unter "file://c:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\Optimizer\Debug\BuildLog.htm" gespeichert.
Optimizer - 5 Fehler, 0 Warnung(en)
----------------------------------------------------------------------------------------------------------------------------------------
if we go to sincos.h we see:
29 #ifndef _SINCOS_H_
30   #define _SINCOS_H_
31    #include CMATH_LIB    <----error
    #ifdef __cplusplus
      extern "C"
      {
    #endif
---------------------------------------------------------------------------------
if we now go where CMATH_LIB is defined we see in win-config.h ---->
   // Harold Naparst's suggestion
   #ifdef __INTEL_COMPILER
      /* Should work but doesn't - more work required
      #undef _INC_MATH
      #define MATH_LIB <mathimf.h>
      #define CMATH_LIB <mathimf.h>
      */
      #define MATH_LIB <math.h>
      #define CMATH_LIB <cmath>
   #else
      #define MATH_LIB <math.h>             
      #define CMATH_LIB <cmath>       <----
   #endif
----------------------------------------------------------------------------------------------------------------------------
But it looks like this will not be inserted into sincos.h in the #include statement.

If I write it direct in the #include  in sincos.h ----->
#include <cmath>
the necessary path is set alright c:\I\VS8\Include

then it produces a lot of new errors
--------------------------------------------------------------------------------------------------------------------------
did control possible values, but nothing found
iI don´understan that it compile under Release32-NOGFX  without problems
All other projects compile fine under Debug

any hints and suggestions are welcome
regards   :'(



Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #152 on: 21 Jun 2007, 06:30:26 pm »
Release32-NOGFX   ----->
------ Erstellen gestartet: Projekt: Optimizer, Konfiguration: Release32-NOGFX Win32 ------
Kompilieren...
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 14.00.50727.762 für 80x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /Od /Ob2 /Oi /Ot /Oy /GT /I "../../../boinc/win_build" /I ".." /I "..\.." /I "..\..\..\boinc\lib" /I "../../../boinc/api" /I "../../db" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\Optimizer" /I "C:\I\INTEL\MKL\9.0\include\fftw" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build" /D "USE_IPP" /D "USE_SSE2" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_LIB" /D "_MT" /D "CLIENT"/D "NBOINC_APP_GRAPHICS" /D "_UNICODE" /D "UNICODE" /D "DEBUG" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF /FD /EHsc /MT /Zp16 /Gy /Fo"Release32-NOGFX\\" /Fd"Release32-NOGFX\vc80.pdb" /W3 /c /Wp64 /Zi /Gd /TP /FI "win-config.h" ".\opt_FPU.cpp"
opt_FPU.cpp
Das Buildprotokoll wurde unter "file://c:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\Optimizer\Release32-NOGFX\BuildLog.htm" gespeichert.
Optimizer - 0 Fehler, 0 Warnung(en)
========?= Erstellen: 1 erfolgreich, Fehler bei 0, 0 aktuell, 0 übersprungen ==========

nobody knows why ??  I´m searching   :'(

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #153 on: 21 Jun 2007, 07:12:23 pm »
uhhh   found the problem

iin the Debug configuration we must "Force includes"  win-config.h

thats it how you can see here ------>
--------------------------------------------------------------------------------------------------------------------------
------ Erstellen gestartet: Projekt: Optimizer, Konfiguration: Debug Win32 ------
Kompilieren...
opt_FPU.cpp
Das Buildprotokoll wurde unter "file://c:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\Optimizer\Debug\BuildLog.htm" gespeichert.
Optimizer - 0 Fehler, 0 Warnung(en)
========== Erstellen: 1 erfolgreich, Fehler bei 0, 0 aktuell, 0 übersprungen ==========


regards seti_britta ~heinz  ;D
« Last Edit: 21 Jun 2007, 07:27:26 pm by seti_britta »

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #154 on: 22 Jun 2007, 10:23:51 am »
the Debug configuration is now ready
-----------------------------------------------------
------ Neues Erstellen gestartet: Projekt: seti_boinc, Konfiguration: Debug Win32 ------
Die Zwischen- und Ausgabedateien für das Projekt "seti_boinc" mit der Konfiguration "Debug|Win32" werden gelöscht.
Kompilieren...
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 14.00.50727.762 für 80x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /Od /I "." /I "../../../boinc/api" /I "../../../boinc/client/win" /I "../../../boinc/lib" /I ".." /I "glut" /I "../../../boinc/image_libs" /I "../../../boinc/jpeglib" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\db" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\glut" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\Optimizer" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\jpeglib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CLIENT" /D "NBOINC_APP_GRAPHICS" /D "USE_IPP" /D "USE_SSE2" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Fp".\Debug/seti_boinc.pch" /Fo".\Debug/" /Fd".\Debug/" /FR".\Debug\\" /W3 /c /ZI /TP "..\..\db\xml_util.cpp"
   "..\worker.cpp"
   "..\..\..\boinc\api\windows_opengl.C"
   "..\version.cpp"
   "..\..\..\boinc\lib\util.C"
   "..\timecvt.cpp"
   "..\..\image_libs\tgalib.cpp"
   "..\..\db\sqlrow.cpp"
   "..\..\db\sqlblob.cpp"
   "..\spike.cpp"
   "..\..\..\boinc\lib\shmem.C"
   "..\seti_header.cpp"
   "..\seti.cpp"
   "..\..\db\schema_master.cpp"
   "..\sah_gfx_base.cpp"
   "..\sah_gfx.cpp"
   "..\s_util.cpp"
   "..\pulsefind.cpp"
   "..\progress.cpp"
   "..\..\..\boinc\lib\parse.C"
   "..\malloc_a.cpp"
   "..\main.cpp"
   "..\lcgamm.cpp"
   "..\..\..\boinc\api\gutil.C"
   "..\..\..\boinc\api\graphics_data.C"
   "..\..\..\boinc\api\graphics_api.C"
   "..\gdata.cpp"
   "..\gaussfit.cpp"
   "..\..\..\boinc\lib\filesys.C"
   "..\fft8g.cpp"
   "..\chirpfft.cpp"
   "..\..\..\boinc\api\boinc_api.C"
   "..\..\..\boinc\lib\app_ipc.C"
   "..\analyzeReport.cpp"
   "..\analyzePoT.cpp"
   "..\analyzeFuncs.cpp"
analyzeFuncs.cpp
-----IPP-----
-----SSE2-----
analyzePoT.cpp
--- BenSpectrum ---
analyzeReport.cpp
app_ipc.C
boinc_api.C
chirpfft.cpp
fft8g.cpp
filesys.C
gaussfit.cpp
gdata.cpp
graphics_api.C
graphics_data.C
gutil.C
lcgamm.cpp
main.cpp
malloc_a.cpp
parse.C
progress.cpp
pulsefind.cpp
s_util.cpp
Code wird generiert...
Kompilieren...
sah_gfx.cpp
sah_gfx_base.cpp
schema_master.cpp
seti.cpp
seti_header.cpp
shmem.C
spike.cpp
sqlblob.cpp
sqlrow.cpp
tgalib.cpp
timecvt.cpp
util.C
version.cpp
windows_opengl.C
worker.cpp
xml_util.cpp
Code wird generiert...
c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\db\xml_util.cpp(663) : warning C4717: 'xml_match_tag': Rekursiv für alle Steuerelementpfade. Die Funktion verursacht einen Stapelüberlauf zur Laufzeit.
c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\db\xml_util.cpp(689) : warning C4717: 'xml_find_tag': Rekursiv für alle Steuerelementpfade. Die Funktion verursacht einen Stapelüberlauf zur Laufzeit.
Verknüpfen...
LINK : warning LNK4098: Standardbibliothek "LIBCMT" steht in Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden.
LIBCMTD.lib(a_env.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetEnvironmentStrings@0" in Funktion "___crtGetEnvironmentStringsA".
Debug/setiathome_2.18_windows_intelx86.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
Browseinformationsdatei wird erstellt...
Microsoft Browse Information Maintenance-Programm Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.
Das Buildprotokoll wurde unter "file://c:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\BuildLog.htm" gespeichert.
seti_boinc - 2 Fehler, 3 Warnung(en)
========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 übersprungen ==========
------------------------------------------------------------------------------------------------------------------------------------------
remember that I had a problem with the GetEnvironmentStrings in Optimizer opt_osinterface.cpp
here is the solution: --->

// HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\SecondLevelDataCache

#define CPU_REG_KEY      HKEY_LOCAL_MACHINE
#define CPU_REG_SUBKEY   "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\"

#define L2_DATA_CACHE      "SecondLevelDataCache"


//
// os_L2_cache_size - Get value from registry: Might be the off-cpu cache size
//
int os_L2_cache_size( void )
   {
   HKEY hKey;
/*   DWORD dwType; */
   DWORD dwSize;
   DWORD L2_size = 0;
//seti_britta:
/*   LONG status = RegOpenKeyEx(CPU_REG_KEY, CPU_REG_SUBKEY, 0, KEY_QUERY_VALUE, &hKey); */
   LONG status = RegOpenKeyEx(CPU_REG_KEY, TEXT("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\"), 0, KEY_QUERY_VALUE, &hKey);
   if(status != ERROR_SUCCESS)   return 0;

   dwSize = sizeof( L2_size );
//seti_britta:
/*   status = (RegQueryValueEx(hKey, L2_DATA_CACHE, NULL, NULL, (LPBYTE)&L2_size, &dwSize)); */
   status = (RegQueryValueEx(hKey, TEXT("SecondLevelDataCache"), NULL, NULL, (LPBYTE)&L2_size, &dwSize));
   RegCloseKey(hKey);

   return L2_size;
   }

-----------------------------------------------------------------------------------------------------------------------------------------------------------
it compiles fine how you can see: ---->
------ Erstellen gestartet: Projekt: Optimizer, Konfiguration: Debug Win32 ------
Kompilieren...
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 14.00.50727.762 für 80x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /Od /Oy /I "../../../boinc/win_build" /I ".." /I "..\.." /I "..\..\..\boinc\lib" /I "../../../boinc/api" /I "../../db" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\Optimizer" /I "C:\I\INTEL\MKL\9.0\include\fftw" /I "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_DEBUG" /D "_LIB" /D "_MT" /D "CLIENT" /D "USE_IPP" /D "USE_SSE2" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /Gm /EHsc /RTC1 /MT /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP /FI "win-config.h" ".\opt_os_interface.cpp"
opt_os_interface.cpp
c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\client\optimizer\opt_os_interface.cpp(92) : warning C4552: '<<': Operator hat keine Auswirkungen; Operator mit Nebeneffekt erwartet
Das Buildprotokoll wurde unter "file://c:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\Optimizer\Debug\BuildLog.htm" gespeichert.
Optimizer - 0 Fehler, 1 Warnung(en)
========== Erstellen: 1 erfolgreich, Fehler bei 0, 0 aktuell, 0 übersprungen ==========
-------------------------------------------------------------------------------------------------------------------------------------

the conflict of  "LIBCMT" and LIBCMTD.lib  with 1 not resolved ext ref  ??
I must search  ::)
any suggestions are welcome
regards seti_britta ~heinz

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #155 on: 22 Jun 2007, 04:22:21 pm »
Hi Simon,
wahrscheinlich hängt der Fehler mit der LIBCMTD mit der Laufzeitbibliothek vom Debugger zusammen. Da ist "Multithreaded-Debug(/MTd) als Option angegeben.
----------------------------------------------------
Beim compilieren ohne Debug tritt kein Fehler auf.

Kannst du bitte mal nachschauen was bei dir angegeben ist.

Merci heinz

Offline Simon

  • Ni!
  • Knight who says 'Ni!'
  • *****
  • Posts: 1045
    • Is it a bird? Is it a plane? No...its-the.net!
Re: optimized sources
« Reply #156 on: 23 Jun 2007, 07:21:44 pm »
...schon recht lange her, daß ich einen Debug-Build gemacht habe. K.a., wirklich, meine Compile-Maschine läuft derzeit mit 64-bit Linux, die Windows-Partition ist schlafen.

Ich habe bei den Release-Konfigurationen alles auf single-threaded eingestellt, weil die Apps dazu gedacht sind auf nur einem Kern zu laufen (BOINC erledigt den Rest, obwohl gerade über Multithreaded Science Apps diskutiert wird. Zukunftsmusik.).

Schon mal IDB probiert? Ist beim ICC dabei und ein brauchbarer Debugger.

Mfg,
Simon.

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #157 on: 23 Jun 2007, 08:43:30 pm »
Hi Simon,
kann jetzt mit debug ohne Fehler compilieren. Es war irgenden komisches Zeichen  bei den Angaben LINKER--->Allgemein--->Zusätzliche Bibliotheksverzeichnisse
Kann jetzt auch debugger aufrufen und debuggen

Merci heinz

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #158 on: 23 Jun 2007, 09:31:31 pm »
Can't set up shared mem: -1


Unhandled Exception Detected...
---------------------------------------------------------------
Das ist alles, kommt mir doch sehr bekannt vor, hab ich im Forum schon gesehen

Kann jemand helfen ?

Offline Simon

  • Ni!
  • Knight who says 'Ni!'
  • *****
  • Posts: 1045
    • Is it a bird? Is it a plane? No...its-the.net!
Re: optimized sources
« Reply #159 on: 23 Jun 2007, 09:33:41 pm »
Keine fftw dll im gleichen Verzeichnis? Wenn Du nicht mit IPP FFT arbeitest, braucht's die sonst.

Mfg,
Simon.

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #160 on: 23 Jun 2007, 10:44:04 pm »
Merci, hab ich hereingetan...

Mit dem debugger komme ich bis zu der Stelle wo er das testfile (die wu "workunit.sah" einlesen will.

hier
    // Open the file and load the first line
    FILE *fp = fopen(virtual_name, "r");      <----- hier passiert es
    if (!fp) return ERR_FOPEN;

es wird dann verzweigt zu iosfwd
439    static size_t __CLRCALL_OR_CDECL length(const _Elem *_First)
      {   // find length of null-terminated string
//      _DEBUG_POINTER(_First);
      return (::strlen(_First));          <------
      }

Eine Ausnahme (erste Chance) bei 0x7c812a7b in setiathome_2.3S5B_windows_intelx86.exe: Microsoft C++-Ausnahme: seti_error an Speicherposition 0x0012f158..
Der Thread 'Debug Exception Monitor' (0xd9c) hat mit Code -5 (0xfffffffb) geendet.
Der Thread 'Timer' (0x7a0) hat mit Code -5 (0xfffffffb) geendet.
Das Programm "[2928] setiathome_2.3S5B_windows_intelx86.exe: Systemeigen" wurde mit Code -5 (0xfffffffb) beendet.
-----------------------------------------------------------------------------------

hab mal nachgeschaut:   workunit.sah hat nur das archivbit gesetzt
???? hmmm...
fehlt noch was ??
heinz


Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #161 on: 24 Jun 2007, 03:08:08 am »
sieht aus als hätt ich ein problem mit mkl.... muss prüfen  ::)

Offline Simon

  • Ni!
  • Knight who says 'Ni!'
  • *****
  • Posts: 1045
    • Is it a bird? Is it a plane? No...its-the.net!
Re: optimized sources
« Reply #162 on: 24 Jun 2007, 10:45:17 am »
Äh,

MKL wird in unseren derzeitigen Sourcen eigentlich nicht verwendet (wir verwenden IPP's FFT-Implementation für die optimierten Apps, Berkeley verwendet FFTW). Würde vorschlagen, die MKL includes/libraries raus zu nehmen, falls Du sie drin hast.

MfG,
Simon.

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #163 on: 24 Jun 2007, 03:39:15 pm »
Hi all,

to debug the client I took the 3 files ( init_data.xml   stderr.txt  work_unit.sah ) into the debug directory where the client is compiled and linked. Then set in seti_boinc ---> Konfigurationseigenschaften ---> Debuggen ---->Befehl  C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe
---->Befehlsargumente -bench -show_benchmark

Now set line 240 worker.cpp a stoppoint and begin to debug
239        retval = read_wu_state();
240       if ( retval ) SETIERROR( retval, "from read_wu_state() in worker()" );  <----stoppoint

if we reached it we can see that read_wu_state() give back errno=2
normally that means:  2 ENOENT No such file or directory.  A component of a specified pathname did not exist, or the pathname was an empty string.

But now the error must be interpreted through the program.
It goes to: line 286 worker.cpp
286     catch( seti_error e )
        {
        if ( e == RESULT_OVERFLOW )
            {
            fprintf( stderr, "SETI@Home Informational message -9 result_overflow\n" );
            fprintf(
                stderr,
                "NOTE: The number of results detected exceeds the storage space allocated.\n" );
            final_report();  // add signal and flop counts to stderr.txt
            progress = 1;
            remaining = 0;
            boinc_fraction_done( progress );
            checkpoint( true ); // force a checkpoint
            boinc_fpops_cumulative( analysis_state.FLOP_counter * LOAD_STORE_ADJUSTMENT );
            boinc_finish( 0 );
            exit( 0 );          // an overflow is not an app error
            }
        else
            {
            e.print();      <---------- to here
            exit ( static_cast< int >( e ) );
            }
        }
    } // worker()
Because its not a result overflow it goes to e.print   ----> in s_util.cpp
void seti_error::print( void ) const
    {
    std::cerr << "SETI@home error " << -value << " ";
    if ( (value <= atexit_failure) && (value >= 0) )
        {
        std::cerr << message[value];
        }
    else
        {
        std::cerr << "Unknown error";
        }

    std::cerr << std::endl << data << std::endl;
    std::cerr << "File: " << file << std::endl;
    std::cerr << "Line: " << line << std::endl;
    std::cerr << std::endl;
    }
--------------------------- now to iosfwd ---->

   static size_t __CLRCALL_OR_CDECL length(const _Elem *_First)
      {   // find length of null-terminated string
//      _DEBUG_POINTER(_First);
      return (::strlen(_First));    <--------
      }
------------------------------------------
-      _First   0x00714558 "C"   const char *
and
+      _First   0x006cb5a8 ""   const char *     <---second loop
--------------------------------------
&#135;      std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign zurückgegeben.   "work_unit.sah"   std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
-----------------------------------------------
come now to 318 app_ipc
318    FILE *fp = fopen(virtual_name, "r");
    if (!fp) return ERR_FOPEN;
--------------------------------------------------------
then to 129 app_ipc
129     FILE *fp = fopen(virtual_name, "r");
    if (!fp) return ERR_FOPEN;
-----------------------------------------------------------------
then to
static int read_wu_state( void )
    {
    FILE    *f;
    int     retval = 0;
    string  path;
    FORCE_FRAME_POINTER;

    boinc_resolve_filename_s( WU_FILENAME, path );
    f = boinc_fopen( path.c_str(), "rb" );
    if ( f )
        {
        #ifdef BOINC_APP_GRAPHICS
        if ( !nographics() ) sprintf( sah_graphics->status, "Scanning data file\n" );
        #endif
        retval = seti_parse_wu( f, analysis_state );
        fclose( f );
        if ( retval ) SETIERROR( retval, "from seti_parse_wu() in read_wu_state()" );
        }
    else
        {
        char    msg[1024];
        sprintf( msg, "(%s) in read_wu_state() errno=%d\n", path.c_str(), errno );
        SETIERROR( FOPEN_FAILED, msg );
        }

    retval = seti_init_state();
    if ( retval ) SETIERROR( retval, "from seti_init_state() in read_wu_state()" );

    #ifdef BOINC_APP_GRAPHICS
    if ( !nographics() ) sprintf( sah_graphics->status, "Scanning state file.\n" );
    #endif
    try
        {
        retval = parse_state_file( analysis_state );
        }

    catch( seti_error e )
        {

        // Failure to open the state file means that are starting a new WU.
        if ( static_cast< int >( e ) == FOPEN_FAILED )
            {
            retval = initialize_for_wu();
            if ( retval )
                SETIERROR( retval, "from initialize_for_wu() in read_wu_state()" );
            }
        else
            throw e;
        }

    boinc_fraction_done( progress * remaining + (1.0 - remaining) * (1.0 - remaining) );
    return 0;
    }
------------------------------------------------------ then to
   static size_t __CLRCALL_OR_CDECL length(const _Elem *_First)
      {   // find length of null-terminated string
//      _DEBUG_POINTER(_First);
      return (::strlen(_First));
      }
----------------------------------------------------
+      _First   0x0012f3b4 "(work_unit.sah) in read_wu_state() errno=2
"   const char *

+      this   "(work_unit.sah) in read_wu_state() errno=2
"   std::basic_string<char,std::char_traits<char>,std::allocator<char> > * const
------------------------------------------------------
+      this   0x0012f158 {value=5 file="c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\client\worker.cpp" line=144 ...}   seti_error * const
-------------------------------------------
then to 143 worker.cpp
143         sprintf( msg, "(%s) in read_wu_state() errno=%d\n", path.c_str(), errno );
        SETIERROR( FOPEN_FAILED, msg );
-------------------------------------------------------------
then to catch_error 286
 286   catch( seti_error e )
        {
        if ( e == RESULT_OVERFLOW )
            {
            fprintf( stderr, "SETI@Home Informational message -9 result_overflow\n" );
            fprintf(
                stderr,
                "NOTE: The number of results detected exceeds the storage space allocated.\n" );
            final_report();  // add signal and flop counts to stderr.txt
            progress = 1;
            remaining = 0;
            boinc_fraction_done( progress );
            checkpoint( true ); // force a checkpoint
            boinc_fpops_cumulative( analysis_state.FLOP_counter * LOAD_STORE_ADJUSTMENT );
            boinc_finish( 0 );
            exit( 0 );          // an overflow is not an app error
            }
        else
            {
            e.print();
            exit ( static_cast< int >( e ) );  <--------------- here the app crash
            }
        }
    } // worker()
-----------------------------------------------
+      e   {value=5 file="c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\client\worker.cpp" line=144 ...}   seti_error
-------------------
how you see    e = 5
+      e   {value=5 file="c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\client\worker.cpp" line=144 ...}   seti_error
    if ( (value <= atexit_failure) && (value >= 0) )
      value   5   int
+      _First   0x006cf4b8 "Can't open file"   const char *
           exit ( static_cast< int >( e ) );
+      e   {value=5 file="c:\i\sc\seti\seti_boinc_2k3_2.2b-ben-joe\client\worker.cpp" line=144 ...}   seti_error
------------------------------------------------------------------------------------------------------
and now ------> crashs the application thats not a really good solution of this problem

Eine Ausnahme (erste Chance) bei 0x7c812a7b in setiathome_2.3S5B_windows_intelx86.exe: Microsoft C++-Ausnahme: seti_error an Speicherposition 0x0012f158..
Der Thread 'Debug Exception Monitor' (0xd50) hat mit Code -5 (0xfffffffb) geendet.
Der Thread 'Timer' (0x278) hat mit Code -5 (0xfffffffb) geendet.
Das Programm "[3288] setiathome_2.3S5B_windows_intelx86.exe: Systemeigen" wurde mit Code -5 (0xfffffffb) beendet.
-----------------------------------------------------------------------------------------------------------------

questions:
1. why the did the program not open the file ? ( it was the first of the 7 test wu´s ),    still the archive bit is set
     did I made something wrong in the test with the file ?

2. the error is not well reported, solution should not crash

3. the stderr.txt is cleaned and empty
-----------------------------------------------------------------------------------------------
Merci for your attention, your suggestions are welcome
regards heinz

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: optimized sources
« Reply #164 on: 24 Jun 2007, 07:52:13 pm »
have some new test lines inserted to handle the error.

        else
            {
         //seti_britta: always exit with 0
            e.print();
         if ( e == FOPEN_FAILED )
         {
            fprintf( stderr, "Can´t open file" );
            exit( 0 );    <-------- here it come back with 0 now
         }
         if ( e == READ_FAILED )
         {
            fprintf( stderr, "Can´t read file" );
            exit( 0 );
         }
            exit ( static_cast< int >( e ) );
            }
really interesting, FOPE_FAILED is true, it goes then to fprintf statement, run it, then to exit(0), in assembler code come back with 0 now.
I believe it is a problem with crt
there is the assembly:
--- f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c ---------------------------
0063C2B0  push        ebp 
0063C2B1  mov         ebp,esp
0063C2B3  push        0   
0063C2B5  push        0   
0063C2B7  mov         eax,dword ptr
Code: [Select]

0063C2BA  push        eax 
0063C2BB  call        doexit (63C520h)
0063C2C0  add         esp,0Ch
0063C2C3  pop         ebp 
0063C2C4  ret   

-------------------------------------------------------------------
Eine Ausnahme (erste Chance) bei 0x7c812a7b in setiathome_2.3S5B_windows_intelx86.exe: Microsoft C++-Ausnahme: seti_error an Speicherposition 0x0012f158..
Der Thread 'Debug Exception Monitor' (0x764) hat mit Code 0 (0x0) geendet.
Der Thread 'Timer' (0x804) hat mit Code 0 (0x0) geendet.
Das Programm "[2336] setiathome_2.3S5B_windows_intelx86.exe: Systemeigen" wurde mit Code 0 (0x0) beendet.
----------------------------------------------------------------------------------------------------------------------------------------------------------------     
huuh .... I took the file boinc_lockfile from the test-package  into the debug ... is that right ?

thought that the output comes into the stderr.txt , but it is always empty ?  ?  ?
     
But I believe that the program cant read file is a other problem...
regards heinz

 

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?
Members
Total Members: 97
Latest: ToeBee
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 59559
Total Topics: 1672
Most Online Today: 355
Most Online Ever: 983
(20 Jan 2020, 03:17:55 pm)
Users Online
Members: 0
Guests: 62
Total: 62
Powered by EzPortal