Hello Michael

Michael Ferguson <[email protected]> writes:

> Hi Roger -
>
> FreeBSD isn't a currently tested platform for Chapel (we tend to focus on 
> linux variants).
> However the following patch might enable you to get further. I intend to 
> commit some
> improvements along these lines to the master branch.
>
> I'm also curious to see the entire output from ./util/printchplenv 
> --anonymize -- in particular
> I'm interested in the CHPL_GASNET_SEGMENT value for your configuration.
>
> Cheers,
>
> -michael
>
> diff --git a/runtime/src/chplsys.c b/runtime/src/chplsys.c
> index c1fd0bb6..f6595fce 100644
> --- a/runtime/src/chplsys.c
> +++ b/runtime/src/chplsys.c
> @@ -413,6 +413,12 @@ size_t chpl_bytesAvailOnThisLocale(void) {
>    if (sysctlbyname("hw.usermem64", &membytes, &len, NULL, 0))
>      chpl_internal_error("query of hw.usermem64 failed");
>    return (size_t) membytes;
> +#elif defined(__FreeBSD__)
> +  uint64_t membytes;
> +  size_t len = sizeof(membytes);
> +  if (sysctlbyname("hw.usermem", &membytes, &len, NULL, 0))
> +    chpl_internal_error("query of hw.usermem failed");
> +  return (size_t) membytes;
>  #elif defined(__linux__)
>    struct sysinfo s;
>  

Paul Cassella suggested the location of the problem and I made a patch
similar to the one you provided, and it seems to work.  Unfortunately I
seem not to have copied to the mailing list my reply to Paul, for which
I apologise.

This is the output from printchlenv that you requested:

CHPL_TARGET_PLATFORM: freebsd
CHPL_TARGET_COMPILER: clang
CHPL_TARGET_ARCH: core2 +
CHPL_LOCALE_MODEL: flat
CHPL_COMM: gasnet +
  CHPL_COMM_SUBSTRATE: udp
  CHPL_GASNET_SEGMENT: everything
CHPL_TASKS: fifo +
CHPL_LAUNCHER: amudprun
CHPL_TIMERS: generic
CHPL_UNWIND: none +
CHPL_MEM: cstdlib +
CHPL_MAKE: gmake
CHPL_ATOMICS: intrinsics +
  CHPL_NETWORK_ATOMICS: none
CHPL_GMP: system +
CHPL_HWLOC: hwloc +
CHPL_REGEXP: re2 +
CHPL_WIDE_POINTERS: struct
CHPL_AUX_FILESYS: none

I'm happy to supply any information that you would like to have.

Best wishes,
Roger



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to