Pencil Code - Astaroth pending merge - Urgent notice for action

22 views
Skip to first unread message

Frederick Gent

unread,
Mar 6, 2025, 2:35:04 AMMar 6
to pencil-code-discuss
Dear PC users,

We plan to merge the gputestv6 branch into the master by mid March. The merger locally from master to gputestv6 and then from the merged gputestv6 back into the master has been successful, in the respect that all 69 of the standard auto-test samples are successful.

However, there are many structural changes to many modules that are required to make possible the offloading of the PDE calculations to the GPUs. The changes should not interfere with the smooth application of the CPU standalone code, but reverting local changes to the GPU-ready code could potentially damage its operation.

Therefore, if you have any substantial changes locally, please let me know if you will be pushing them soon. It would likely be easier for us to merge your changes of the master branch into our gputestv6 branch before completing the merger into the master. In any case please complete your pushes by next week, so that we can complete the merger by mid-March.

If nobody has any significant changes then we would proceed promptly with the merger, after which users would need to pull the GPU-ready version before publishing local changes.

Best regards,

Fred

Kishore G

unread,
Mar 20, 2025, 5:08:46 AMMar 20
to pencil-co...@googlegroups.com
Hi Fred (and others involved with the gputestv6 branch).

After the merge, it appears that averages (both 1D and 2D) are no longer
written out at t=0. Is this intentional?

Commit e58fdf98176cf975253305690ea8e3bdf6118077 , in which you updated
samples/helical-MHDturb/reference_xyaverages.out looks suspicious, since it
only increments the time values by 4e-2 without actually changing the
numerical values of the averaged quantities. Has the merge introduced a bug in
the way the output time is being written to xyaverages.dat?

With reference to samples/helical-MHDturb, as of commit
5456591699ffcae5875daa429022fc60f6e5f38e , the first average was written out at
t=0. On the other hand, as of b08909028a988b208421d5215dc9415fcfb05aa4 , the
first average has t!=0. I tried to run a bisect between these two commits, but
the intervening merge made it too difficult.

--
Kishore G.
வியாழன், 6 மார்ச், 2025 1:05:03 PM இந்திய நிலையான நேரம், Frederick Gent எழுதியது

Wladimir Lyra

unread,
Mar 23, 2025, 12:39:07 PMMar 23
to pencil-co...@googlegroups.com

mpicc -DFUNDERSC=1 -DDOUBLE_PRECISION    -o pthread.o -c pthread.c

pthread.c: In function 'get_cpu_c_':

pthread.c:154:16: error: implicit declaration of function 'sched_getcpu' [-Wimplicit-function-declaration]

  154 |         return sched_getcpu();

      |                ^~~~~~~~~~~~

pthread.c: In function 'set_cpu_c_':

pthread.c:163:5: error: unknown type name 'cpu_set_t'

  163 |     cpu_set_t cpuset;

      |     ^~~~~~~~~

pthread.c:164:5: error: implicit declaration of function 'CPU_ZERO' [-Wimplicit-function-declaration]

  164 |     CPU_ZERO(&cpuset);

      |     ^~~~~~~~

pthread.c:165:5: error: implicit declaration of function 'CPU_SET' [-Wimplicit-function-declaration]

  165 |     CPU_SET(core_id, &cpuset);

      |     ^~~~~~~

pthread.c:166:20: error: implicit declaration of function 'pthread_setaffinity_np'; did you mean 'pthread_setname_np'? [-Wimplicit-function-declaration]

  166 |     const int rc = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);

      |                    ^~~~~~~~~~~~~~~~~~~~~~

      |                    pthread_setname_np

pthread.c:166:66: error: 'cpu_set_t' undeclared (first use in this function); did you mean 'cpuset'?

  166 |     const int rc = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);

      |                                                                  ^~~~~~~~~

      |                                                                  cpuset

pthread.c:166:66: note: each undeclared identifier is reported only once for each function it appears in


--
You received this message because you are subscribed to the Google Groups "pencil-code-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pencil-code-dis...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pencil-code-discuss/3909476.5fSG56mABF%40kishore-thinkpad-e495.

Matthias Rheinhardt

unread,
Mar 23, 2025, 4:46:08 PMMar 23
to pencil-co...@googlegroups.com

Hi Wlad & Kishore,


@Wlad: this compilation error is strange. First, I assume that you are compiling with MULTITHREADUNG=on

in Makefile.local? Otherwise, this source should not be compiled. Second, 


#define _GNU_SOURCE

should be the first line in pthread.c to avoid this error. But it is, as I see on the repo.

So, which is your mpicc?


We are aware that averages (and spectra) are no longer written out at t=0. We are working on it, but not yet successful.


Best, 

Matthias


Von: pencil-co...@googlegroups.com <pencil-co...@googlegroups.com> im Auftrag von Wladimir Lyra <wladim...@gmail.com>
Gesendet: Sonntag, 23. März 2025 17:38:52
An: pencil-co...@googlegroups.com
Betreff: Re: Pencil Code - Astaroth pending merge - Urgent notice for action
 

Wladimir Lyra

unread,
Mar 24, 2025, 2:31:02 AMMar 24
to pencil-co...@googlegroups.com
I’m compiling the same stuff that was compiling yesterday but now it’s giving me this error. 

Also, unrelatedly, a sample of mine is broken from the commit below: 

4cb1bb29fc0bd9468c706a44ec455541f26a8f3d is the first bad commit
commit 4cb1bb29fc0bd9468c706a44ec455541f26a8f3d
Author: fredgent <fred.g...@gmail.com>
Date: Tue May 25 10:40:39 2021 +0300

Make diffusive mass correction default

src/density.f90 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Wladimir Lyra

unread,
Mar 24, 2025, 4:14:55 AMMar 24
to pencil-co...@googlegroups.com
 I assume that you are compiling with MULTITHREADUNG=on 
in Makefile.local? 

Nope. 

which is your mpicc?
 


% mpicc -v   

mpicc for MPICH version 4.2.3

Using built-in specs.

COLLECT_GCC=/opt/local/bin/gcc-mp-14

COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin24/14.2.0/lto-wrapper

Target: x86_64-apple-darwin24

Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc14/gcc14/work/gcc-14.2.0/configure --prefix=/opt/local --build=x86_64-apple-darwin24 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc14 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-14 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-14 --with-gxx-include-dir=/opt/local/include/gcc14/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --disable-tls --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc14/libc++/include/c++/v1 --with-pkgversion='MacPorts gcc14 14.2.0_3+stdlib_flag' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk

Thread model: posix

Supported LTO compression algorithms: zlib zstd

gcc version 14.2.0 (MacPorts gcc14 14.2.0_3+stdlib_flag) 


Matthias Rheinhardt

unread,
Mar 24, 2025, 6:58:31 PMMar 24
to pencil-co...@googlegroups.com

Hi Wlad,


   Nope


Then I conclude  that you tried to build one of the helpers (read_videofiles etc.).

I pushed a fix to Makefile.src.


Best,

Matthias


Gesendet: Montag, 24. März 2025 09:14:35

Wladimir Lyra

unread,
Mar 24, 2025, 11:29:38 PMMar 24
to pencil-co...@googlegroups.com
Doesn't seem to be the case.

I've tried compiling samples/2d-tests/globaldisc

Same issue happens:

Wladimir Lyra

unread,
Mar 24, 2025, 11:32:03 PMMar 24
to pencil-co...@googlegroups.com
And another error, now if I try to compile a parallel sample (samples/baroclinic) 

It's dying with an error: Makefile.src:437: *** Cannot build: ncpus /= nprocx*nprocy*nprocz..  Stop.

Funny, as the sample is ncpus=4, nprocx, nprocy=2, nprocz=1.

Maybe it's not allowing the code to fake-run parallel for a sample. 


% pc_build           

No such file: </etc/issue>

No such file: </etc/version>

Use of uninitialized value $linux_type in index at /Users/wlyra/pencil-code/lib/perl/Pencil/ConfigFinder.pm line 283.

Found config file </Users/wlyra/pencil-code/config/hosts/wlyra/host-caronte-Darwin.conf>

Running make 'FC=mpif90' 'FFLAGS=-fbounds-check -Wall -Wunused -O3 -I/opt/local/include' 'FFLAGS_DOUBLE=-fdefault-real-8 -fdefault-double-8' 'F77=mpif77' 'CC=mpicc' 'CFLAGS=-DFUNDERSC=1' 'CFLAGS_DOUBLE=-DDOUBLE_PRECISION' 'default_to_be'

MAKING src/Makefile.inc

touch src/.build-history

echo wlyra"@"`hostname` "("`date`")" >> src/.build-history

( cd src && \

  echo "===== " /Library/Developer/CommandLineTools/usr/bin/make FROM_PARENT=src/ -f Makefile.src code "====="; \

  /Library/Developer/CommandLineTools/usr/bin/make FROM_PARENT=src/ -f Makefile.src default_to_be \

)

=====  /Library/Developer/CommandLineTools/usr/bin/make FROM_PARENT=src/ -f Makefile.src code =====

sed: 2: "s/.*nprocx *= *\([0-9][ ...": undefined label ';T del;:del;d'

sed: 2: "s/.*nprocy *= *\([0-9][ ...": undefined label ';T del;:del;d'

sed: 2: "s/.*nprocz *= *\([0-9][ ...": undefined label ';T del;:del;d'

sed: 2: "s/.*nprocx *= *\([0-9][ ...": undefined label ';T del;:del;d'

sed: 2: "s/.*nprocy *= *\([0-9][ ...": undefined label ';T del;:del;d'

sed: 2: "s/.*nprocz *= *\([0-9][ ...": undefined label ';T del;:del;d'

sed: 2: "s/^.*nprocx *= *\([^,]* ...": undefined label 'cont;T del;:del;d;:cont;s/\([a-zA-Z_][a-zA-Z_]*\)/$(\1)/g;s/^\(.*\)$/nprocx= \1/'

sed: 2: "s/^.*nprocy *= *\([^,]* ...": undefined label 'cont;T del;:del;d;:cont;s/\([a-zA-Z_][a-zA-Z_]*\)/$(\1)/g;s/^\(.*\)$/nprocy= \1/'

sed: 2: "s/^.*nprocz *= *\([^,]* ...": undefined label 'cont;T del;:del;d;:cont;s/\([a-zA-Z_][a-zA-Z_]*\)/$(\1)/g;s/^\(.*\)$/nprocz= \1/'


Makefile.src:437: *** Cannot build: ncpus /= nprocx*nprocy*nprocz..  Stop.

make: *** [default_to_be] Error 2

'make FC=mpif90 FFLAGS=-fbounds-check -Wall -Wunused -O3 -I/opt/local/include FFLAGS_DOUBLE=-fdefault-real-8 -fdefault-double-8 F77=mpif77 CC=mpicc CFLAGS=-DFUNDERSC=1 CFLAGS_DOUBLE=-DDOUBLE_PRECISION default_to_be' failed: <Inappropriate ioctl for device>

Wladimir Lyra

unread,
Mar 24, 2025, 11:55:04 PMMar 24
to pencil-co...@googlegroups.com
Nah it's worse. The sed is failing to get the values of ncpus and nprocp[xyz]

Might be due to syntax of sed for OSX.

The other problem seems to be due to OSX as well. I've compiled both samples in Linux without issues.



ccy...@ua.edu

unread,
Mar 25, 2025, 12:26:19 AMMar 25
to pencil-code-discuss
I second that the code should be able to be compiled under macOS, i.e., BSD.

Matthias Rheinhardt

unread,
Mar 25, 2025, 10:12:15 AMMar 25
to pencil-co...@googlegroups.com

Hi,


sorry for the inconveniences. I also think that the nprocs problem is due to deviant behavior of sed on MacOS. I'll try to find solutions.


Wlad, which is your version of sed?


The compilation failure of pthread should be fixed for now (wrong dependency).

When using multithreading, though, we would need pthread.c to be compiled,

so I will add a corresponding option to the config for gcc.


Best,

Matthias


Gesendet: Dienstag, 25. März 2025 04:54:49

Matthias Rheinhardt

unread,
Mar 25, 2025, 10:46:14 AMMar 25
to pencil-co...@googlegroups.com

Mac users might have to add an include path such as


/opt/homebrew/Cellar/hwloc/2.11.1/share/hwloc/tests/hwloc/ports/include/netbsd


to their gcc compiler options to be able to compile pthread.c


Best,

Matthias


Von: Matthias Rheinhardt
Gesendet: Dienstag, 25. März 2025 15:11:51
An: pencil-co...@googlegroups.com
Betreff: AW: Pencil Code - Astaroth pending merge - Urgent notice for action
 

Matthias Rheinhardt

unread,
Mar 25, 2025, 11:53:30 AMMar 25
to pencil-co...@googlegroups.com

The sed error is because of a missing GNU extension in Mac's sed.

Let me see whether I can find a workaround.


Matthias


Gesendet: Dienstag, 25. März 2025 04:31:49

Matthias Rheinhardt

unread,
Mar 25, 2025, 5:36:57 PMMar 25
to pencil-co...@googlegroups.com

Hi Wlad,


the sed issue is now sorted. Can you compile on Mac?


Best,

Matthias


Von: Matthias Rheinhardt
Gesendet: Dienstag, 25. März 2025 16:53:24
An: pencil-co...@googlegroups.com
Betreff: AW: Pencil Code - Astaroth pending merge - Urgent notice for action
 

Wladimir Lyra

unread,
Mar 25, 2025, 10:13:55 PMMar 25
to pencil-co...@googlegroups.com
Hi Matthias 

Yes it compiles now. 



Nils Erland L. Haugen

unread,
Mar 26, 2025, 5:48:04 AMMar 26
to pencil-co...@googlegroups.com

Hi,

Trying to compile on Mac I get the following error (it worked a week or so ago):

 

mpif90 cparam.o cdata.o mpicomm.o noborder_profiles.o boundcond.o nodebug.o debug_io_dist.o deriv.o diagnostics.o nofarray_alloc.o farray.o filter.o nofixed_point.o nofourier.o general.o geometrical_types.o ghost_check.o ghostfold_mpicomm.o grid.o nogsl.o noimplicit_diffusion.o initcond.o noinitial_condition.o nohdf5_io.o   io_dist.o file_io_f95.o nolsode_for_chemistry.o messages.o noNSCBC.o param_io.o persist.o nopower_spectrum.o nopython.o register.o shared_variables.o nosignal_handling.o slices.o slices_methods.o snapshot.o nosolid_cells_mpicomm.o nosolid_cells.o nostreamlines.o nostruct_func.o sub.o syscalls.o  syscalls_ansi.o notestperturb.o notimeavg.o noweno_transport.o noyinyang.o noyinyang_mpi.o magnetic.a particles_main.a morton_helper.o  chemistry.o nochiral.o nocosmicray.o nocosmicrayflux.o density.o density_methods.o nodetonate.o nodustdensity.o nodustvelocity.o temperature_ionization.o eos_chemistry.o noforcing.o nogravity.o noheatflux.o hydro.o nohyperresi_strict.o nohypervisc_strict.o noimplicit_physics.o nointerstellar.o nolorenz_gauge.o noneutraldensity.o noneutralvelocity.o noopacity.o nopointmasses.o nopoisson.o nopolymer.o pscalar_nolog.o noradiation.o noselfgravity.o noSGS_hydro.o noshear.o noshock.o nospecial.o noascalar.o  notestfield.o notestflow.o notestscalar.o viscosity.o nogpu.o dummy_astaroth_ansi.o notraining.o start.o -ldl     -o start.x

mpif90 cparam.o cdata.o mpicomm.o noborder_profiles.o boundcond.o nodebug.o debug_io_dist.o deriv.o diagnostics.o nofarray_alloc.o farray.o filter.o nofixed_point.o nofourier.o general.o geometrical_types.o ghost_check.o ghostfold_mpicomm.o grid.o nogsl.o noimplicit_diffusion.o initcond.o noinitial_condition.o nohdf5_io.o   io_dist.o file_io_f95.o nolsode_for_chemistry.o messages.o noNSCBC.o param_io.o persist.o nopower_spectrum.o nopython.o register.o shared_variables.o nosignal_handling.o slices.o slices_methods.o snapshot.o nosolid_cells_mpicomm.o nosolid_cells.o nostreamlines.o nostruct_func.o sub.o syscalls.o  syscalls_ansi.o notestperturb.o notimeavg.o noweno_transport.o noyinyang.o noyinyang_mpi.o magnetic.a particles_main.a morton_helper.o  chemistry.o nochiral.o nocosmicray.o nocosmicrayflux.o density.o density_methods.o nodetonate.o nodustdensity.o nodustvelocity.o temperature_ionization.o eos_chemistry.o noforcing.o nogravity.o noheatflux.o hydro.o nohyperresi_strict.o nohypervisc_strict.o noimplicit_physics.o nointerstellar.o nolorenz_gauge.o noneutraldensity.o noneutralvelocity.o noopacity.o nopointmasses.o nopoisson.o nopolymer.o pscalar_nolog.o noradiation.o noselfgravity.o noSGS_hydro.o noshear.o noshock.o nospecial.o noascalar.o  notestfield.o notestflow.o notestscalar.o viscosity.o nogpu.o  timestep.o notraining.o equ.o pencil_check.o run.o -ldl       -o run.x

Undefined symbols for architecture arm64:

Undefined symbols for architecture arm64:

  "_copy_addr_c_", referenced from:

      ___syscalls_MOD_copy_addr_real in syscalls.o

      ___syscalls_MOD_copy_addr_dble_1d in syscalls.o

      ___syscalls_MOD_copy_addr_dble in syscalls.o

      ___syscalls_MOD_copy_addr_real_4d in syscalls.o

      ___syscalls_MOD_copy_addr_real_3d in syscalls.o

      ___syscalls_MOD_copy_addr_real_2d in syscalls.o

      ___syscalls_MOD_copy_addr_int_2d in syscalls.o

      ...

  "_copy_addr_c_", referenced from:

      ___syscalls_MOD_copy_addr_real in syscalls.o

      ___syscalls_MOD_copy_addr_dble_1d in syscalls.o

      ___syscalls_MOD_copy_addr_dble in syscalls.o

      ___syscalls_MOD_copy_addr_real_4d in syscalls.o

      ___syscalls_MOD_copy_addr_real_3d in syscalls.o

      ___syscalls_MOD_copy_addr_real_2d in syscalls.o

      ___syscalls_MOD_copy_addr_int_2d in syscalls.o

      ...

  "_copy_addr_c_bool_", referenced from:

      ___syscalls_MOD_copy_addr_log_1d in syscalls.o

  "_copy_addr_c_bool_", referenced from:

      ___syscalls_MOD_copy_addr_log_1d in syscalls.o

  "_directory_exists_c_", referenced from:

      ___syscalls_MOD_readlink in syscalls.o

      ___syscalls_MOD_directory_exists in syscalls.o

  "_directory_exists_c_", referenced from:

      ___syscalls_MOD_readlink in syscalls.o

      ___syscalls_MOD_directory_exists in syscalls.o

  "_extract_string_c_", referenced from:

      ___syscalls_MOD_extract_str in syscalls.o

  "_extract_string_c_", referenced from:

      ___syscalls_MOD_extract_str in syscalls.o

  "_file_size_c_", referenced from:

      ___file_io_MOD_file_size in file_io_f95.o

  "_file_size_c_", referenced from:

      ___file_io_MOD_file_size in file_io_f95.o

  "_get_env_var_c_", referenced from:

      ___syscalls_MOD_get_env_var in syscalls.o

  "_get_env_var_c_", referenced from:

      ___syscalls_MOD_get_env_var in syscalls.o

  "_get_pid_c_", referenced from:

      ___syscalls_MOD_get_pid in syscalls.o

  "_get_pid_c_", referenced from:

      ___syscalls_MOD_get_pid in syscalls.o

  "_getmortonrank3d_", referenced from:

      ___general_MOD_find_proc_coords in general.o

      ___general_MOD_find_proc_coords_general in general.o

  "_getmortonrank3d_", referenced from:

      ___general_MOD_find_proc_coords in general.o

      ___general_MOD_find_proc_coords_general in general.o

  "_getmortonrank_", referenced from:

      ___general_MOD_find_proc_general in general.o

      ___general_MOD_find_proc in general.o

  "_getmortonrank_", referenced from:

      ___general_MOD_find_proc_general in general.o

      ___general_MOD_find_proc in general.o

  "_is_nan_c_", referenced from:

      ___syscalls_MOD_is_nan_4d in syscalls.o

      ___syscalls_MOD_is_nan_3d in syscalls.o

      ___syscalls_MOD_is_nan_2d in syscalls.o

      ___syscalls_MOD_is_nan_1d in syscalls.o

      ___syscalls_MOD_is_nan_0d in syscalls.o

  "_is_nan_c_", referenced from:

      ___syscalls_MOD_is_nan_4d in syscalls.o

      ___syscalls_MOD_is_nan_3d in syscalls.o

      ___syscalls_MOD_is_nan_2d in syscalls.o

      ___syscalls_MOD_is_nan_1d in syscalls.o

      ___syscalls_MOD_is_nan_0d in syscalls.o

  "_islink_c_", referenced from:

      ___syscalls_MOD_islink in syscalls.o

  "_islink_c_", referenced from:

      ___syscalls_MOD_islink in syscalls.o

  "_mem_usage_c_", referenced from:

      ___syscalls_MOD_memusage in syscalls.o

  "_mem_usage_c_", referenced from:

      ___syscalls_MOD_memusage in syscalls.o

  "_readlink_c_", referenced from:

      ___syscalls_MOD_readlink in syscalls.o

  "_readlink_c_", referenced from:

      ___syscalls_MOD_readlink in syscalls.o

  "_sizeof_real_c_", referenced from:

      ___syscalls_MOD_sizeof_real in syscalls.o

  "_sizeof_real_c_", referenced from:

      ___syscalls_MOD_sizeof_real in syscalls.o

  "_system_c_", referenced from:

      ___syscalls_MOD_system_cmd in syscalls.o

  "_system_c_", referenced from:

      ___syscalls_MOD_system_cmd in syscalls.o

  "_write_binary_file_c_", referenced from:

      ___file_io_MOD_write_binary_file_str in file_io_f95.o

      ___file_io_MOD_write_binary_file_char in file_io_f95.o

ld: symbol(s) not found for architecture arm64

  "_write_binary_file_c_", referenced from:

      ___file_io_MOD_write_binary_file_str in file_io_f95.o

      ___file_io_MOD_write_binary_file_char in file_io_f95.o

ld: symbol(s) not found for architecture arm64

collect2: error: ld returned 1 exit status

collect2: error: ld returned 1 exit status

make[2]: *** [run.x] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: *** [start.x] Error 1

make[1]: *** [code] Error 2

make: *** [default_to_be] Error 2

'make -j FFLAGS_DOUBLE=-fdefault-real-8 -fdefault-double-8 CFLAGS_DOUBLE=-DDOUBLE_PRECISION LD_MPI= CFLAGS_FFTW3= FFLAGS_FFTW3= LD_FFTW3= CFLAGS_FFTW2= FFLAGS_FFTW2= LD_FFTW2= FC=mpif90 F77=mpif77 CFLAGS=-DFUNDERSC=0 FFLAGS=-O -O0 -Wall -finit-real=sNaN -finit-integer=-2147483648 -g -fbacktrace -fimplicit-none -fcheck=all -ffpe-trap=invalid,zero,overflow -I/opt/homebrew/Cellar/hwloc/2.11.2/share/hwloc/tests/hwloc/ports/include/netbsd/ LDFLAGS_HELPER=-dynamic OMPFFLAGS=-fopenmp OMPLFLAGS=-lgomp PPFLAGS=-cpp FSTD_95=-std=f95 FSTD_2003=-std=f2003 LDMPI=-I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib -L/usr/lib/openmpi/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl -I/opt/homebrew/Cellar/hwloc/2.11.2/share/hwloc/tests/hwloc/ports/include/netbsd/ CC=mpicc default_to_be' failed: <Inappropriate ioctl for device>

 

Any ideas what is wrong?

Nils

Matthias Rheinhardt

unread,
Mar 26, 2025, 5:20:51 PMMar 26
to pencil-co...@googlegroups.com

Hi Nils,


could you do


nm src/syscalls_ansi.o | grep copy_addr


?

I suspect that the output will not be 

_copy_addr_c_

but 

copy_addr_c_ or copy_addr_c


which wold explain the error. We have then to examine the compilation options.


Best,

Matthias


Von: 'Nils Erland L. Haugen' via pencil-code-discuss <pencil-co...@googlegroups.com>
Gesendet: Mittwoch, 26. März 2025 10:47:59

Nils Erland L. Haugen

unread,
Mar 31, 2025, 9:32:26 AMMar 31
to pencil-co...@googlegroups.com

Hi Matthias

Thanks for your suggestion.

The output is:

 

% nm src/syscalls_ansi.o | grep copy_addr

0000000000000c8c T _copy_addr_c

0000000000000cac T _copy_addr_c_bool

 

Does this make any sense?

Matthias Rheinhardt

unread,
Mar 31, 2025, 11:34:45 AMMar 31
to pencil-co...@googlegroups.com

Hi Nils,


given that _copy_addr_c_ is undefined and in src/syscalls_ansi.o you do  find _copy_addr_c,

it means that a pending underscore is missing in the symbols created by the C compiler.

So, you would have to add 

-DFUNDERSC=1

to the CFLAGS.


Best,

Matthias


Von: 'Nils Erland L. Haugen' via pencil-code-discuss <pencil-co...@googlegroups.com>
Gesendet: Montag, 31. März 2025 15:32:20

Nils Erland L. Haugen

unread,
Apr 1, 2025, 6:59:45 AMApr 1
to pencil-co...@googlegroups.com

Hi Matthias

 

Yes, now it works – thanks!

 

Best,

Reply all
Reply to author
Forward
0 new messages