magic-sph / magic

MagIC is a high-performance code that solves the magneto-hydrodynamics equations in rotating spherical shells
https://magic-sph.github.io/
80 stars 25 forks source link

Auto-test failed #2

Closed jrekier closed 9 years ago

jrekier commented 9 years ago

Hi !

can't seem to pass the test step:

./magic_checks.pl --all --clean
Use of uninitialized value $ENV{"OMP_NUM_THREADS"} in string at ./magic_checks.pl line 114.
Compilation.. 
Warning: mpimod.f90:2: Illegal preprocessor directive
Warning: mpimod.f90:4: Illegal preprocessor directive

/Users/jrek/magic/samples/dynamo_benchmark: (1/13)
exitcode = 256    Validating results..                    not ok: 
[Couldn't open e_kin.test]
    Time used:                                        00:00

similar errors are produced for the remaining 12 tests so that the summary reads:

----------------------------------------------------------------------
### auto-test failed ###
Failed 13 test(s) out of 13:
  /Users/jrek/magic/samples/varCond (results)
  /Users/jrek/magic/samples/varProps (results)
  /Users/jrek/magic/samples/dynamo_benchmark_condICrotIC (results)
  /Users/jrek/magic/samples/testMapping (results)
  /Users/jrek/magic/samples/isothermal_nrho3 (results)
  /Users/jrek/magic/samples/testRadialOutputs (did not run)
  /Users/jrek/magic/samples/hydro_bench_anel (results)
  /Users/jrek/magic/samples/fluxPerturbation (results)
  /Users/jrek/magic/samples/testOutputs (did not run)
  /Users/jrek/magic/samples/testRestart (results)
  /Users/jrek/magic/samples/boussBenchSat (results)
  /Users/jrek/magic/samples/testTruncations (results)
  /Users/jrek/magic/samples/dynamo_benchmark (results)

The compilation seems to be working all right:

$cmake output :

-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Set precision to 'dble'
-- Set output precision to 'sngl'
-- Could not find MPI wrappers in CMAKE_C_COMPILER or CMAKE_Fortran_COMPILER. Trying to find MPI libs by default
-- Use MPI
-- Use OpenMP
-- MKL was not found
-- Could NOT find Threads (missing:  Threads_FOUND) 
-- A library with BLAS API found.
-- Could NOT find Threads (missing:  Threads_FOUND) 
-- A library with LAPACK API found.
-- LAPACK was found
-- Use 'JW' for the FFTs
-- Use 'LAPACK' for the LU factorisations
-- HDF5 for check points: 'no'
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jrek/magic/build

$make-j output :

...
[ 96%] Building Fortran object src/CMakeFiles/magic.exe.dir/cutils_iface.f90.o
[ 98%] Building Fortran object src/CMakeFiles/magic.exe.dir/magic.f90.o
[ 98%] Building C object src/CMakeFiles/magic.exe.dir/c_utils.c.o
[100%] Linking Fortran executable ../magic.exe
[100%] Built target magic.exe
tgastine commented 9 years ago

Ok good. Now, there's no reason why the auto-test shouldn't run:

export FC=...
export CC=...
# Make sure you source sourceme.sh
./magic_checks.pl --all --clean --use-cmake

If you don't specify the use-cmake flag, then the magic_checks.pl script will go to $MAGIC_HOME/src and try to build the code from the makefile and it's likely to fail if you didn't edit it.

jrekier commented 9 years ago

All right ! Excellent, now it's working ! Thanks very much. The "-cmake" flag was what I was missing.

Thanks again

tgastine commented 9 years ago

Cool! I have to include this option in the main README file