Re: Unix error 17 on nqueens example

Gerd Stolpmann <[email protected]> Wed, 29 Feb 2012 15:41:16 +0100
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <1330526476.2826.173.camel@thinkpad>
Am Sonntag, den 26.02.2012, 23:45 +0100 schrieb Pierre-Alexandre Voye:
> Hi list,
> 
> In my mac (Lion, 10.7) I'm unable to make nqueens example work with
> -mp or even -sht flags
> Here my attempts :
> 
> $ time ./nqueens -n 3 -mp > /dev/null
> Fatal error: exception Unix.Unix_error(17, "",
> "/Users/ontologiae/Documents/Projets/COWEBO/CoweboDev/Etudes/ocamlnet-3.5/examples/multicore/run_nqueens/netplex.controller/admin")

Unix error 17 = ENAMETOOLONG. You can find this out by running in the
toploop:

# (Obj.magic 17 : Unix.error);;
- : Unix.error = Unix.ENAMETOOLONG

This refers to the path name of the Unix domain socket. Because of
historical reasons, such paths are limited to 108 bytes. You can work
around by e.g. creating a symlink to your working directory in /tmp.

> time ./nqueens -n 3 -sht > /dev/null
> Fatal error: exception Unix.Unix_error(12, "fchmod", "")
> 
> 
> $ time ./nqueens -n 3 -mp2 > /dev/null
> Fatal error: exception Unix.Unix_error(12, "fchmod", "")
> 
> Is it a mac/BSD linked problem ?

The fchmod problem probably is. fchmod is here called on a file
descriptor referring to shared memory. This is strange because fchmod is
part of the POSIX API for shared memory.

Anyway, I'll just catch EINVAL and ignore it.

Gerd

> 
> Regards
> 
> Pierre-Alexandre
> 
> -- 
> ---------------------
> https://twitter.com/#!/ontologiae/
> http://linuxfr.org/users/montaigne
> 
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing 
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________ Ocamlnet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    [email protected]
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/