Search found 27 matches

by whatdoido
2018-12-12T06:22:55-07:00
Forum: Magick++
Topic: annotate() - text with \n overlaps itself
Replies: 3
Views: 43271

Re: annotate() - text with \n overlaps itself

I've just tried installed the github master (3026328a5c87ed95822136405dd1665d627ea201) and recompiled and link but it still produces the same errornous output image. I can see that its linked against the 7.x libs $ ldd a.out | grep Magick libMagick++-7.Q16HDRI.so.4 => /lib64/libMagick++-7.Q16HDRI.so...
by whatdoido
2018-12-12T04:02:58-07:00
Forum: Magick++
Topic: annotate() - text with \n overlaps itself
Replies: 3
Views: 43271

annotate() - text with \n overlaps itself

I want to create a text overlay (text set via annotate()) onto an existing image with the sample code below. However, if the text has newline characters the text is overlapping on top of itself. The grey box on the output image should say: text with newline breaks The output generated is: https://us...
by whatdoido
2017-10-02T02:23:47-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

Appreciate the help on solving this . However: Proper of initialization of Magick++ requires you call InitializeMagick(). If you do, the number of threads are set to the number of cores on your system. please update the documentation state this is MANDATORY and not just best practice or only require...
by whatdoido
2017-10-01T16:13:27-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

Confirmed as under investigation (why Magick++ defaults to 1 thread) with workaround of: Magick::ResourceLimits::thread(omp_get_max_threads()) to force threads, to match your underlying system as seen by OMP, under Magick++ resize operation. https://github.com/ImageMagick/ImageMagick/issues/824 It m...
by whatdoido
2017-10-01T12:46:52-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

This looks like a bug now: Simplified sample program that does a resize - compile time flag to determine magick core calls or magick++ calls #include <sys/types.h> #include <string.h> #include <strings.h> #include <iostream> #include <omp.h> using namespace std; #ifdef USE_MAGICK_PLUSPLUS #include <...
by whatdoido
2017-10-01T11:14:35-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

and the compiler is fine at generating openmp enabled code Using code from here: https://people.sc.fsu.edu/~jburkardt/cpp_src/prime_openmp/prime_openmp.html g++ -fopenmp -pthread ./prime_openmp.cpp -o openmp -lpthread (gdb) set environment OMP_NUM_THREADS=4 (gdb) run Starting program: /home/ray/dev/...
by whatdoido
2017-10-01T10:53:08-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

using convert to resize the input jpeg spawns threads so we know the input should also have the user program do the same (gdb) run -resize 4288 RAW_CANON_6D.CR2.jpg foo.jpg Starting program: /usr/bin/convert -resize 4288 RAW_CANON_6D.CR2.jpg foo.jpg [Thread debugging using libthread_db enabled] Usin...
by whatdoido
2017-10-01T10:25:28-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

Some missing coffee needed - removed ImageMagick and ImageMagick-c++ and reinstalled and same tests again - same results. No threads in user program. $ convert --version Version: ImageMagick 6.9.9-13 Q16 x86_64 2017-09-14 http://www.imagemagick.org Copyright: © 1999-2017 ImageMagick Studio LLC Licen...
by whatdoido
2017-10-01T09:45:58-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

Running convert and checking its loaded shared libs: (gdb) run logo: -resize 200% null: Starting program: /usr/bin/convert logo: -resize 200% null: [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7fffec5f3700 (LWP 1282...
by whatdoido
2017-10-01T08:54:38-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

:) Yes, convert spawns trheads (gdb) run logo: -resize 2005 null: Starting program: /usr/bin/convert logo: -resize 2005 null: [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff0811700 (LWP 4684)] [New Thread 0x7ffff...
by whatdoido
2017-10-01T00:49:16-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

I've put some timing code around the call to Magick::resize() and stuck this through gdb. The call to resize() takes just over 2 seconds to return 1154 magick.resize(Magick::Geometry(tmp)); Missing separate debuginfos, use: dnf debuginfo-install ImageMagick-c++-6.9.9.13-1.fc26.x86_64 ImageMagick-lib...
by whatdoido
2017-09-30T12:01:57-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

Re: Magick++ API / OpenMP - special setup? Only one core used

Thanks.

Yes, "convert" shows OpenMP as a listed feature.

The images I'm resizing (scaling down) are 7360x4912; is there anything else I can check to understand why only one CPU core is being stressed during the Magick::Image::resize() operation?
by whatdoido
2017-09-30T08:23:16-07:00
Forum: Magick++
Topic: [SOLVED] Magick++ API / OpenMP - special setup? Only one core used
Replies: 20
Views: 50363

[SOLVED] Magick++ API / OpenMP - special setup? Only one core used

Summary: Magick++ API resize only uses one core/anything special required to enable OpenMP when using API. EDIT: Solution Add call to Magick::initializeMagick(""); before any other Magick calls - the documentation states this is NOT necessary for Unix/Linux systems but this appears not to...
by whatdoido
2017-09-22T06:36:46-07:00
Forum: Developers
Topic: C++ API graceful handling of MAGICK_TMPDIR becoming full
Replies: 4
Views: 14405

Re: C++ API graceful handling of MAGICK_TMPDIR becoming full

Thanks - I set this value in /etc/ImageMagick-6/policy/xml and it does not bus error but still dies. I still think there is a bug - the BUS error in original stack trace happens when, at the start of the program, the MAGICK_TMPDIR has capacity (ie not full). As the process runs, IM creates the tmp f...
by whatdoido
2017-09-22T03:44:45-07:00
Forum: Developers
Topic: C++ API graceful handling of MAGICK_TMPDIR becoming full
Replies: 4
Views: 14405

Re: C++ API graceful handling of MAGICK_TMPDIR becoming full

Thanks for the response - I understand that to avoid this problem, its best to point at a large enough partition for internal magick operations. However, by default on linux, it appears that magick uses /tmp. On many systems, /tmp is 1-2GB in size - with this default setup, my program crashes with S...