Author Topic: DISKIO - updated version in need of TEST  (Read 17529 times)

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #15 on: December 24, 2020, 01:32:14 pm »
You need to supply a compiler switch use use C++ comments in plain C code (.c files).

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #16 on: December 24, 2020, 02:30:32 pm »
Ah yes, it's - Ss+ or /Ss+.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #17 on: December 24, 2020, 06:44:04 pm »
I tried VACPP 3.08 with no joy, didn't even like the CPLUS type comments.
BTW: No, that can't be the reason. "//" is defined in VAC 3.0.8 as single-line comment string, as well as C-Set/2 supports this.

Well, it sure complained. Here, I just added a CPLUS type comment on line 9 and get,
Code: [Select]
icc -q -Wpro -O -qtune=pentium2 -Gl -Gm -Gs -DOS2TMR -DOS2 -c cpuperf.c
warning EDC1020: Excess text tune=pentium2 ignored on /q option.
cpuperf.c(9:1) : error EDC0046: Syntax error.
cpuperf.c(9:4) : error EDC0166: Definition of function a requires parentheses.
...
Then problems like not knowing what __uint64 is, after I fixed the comments to be C type, so I switched to OW.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #18 on: December 27, 2020, 06:07:13 pm »
Hi Dave!

Well, ideally would be to keep the Win32 codebase and binaries so people can do comparisons. Of course if you have no motivation to do that, you could remove them, while leaving them in history in case someone wants to resurrect them, and do a major version jump to ver 2 or fork by renaming your binary.

Yeah, "ideally" is a great point to note. This was my initial thinking as well but given what I see as diminishing returns on preserving the Win32 stuff I will simply fork the non-Win32 login into a 2.00.00 release, which will be purse OS/2 only stuff.

...You're the one taking on the maintainer-ship.
Hopefully you're using something like Git to maintain history.

Well, my track record is spotty at best when it comes to 'wanting' and actually 'doing' - think FFMPEG from some years ago when you and I had a few conversation on this topic. My interest was in chasing down an audio artifact I was seeing in the current FFMPEG builds. Regardless, that issue was addressed by an updated build and so I never moved further along with my idea.

...BTW, which compiler are you using? I tried VACPP 3.08 with no joy, didn't even like the CPLUS type comments. It did build fine with OpenWatcom with this patch.

I've got VACPP 3.65 with FP2 installed here, so that is what's being used. I have transitioned to NMAKE32 as opposed to the old NMAKE, but that's only because VACPP moved that way so I figured I'd just settle on the latest release and run with it.

From a "problems encountered so far" side of things I can only think of two issues:

1) undefined variables in dhry_1.c: Int_1_Loc, Int_2_Loc, Int_3_Loc, etc.
Maybe I'm just misunderstanding how DISKIO is supposed to be built, but running the makefile causes everything to be compiled, and yet I kept on getting missing declarations for the variables in the DEBUG section of dhry_1.c, see the stuff in:

Code: [Select]
...
  printf ("Execution ends\n");
  printf ("\n");
#if 1
  printf ("Final values of the variables used in the benchmark:\n");
  printf ("\n");
  printf ("Int_Glob:            %d\n", Int_Glob);
...

Since some of these variables were defined in dhry_1.c and others were not, I simply added them to dhry_1.c. That caused my errors to go away, but the variables are not populated with any values during runtime, so something else is missing there.

2) INCLUDE directories and VACPP vs OS2_Toolkit vs GCC setups
On my machine I have all three installed.

Previously I was able to successfully compile stuff with just the VACPP environment enabled. But these were rather simplistic (my attempts at coding). This does not work for the bigger projects. So I needed to merge the VACPP & OS2_Toolkit stuff and exclude the GCC stuff that's sitting in /usr/include. That took a while to sort out, but that's not an issue with DISKIO, rather my own configuration.

Big part of this is that I rely on VisualSlickEdit as my IDE and the concept of PROJECTS. Each one can be defined as having it's own environment, so you can certainly build a VACPP project, a GCC project, etc, but all of these need to have the appropriate (and correct LOL) setups. I am totally expecting this effort though, but when you start with something new (such as DISKIO) it's hard to figure out what compile error is coming from a bad makefile, a bad source code, or a bad environment setup!!!

Therefore, what does work for me now is using the following environment setup to build with:

Code: [Select]
@ECHO OFF
SET CXXMAIN=G:\code\tools\Ibmcpp
SET TKMAIN=g:\code\tools\toolkit
SET GCCMAIN=g:\usr

SET INCLUDE=%TKMAIN%\H\ARPA;%TKMAIN%\H\NET;%TKMAIN%\H\NETINET;%TKMAIN%\H\NETNB;%TKMAIN%\H\RPC;%TKMAIN%\SPEECH\H;%TKMAIN%\H\GL;%TKMAIN%\H;%INCLUDE%

SET INCLUDE=%TKMAIN%\H\LIBC;%TKMAIN%\H\LIBC\SYS;%TKMAIN%\H\MACHINE;%TKMAIN%\H\PROTOCOL;%TKMAIN%\H\RPC;%TKMAIN%\H\STACK16;%TKMAIN%\H\SYS;%INCLUDE%

rem SET INCLUDE=%GCCMAIN%\INCLUDE;%INCLUDE%

rem ***********************************************************
rem IBM C and C++ Compilers for OS/2 environment variable settings
rem Licensed Materials - Property of IBM
rem (C) Copyright IBM Corp. 1991, 1997   All Rights Reserved
rem ***********************************************************

SET BEGINLIBPATH=%CXXMAIN%\DLL;%BEGINLIBPATH%
SET DPATH=%CXXMAIN%\HELP;%CXXMAIN%\LOCALE;%DPATH%
SET HELP=%CXXMAIN%\HELP;%HELP%
SET IPFC=%CXXMAIN%\BIN;%IPFC%
SET LIB=%CXXMAIN%\LIB;%LIB%
SET CPP_DBG_LANG=CPP
SET LANG=en_us
SET NLSPATHTEMP=%CXXMAIN%\MSG\%%N
SET NLSPATH=%NLSPATHTEMP%;%NLSPATH%
SET NLSPATHTEMP=
SET PATH=%CXXMAIN%\BIN;%PATH%

/* Kick off the NMAKE app */
g:\code\tools\toolkit\bin\nmake32.exe /a /f %1
exit

This is the result of the largely DEFAULT VACPP 3.65 install along with the grafted updates to the OS2_Toolkit that have been released by netlabs over the years.
« Last Edit: December 27, 2020, 06:12:04 pm by Dariusz Piatkowski »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #19 on: December 27, 2020, 09:30:18 pm »
OK, I should revisit the VACPP 3.08 setup, probably screwed up in adding the toolkit. BTW, Gnumake seemed to work here.
For OpenWatcom, I have this to set things up,
Code: [Select]
@echo off
echo Open Watcom Build Environment
SET WATCOM=g:\WATCOM
SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%PATH%
SET BEGINLIBPATH=%WATCOM%\BINP\DLL;%BEGINLINPATH%
SET INCLUDE=%WATCOM%\H;%WATCOM%\H\OS2;%INCLUDE%
SET LIB=%WATCOM%\lib386;%WATCOM%\lib386\os2;%LIB%
SET EDPATH=%WATCOM%\EDDAT
SET WIPFC=%WATCOM%\WIPFC

And running wmake -f Watcom.mak (after the above mentioned patch) produces this output,
Code: [Select]
Open Watcom Make Version 2.0beta1 Limited Availability
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
WCC386 -bm -bt=os2v2 -e60 -6r -i.\; -oabhiklmnrt -s -w5 -ze -zdp -zq -zfp -zgp -zp1 -d2 -dOS2TMR -dOS2 -fodiskio.obj diskio.c
diskio.c(378): Warning! W131: No prototype found for function '_endthread'
diskio.c(383): Warning! W202: Symbol 'nCnt' has been defined, but not referenced
diskio.c(383): Warning! W202: Symbol 'nTrack' has been defined, but not referenced
diskio.c(476): Warning! W131: No prototype found for function '_beginthread'
diskio.c(7): Warning! W202: Symbol 'rcsid' has been defined, but not referenced
diskio.c(125): Warning! W202: Symbol 'nSemCount' has been defined, but not referenced
WCC386 -bm -bt=os2v2 -e60 -6r -i.\; -oabhiklmnrt -s -w5 -ze -zdp -zq -zfp -zgp -zp1 -d2 -dOS2TMR -dOS2 -fodiskacc2.obj diskacc2.c
diskacc2.c(386): Warning! W202: Symbol 'status' has been defined, but not referenced
diskacc2.c(384): Warning! W202: Symbol 'i' has been defined, but not referenced
diskacc2.c(9): Warning! W202: Symbol 'rcsrev' has been defined, but not referenced
diskacc2.c(7): Warning! W202: Symbol 'rcsid' has been defined, but not referenced
WCC386 -bm -bt=os2v2 -e60 -6r -i.\; -oabhiklmnrt -s -w5 -ze -zdp -zq -zfp -zgp -zp1 -d2 -dOS2TMR -dOS2 -fodhry_1.obj dhry_1.c
dhry_1.c(153): Warning! W131: No prototype found for function 'Func_2'
dhry_1.c(159): Warning! W131: No prototype found for function 'Proc_7'
dhry_1.c(164): Warning! W131: No prototype found for function 'Proc_8'
dhry_1.c(173): Warning! W131: No prototype found for function 'Proc_6'
WCC386 -bm -bt=os2v2 -e60 -6r -i.\; -oabhiklmnrt -s -w5 -ze -zdp -zq -zfp -zgp -zp1 -d2 -dOS2TMR -dOS2 -fodhry_2.obj dhry_2.c
dhry_2.c(39): Warning! W131: No prototype found for function 'Func_3'
WCC386 -bm -bt=os2v2 -e60 -6r -i.\; -oabhiklmnrt -s -w5 -ze -zdp -zq -zfp -zgp -zp1 -d2 -dOS2TMR -dOS2 -focpuperf.obj cpuperf.c
WLINK form os2 lx option int, dosseg, map, eliminate, mang, tog sort global @diskio.def
** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 2.0beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
loading object files
searching libraries
creating map file
creating an OS/2 linear extended executable

No show stopping warnings. I did adjust the flags a bit trying to produce a debug build but it didn't change the warnings.

I have run into what seems like a major OS/2 bug. If I have my USB3 HD plugged into my USB C adapter and try to run diskio (and sysbench), the system locks up hard while benchmarking the first or second hard drive, the USB one is number 5 or 6. This is repeatable.
Interestingly I tried it with the 1 TB JFS partition marked dirty after the crash and it worked though the USB 3 drive seemed to give USB 2 speeds, about 22 MB/s whereas copying an ISO I see 90+ MB/s.
Probably worth opening an issue at some point.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #20 on: August 12, 2022, 11:02:35 pm »
This is a reposting of my message to AN Testers from today.

Code: [Select]
epm: {0}[I:\Download\sysutil\diskio] diskio
DISKIO - Fixed Disk Benchmark, Version 1.20
(C) 1994-1998 Kai Uwe Rommel
(C) 2004 madded2

    2020 Dariusz Piatkowski

Number of fixed disks: 9
Number of CD-ROM drives: 1

Dhrystone 2.1 C benchmark routines (C) 1988 Reinhold P. Weicker
Dhrystone benchmark for this CPU: 5716722 runs/sec

Hard disk 1: 255 sides, 29185 cylinders, 63 sectors per track = 228934 MB
Drive cache/bus transfer rate: 106195 k/sec

Data transfer rate on cylinder 0   : 146183 k/sec

Data transfer rate on cylinder 29183: 191315 k/sec

CPU usage by full speed disk transfers: 11%

Average latency time: 0.1 ms

Average data access time: Disk read error.
Multithreaded disk I/O (4 threads):
 133148 k/sec, 9% CPU usage


Hard disk 2: 12 sides, 512 cylinders, 9 sectors per track = 27 MB
Drive cache/bus transfer rate: Disk read error.
Data transfer rate on cylinder 0   : Disk read error.
Data transfer rate on cylinder 510 : Disk read error.
CPU usage by full speed disk transfers: Disk read error.
Average latency time: Disk read error.
Average data access time: Disk read error.
Multithreaded disk I/O (4 threads):
SYS1808:
The process has stopped.  The software diagnostic
code (exception code) is  009B.

epm: {99}[I:\Download\sysutil\diskio]
Hard disk 1 is a relative old SSD: A (partly faulty) Kingston
SKC 300 S37A (240 GB).
Haven't tried with the faster Samsung 860 EVO (500 GB) so far.

Hard disk 2 doesn't exist.

This seems to give better values for SSDs than Sysbench.
« Last Edit: August 12, 2022, 11:12:24 pm by Andreas Schnellbacher »

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #21 on: August 15, 2022, 08:53:45 pm »
Does it have a sense to do diskbench on SSD with not aligned partition ?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DISKIO - updated version in need of TEST
« Reply #22 on: August 16, 2022, 01:02:44 am »
Diskio reads tracks and ignores partitions and file systems. Along with the rest of OS/2, it does expect 512 byte sectors but i doubt that matters.