McStasMcXtrace / McCode

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.
https://github.com/McStasMcXtrace/McCode/wiki
GNU General Public License v3.0
78 stars 54 forks source link

McXtrace: mpi.h and gsl headers not found on MacOSX #1004

Open ebknudsen opened 4 years ago

ebknudsen commented 4 years ago

It would appear that they have somehow not been added to the miniconda-installation. investigating further...

ebknudsen commented 4 years ago

The Check-PY-dependencies script cannot find orted nor orterun so something must be missing

willend commented 4 years ago

Could you please try putting a McStas 2.6 on the same machine also?

I am quite sure I ran with MPI without issues on macOS with that release.

Best Peter

ebknudsen commented 4 years ago

McStas 2.5 is on the machine and it works, so it is McXtrace only. Trying to see what the differences can be. My guess is something went south during packaging, so mpi and gsl did not get conda'd. That's the current theory.

willend commented 4 years ago

Sounds plausible. May be worth to cross-check versions of conda?

With a little luck you may be able to

conda install openmpi gsl
willend commented 4 years ago

Weird, everything works on my machine??

pkwi@pkwi-mbp2018:~/tmp$ mxrun -c --mpi=4 JJ_SAXS.instr -n1e7 
INFO: No output directory specified (--dir)
INFO: Using directory: "JJ_SAXS_20200428_163157"
INFO: Regenerating c-file: JJ_SAXS.c
Warning: Component Origin=Progress_bar(string profile) definition parameter
         may be changed into a setting parameter to avoid
         warnings at compile time.
Warning: Component apparent_source=Source_flat(string spectrum_file) definition parameter
         may be changed into a setting parameter to avoid
         warnings at compile time.
CFLAGS=
    INFO: Recompiling: ./JJ_SAXS.out
mccode-r.c:1880:1: warning: control may reach end of non-void function [-Wreturn-type]
} /* mcsiminfo_init */
^
1 warning generated.
INFO: ===
Simulation 'JJ_SAXS' (JJ_SAXS.instr): running on 4 nodes (master is 'pkwi-mbp2018.local', MPI version 3.1).
Instrument parameters for JJ_SAXS (JJ_SAXS.instr)
Set value of instrument parameter pin2_pos (double) [default='0.2']:

Set value of instrument parameter pin3_pos (double) [default='0.4']:

Set value of instrument parameter optic_L (double) [default='0.1']:

Set value of instrument parameter sample_pos (double) [default='0.2']:

Set value of instrument parameter detector_pos (double) [default='2']:

[JJ_SAXS] Initialize
[JJ_SAXS] Initialize
[JJ_SAXS] Initialize
[JJ_SAXS] Initialize

Save [JJ_SAXS]
Detector: psd00_I=7.93596e-05 psd00_ERR=2.50958e-08 psd00_N=1e+07 "psd00.dat"
Detector: psd01_I=7.93596e-05 psd01_ERR=2.50958e-08 psd01_N=1e+07 "psd01.dat"
Detector: psd03_I=7.93596e-05 psd03_ERR=2.50958e-08 psd03_N=1e+07 "psd02.dat"
Detector: psd1_I=7.86326e-05 psd1_ERR=2.49819e-08 psd1_N=9.90734e+06 "psd1.dat"

Finally [JJ_SAXS: JJ_SAXS_20200428_163157]. Time: 2 [s] 

Finally [JJ_SAXS: JJ_SAXS_20200428_163157]. Time: 2 [s] 

Finally [JJ_SAXS: JJ_SAXS_20200428_163157]. Time: 2 [s] 

Finally [JJ_SAXS: JJ_SAXS_20200428_163157]. Time: 2 [s] 
INFO: Placing instr file copy JJ_SAXS.instr in dataset JJ_SAXS_20200428_163157
pkwi@pkwi-mbp2018:~/tmp$ which mpicc
/Applications/McXtrace-1.5.app/Contents/Resources/mcxtrace/1.5/miniconda3/bin/mpicc
pkwi@pkwi-mbp2018:~/tmp$ which orted
/Applications/McXtrace-1.5.app/Contents/Resources/mcxtrace/1.5/miniconda3/bin/orted
pkwi@pkwi-mbp2018:~/tmp$ which mpirun
/Applications/McXtrace-1.5.app/Contents/Resources/mcxtrace/1.5/miniconda3/bin/mpirun
pkwi@pkwi-mbp2018:~/tmp$ 

Didn't try anything GSL - which instr should I test?

I may also remove my current 1.5 and install anew...

ebknudsen commented 4 years ago

Indeed I can confirm that the workaround works, i.e.

willend commented 4 years ago

I believe this is fixed by d0b57aa34 - so that an updated McXtrace should work in this respect

ebknudsen commented 3 years ago

This workaround should simply be verified. Then closed :-)